From af4d60db1da92668d49d0b1c4c2ba7d1b12bfff1 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 18 Jul 2018 13:05:58 +0300 Subject: [PATCH] Fixed GameMain.Server.Character not being set to null when the character is removed. Closes #488 --- Barotrauma/BarotraumaClient/Source/Characters/Character.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Characters/Character.cs b/Barotrauma/BarotraumaClient/Source/Characters/Character.cs index f5feec38b..597bdc902 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/Character.cs @@ -206,8 +206,8 @@ namespace Barotrauma { GameMain.GameSession.CrewManager.RemoveCharacter(this); } - - if (GameMain.Client != null && GameMain.Client.Character == this) GameMain.Client.Character = null; + + if (GameMain.NetworkMember?.Character == this) GameMain.NetworkMember.Character = null; if (Lights.LightManager.ViewTarget == this) Lights.LightManager.ViewTarget = null; }