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);
|
||||
|
||||
bool isCrewDead =
|
||||
connectedClients.Find(c => c.Character != null && !c.Character.IsDead)==null &&
|
||||
(myCharacter == null || myCharacter.IsDead);
|
||||
bool isCrewDead =
|
||||
connectedClients.All(c => c.Character == null || c.Character.IsDead || c.Character.IsUnconscious) &&
|
||||
(myCharacter == null || myCharacter.IsDead || myCharacter.IsUnconscious);
|
||||
|
||||
//restart if all characters are dead or submarine is at the end of the level
|
||||
if ((autoRestart && isCrewDead)
|
||||
|
||||
Reference in New Issue
Block a user