1
0

cPlayer is using the broadcast functions.

This commit is contained in:
STRWarrior 2013-12-15 10:52:54 +01:00
parent c56af9a214
commit 9c2089dc5a

View File

@ -557,12 +557,12 @@ void cPlayer::FoodPoison(int a_NumTicks)
m_FoodPoisonedTicksRemaining = std::max(m_FoodPoisonedTicksRemaining, a_NumTicks); m_FoodPoisonedTicksRemaining = std::max(m_FoodPoisonedTicksRemaining, a_NumTicks);
if (!HasBeenFoodPoisoned) if (!HasBeenFoodPoisoned)
{ {
m_ClientHandle->SendRemoveEntityEffect(*this, E_EFFECT_HUNGER); m_World->BroadcastRemoveEntityEffect(*this, E_EFFECT_HUNGER);
SendHealth(); SendHealth();
} }
else 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 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: // Apply food exhaustion that has accumulated: