Combat missions don't reset the "allow respawn" setting

This commit is contained in:
Regalis
2016-11-06 15:57:28 +02:00
parent a32198ff80
commit fa6bf60032
3 changed files with 21 additions and 12 deletions
@@ -19,6 +19,11 @@ namespace Barotrauma
private static string[] teamNames;
public override bool AllowRespawn
{
get { return false; }
}
public override string Description
{
get
@@ -126,11 +131,6 @@ namespace Barotrauma
public override void Start(Level level)
{
if (GameMain.Server != null)
{
GameMain.Server.AllowRespawn = false;
}
if (GameMain.NetworkMember == null)
{
DebugConsole.ThrowError("Combat missions cannot be played in the single player mode.");
@@ -154,11 +154,6 @@ namespace Barotrauma
{
if (crews[0].Count == 0 && crews[1].Count == 0)
{
if (GameMain.Server != null)
{
GameMain.Server.AllowRespawn = false;
}
foreach (Character character in Character.CharacterList)
{
if (character.TeamID == 1)
@@ -48,6 +48,11 @@ namespace Barotrauma
set { completed = value; }
}
public virtual bool AllowRespawn
{
get { return true; }
}
public virtual string RadarLabel
{
get { return radarLabel; }