diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-15 10:52:54 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-15 10:52:54 +0100 |
commit | 9c2089dc5a89acc2351fa089558d1e375c1d09f6 (patch) | |
tree | 17b33be6404130686424900e73ae9b50fb4d9724 /src | |
parent | This adds the cWorld::BroadcastEntityEffect and cWorld::BroadcastRemoveEntityEffect functions. (diff) | |
download | cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.tar cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.tar.gz cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.tar.bz2 cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.tar.lz cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.tar.xz cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.tar.zst cuberite-9c2089dc5a89acc2351fa089558d1e375c1d09f6.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Entities/Player.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index b2485a8e2..e057c25fe 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -557,12 +557,12 @@ void cPlayer::FoodPoison(int a_NumTicks) m_FoodPoisonedTicksRemaining = std::max(m_FoodPoisonedTicksRemaining, a_NumTicks); if (!HasBeenFoodPoisoned) { - m_ClientHandle->SendRemoveEntityEffect(*this, E_EFFECT_HUNGER); + m_World->BroadcastRemoveEntityEffect(*this, E_EFFECT_HUNGER); SendHealth(); } else { - m_ClientHandle->SendEntityEffect(*this, E_EFFECT_HUNGER, 0, 20); + m_World->BroadcastEntityEffect(*this, E_EFFECT_HUNGER, 0, 400); // Give the player the "Hunger" effect for 20 seconds. } } @@ -1710,7 +1710,7 @@ void cPlayer::HandleFood(void) } else { - m_ClientHandle->SendRemoveEntityEffect(*this, E_EFFECT_HUNGER); // remove the "Hunger" effect. + m_World->BroadcastRemoveEntityEffect(*this, E_EFFECT_HUNGER); // Remove the "Hunger" effect. } // Apply food exhaustion that has accumulated: |