Server ends the round if all characters are either dead or unconscious when autorestart is on (instead of waiting for everyone to be dead)
This commit is contained in:
@@ -402,9 +402,9 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
entityEventManager.Update(connectedClients);
|
entityEventManager.Update(connectedClients);
|
||||||
|
|
||||||
bool isCrewDead =
|
bool isCrewDead =
|
||||||
connectedClients.Find(c => c.Character != null && !c.Character.IsDead)==null &&
|
connectedClients.All(c => c.Character == null || c.Character.IsDead || c.Character.IsUnconscious) &&
|
||||||
(myCharacter == null || myCharacter.IsDead);
|
(myCharacter == null || myCharacter.IsDead || myCharacter.IsUnconscious);
|
||||||
|
|
||||||
//restart if all characters are dead or submarine is at the end of the level
|
//restart if all characters are dead or submarine is at the end of the level
|
||||||
if ((autoRestart && isCrewDead)
|
if ((autoRestart && isCrewDead)
|
||||||
|
|||||||
Reference in New Issue
Block a user