Unstable v0.19.3.0
This commit is contained in:
@@ -5,12 +5,16 @@ namespace Barotrauma
|
||||
{
|
||||
partial class CombatMission
|
||||
{
|
||||
const float RoundEndDuration = 5.0f;
|
||||
|
||||
private readonly bool[] teamDead = new bool[2];
|
||||
|
||||
private List<Character>[] crews;
|
||||
|
||||
private bool initialized = false;
|
||||
|
||||
private float roundEndTimer;
|
||||
|
||||
public override LocalizedString Description
|
||||
{
|
||||
get
|
||||
@@ -53,6 +57,7 @@ namespace Barotrauma
|
||||
{
|
||||
teamDead[0] = crews[0].All(c => c.IsDead || c.IsIncapacitated);
|
||||
teamDead[1] = crews[1].All(c => c.IsDead || c.IsIncapacitated);
|
||||
if (teamDead[0] && teamDead[1]) { state = 1; }
|
||||
}
|
||||
|
||||
if (state == 0)
|
||||
@@ -66,13 +71,17 @@ namespace Barotrauma
|
||||
|
||||
GameMain.GameSession.WinningTeam = i == 0 ? CharacterTeamType.Team1 : CharacterTeamType.Team2;
|
||||
|
||||
state = 1;
|
||||
//state 1 = team 1 won, 2 = team 2 won
|
||||
State = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
roundEndTimer -= deltaTime;
|
||||
if (roundEndTimer > 0.0f) { return; }
|
||||
|
||||
if (teamDead[0] && teamDead[1])
|
||||
{
|
||||
GameMain.GameSession.WinningTeam = CharacterTeamType.None;
|
||||
@@ -81,7 +90,7 @@ namespace Barotrauma
|
||||
else if (GameMain.GameSession.WinningTeam != CharacterTeamType.None)
|
||||
{
|
||||
GameMain.Server.EndGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user