diff options
author | nesco <emmanuel@federbusch.fr> | 2014-09-16 20:04:17 +0200 |
---|---|---|
committer | nesco <emmanuel@federbusch.fr> | 2014-09-16 20:04:17 +0200 |
commit | 120b23d65eefdd6e29b1605b10b852a1069e5444 (patch) | |
tree | c3007a3c4b18ca363b9e80da9ca3f200785a1237 /src/Entities | |
parent | Preparing 1.8 changes (diff) | |
download | cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.tar cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.tar.gz cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.tar.bz2 cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.tar.lz cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.tar.xz cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.tar.zst cuberite-120b23d65eefdd6e29b1605b10b852a1069e5444.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index ea795e346..81250bd40 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1043,6 +1043,14 @@ bool cPlayer::IsGameModeAdventure(void) const +bool cPlayer::IsGameModeSpectator(void) const +{ + return (m_GameMode == gmSpectator) || // Either the player is explicitly in Spectator + ((m_GameMode == gmNotSet) && m_World->IsGameModeSpectator()); // or they inherit from the world and the world is Adventure +} + + + void cPlayer::SetTeam(cTeam * a_Team) { |