diff options
author | b33duck <b33duck@gmail.com> | 2015-05-22 21:25:16 +0200 |
---|---|---|
committer | b33duck <b33duck@gmail.com> | 2015-05-22 21:25:16 +0200 |
commit | 906288c6eb007c7cd71ada3b5793fb373d722484 (patch) | |
tree | 4919125a14ebea4c0b65e7a94eb871612d43e1ea /src | |
parent | Added beeduck to contributors (diff) | |
download | cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.tar cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.tar.gz cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.tar.bz2 cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.tar.lz cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.tar.xz cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.tar.zst cuberite-906288c6eb007c7cd71ada3b5793fb373d722484.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 607a663de..1dab952c5 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1205,6 +1205,15 @@ void cPlayer::SetGameMode(eGameMode a_GameMode) SetCanFly(false); } + if (IsGameModeSpectator() && IsVisible()) + { + SetVisible(false); + } + else if (!IsVisible()) + { + SetVisible(true); + } + m_World->BroadcastPlayerListUpdateGameMode(*this); } |