From 7b0db672d1ff72caec1f45cbc0c855680337766d Mon Sep 17 00:00:00 2001 From: changyong guo Date: Mon, 23 Jul 2018 07:35:32 +0800 Subject: Keep players in gmNotSet (#4248) This allows players game mode to update to the default after portal to another world. Fixes #4207 --- src/Protocol/Protocol_1_9.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Protocol/Protocol_1_9.cpp') diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index 2621f140c..73b81580e 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -992,7 +992,7 @@ void cProtocol_1_9_0::SendPlayerListAddPlayer(const cPlayer & a_Player) } } - Pkt.WriteVarInt32(static_cast(a_Player.GetGameMode())); + Pkt.WriteVarInt32(static_cast(a_Player.GetEffectiveGameMode())); Pkt.WriteVarInt32(static_cast(a_Player.GetClientHandle()->GetPing())); Pkt.WriteBool(false); } @@ -1023,7 +1023,7 @@ void cProtocol_1_9_0::SendPlayerListUpdateGameMode(const cPlayer & a_Player) Pkt.WriteVarInt32(1); Pkt.WriteVarInt32(1); Pkt.WriteUUID(a_Player.GetUUID()); - Pkt.WriteVarInt32(static_cast(a_Player.GetGameMode())); + Pkt.WriteVarInt32(static_cast(a_Player.GetEffectiveGameMode())); } -- cgit v1.2.3