From 1a5099677450c8777f4c14eeb1706374e2f5a21a Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 6 Aug 2018 14:14:30 +0300 Subject: [PATCH] Server doesn't force reconnecting spectate-only clients to control their previous character. --- Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs b/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs index 6d65e1ded..d95c18533 100644 --- a/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs +++ b/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs @@ -384,7 +384,7 @@ namespace Barotrauma.Networking c.InGame && !c.NeedsMidRoundSync && c.Name == character.OwnerClientName && c.Connection.RemoteEndPoint.Address.ToString() == character.OwnerClientIP); - if (owner != null) + if (owner != null && (!AllowSpectating || !owner.SpectateOnly)) { SetClientCharacter(owner, character); }