summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:41:57 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:41:57 +0100
commit4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a (patch)
treeccc5f55d8f7a15f08bab8f0222fd1b2f95e5d7a2 /source/cPlayer.cpp
parentRemoved redstone debugging: powered dirt blocks change into stone (diff)
downloadcuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.gz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.bz2
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.lz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.xz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.zst
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.zip
Diffstat (limited to 'source/cPlayer.cpp')
-rw-r--r--source/cPlayer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp
index f013465de..673d0b41a 100644
--- a/source/cPlayer.cpp
+++ b/source/cPlayer.cpp
@@ -177,6 +177,12 @@ cPacket * cPlayer::GetSpawnPacket(void) const
void cPlayer::Tick(float a_Dt)
{
+ if (!m_ClientHandle->IsPlaying())
+ {
+ // We're not yet in the game, ignore everything
+ return;
+ }
+
cPawn::Tick(a_Dt);
if (m_bDirtyOrientation && !m_bDirtyPosition)
@@ -233,7 +239,7 @@ void cPlayer::Tick(float a_Dt)
m_ClientHandle->StreamChunks();
}
- if ( m_Health > 0 ) // make sure player is alive
+ if (m_Health > 0) // make sure player is alive
{
m_World->CollectPickupsByPlayer(this);
}