Fixed OwnerClientName & OwnerClientIP not being set on respawned characters. The characters of clients who aren't in-game 30 seconds after a round starts are treated as disconnected, making it possible for the client to gain control of the character if they do manage to connect. Closes #583, #584
This commit is contained in:
@@ -872,11 +872,10 @@ namespace Barotrauma.Networking
|
||||
else
|
||||
{
|
||||
//if 30 seconds have passed since the round started and the client isn't ingame yet,
|
||||
//kill the client's character
|
||||
//consider the client's character disconnected (causing it to die if the client does not join soon)
|
||||
if (gameStarted && c.Character != null && (DateTime.Now - roundStartTime).Seconds > 30.0f)
|
||||
{
|
||||
c.Character.Kill(CauseOfDeath.Disconnected);
|
||||
c.Character = null;
|
||||
c.Character.ClientDisconnected = true;
|
||||
}
|
||||
|
||||
ClientWriteLobby(c);
|
||||
|
||||
Reference in New Issue
Block a user