1
0

Add bow charging animation

This commit is contained in:
Howaner
2014-06-16 21:57:23 +02:00
parent 4fddbf9dfc
commit e50423991e
2 changed files with 6 additions and 2 deletions

View File

@@ -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);
}