diff options
author | Alexander Harkness <me@bearbin.net> | 2015-05-23 12:56:39 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2015-05-23 12:56:39 +0200 |
commit | 3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457 (patch) | |
tree | 1bc0d72444fdd764230efa33ca50e9e5022d94d5 | |
parent | Merge pull request #2110 from mc-server/coverity-fix (diff) | |
parent | Fixed players head visible when in spectator mode (diff) | |
download | cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.tar cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.tar.gz cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.tar.bz2 cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.tar.lz cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.tar.xz cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.tar.zst cuberite-3a27fabbab7096c3ba9ab6dbf2aee3d7096a0457.zip |
-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); } |