summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-12-15 13:42:15 +0100
committerMattes D <github@xoft.cz>2013-12-15 13:42:15 +0100
commit4f92f18a8d97c749d25754a528cea2cc7a90dcf2 (patch)
treec2135e33e7ab30a548dcaac99e7f2cafc8bb2c4c /src/Entities/Player.cpp
parentFixed pre 1.7 clients crashing. (diff)
parentcPlayer is using the broadcast functions. (diff)
downloadcuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.tar
cuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.tar.gz
cuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.tar.bz2
cuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.tar.lz
cuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.tar.xz
cuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.tar.zst
cuberite-4f92f18a8d97c749d25754a528cea2cc7a90dcf2.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp6
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: