Add bow charging animation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "Player.h"
|
||||
@@ -411,6 +411,7 @@ void cPlayer::StartChargingBow(void)
|
||||
LOGD("Player \"%s\" started charging their bow", GetName().c_str());
|
||||
m_IsChargingBow = true;
|
||||
m_BowCharge = 0;
|
||||
m_World->BroadcastEntityMetadata(*this, m_ClientHandle);
|
||||
}
|
||||
|
||||
|
||||
@@ -423,6 +424,8 @@ int cPlayer::FinishChargingBow(void)
|
||||
int res = m_BowCharge;
|
||||
m_IsChargingBow = false;
|
||||
m_BowCharge = 0;
|
||||
m_World->BroadcastEntityMetadata(*this, m_ClientHandle);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -435,6 +438,7 @@ void cPlayer::CancelChargingBow(void)
|
||||
LOGD("Player \"%s\" cancelled charging their bow at a charge of %d", GetName().c_str(), m_BowCharge);
|
||||
m_IsChargingBow = false;
|
||||
m_BowCharge = 0;
|
||||
m_World->BroadcastEntityMetadata(*this, m_ClientHandle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user