From dc3885a2dae4e19739483aa739096ad525b3179a Mon Sep 17 00:00:00 2001 From: Regalis Date: Wed, 11 Jan 2017 21:24:03 +0200 Subject: [PATCH] Server doesn't un-freezes characters that are stunned, unconscious or dead, or controlled by the host --- Subsurface/Source/Characters/Character.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Subsurface/Source/Characters/Character.cs b/Subsurface/Source/Characters/Character.cs index 446624a34..6146ad8cd 100644 --- a/Subsurface/Source/Characters/Character.cs +++ b/Subsurface/Source/Characters/Character.cs @@ -1350,9 +1350,13 @@ namespace Barotrauma if (this != Character.Controlled) { - if (GameMain.Server != null && !(this is AICharacter) && AllowInput) + if (GameMain.Server != null && !(this is AICharacter)) { - if (memInput.Count == 0) + if (!AllowInput) + { + AnimController.Frozen = false; + } + else if (memInput.Count == 0) { AnimController.Frozen = true; } @@ -1415,6 +1419,10 @@ namespace Barotrauma memInput.RemoveRange(60, memInput.Count - 60); } } + else //this == Character.Controlled && GameMain.Client == null + { + AnimController.Frozen = false; + } if (networkUpdateSent) { @@ -1906,6 +1914,8 @@ namespace Barotrauma } } + AnimController.Frozen = false; + GameServer.Log(Name+" has died (Cause of death: "+causeOfDeath+")", Color.Red); if (OnDeath != null) OnDeath(this, causeOfDeath);