diff options
author | tycho <work.tycho@gmail.com> | 2015-05-23 15:50:28 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-23 15:50:28 +0200 |
commit | b29ae54d912a69f24946f8e1ff34448455d5afc3 (patch) | |
tree | aeabb17db1922556466087cf6ebb7302d956f6c1 /src/Entities | |
parent | Fix tests (diff) | |
parent | Merge pull request #2116 from mc-server/CMakeCacheOptions (diff) | |
download | cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.tar cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.tar.gz cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.tar.bz2 cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.tar.lz cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.tar.xz cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.tar.zst cuberite-b29ae54d912a69f24946f8e1ff34448455d5afc3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 4ed5ef8a3..b5a48d9bf 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1212,6 +1212,15 @@ void cPlayer::SetGameMode(eGameMode a_GameMode) SetCanFly(false); } + if (IsGameModeSpectator() && IsVisible()) + { + SetVisible(false); + } + else if (!IsVisible()) + { + SetVisible(true); + } + m_World->BroadcastPlayerListUpdateGameMode(*this); } |