diff options
author | Alexander Harkness <me@bearbin.net> | 2015-05-23 08:27:04 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2015-05-23 08:27:04 +0200 |
commit | 31f66fd8128adaface872b84e31465abfc5c5b98 (patch) | |
tree | 0802b3e243443e84de085869d80596bc0abbef49 /src/Entities/Player.cpp | |
parent | Merge pull request #2100 from SafwatHalaby/creeper (diff) | |
parent | Added a fix for players falling through the world when connecting in spectator mode (diff) | |
download | cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.tar cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.tar.gz cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.tar.bz2 cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.tar.lz cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.tar.xz cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.tar.zst cuberite-31f66fd8128adaface872b84e31465abfc5c5b98.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index f23d58ed1..4ed5ef8a3 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -128,6 +128,13 @@ cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) : m_IsFlying = true; } } + + if (m_GameMode == gmSpectator) // If player is reconnecting to the server in spectator mode + { + m_CanFly = true; + m_IsFlying = true; + m_bVisible = false; + } cRoot::Get()->GetServer()->PlayerCreated(this); } |