o Fixed bug that caused +attack leap animations not to play.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@506 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2006-05-26 22:22:31 +00:00
parent 4e8744aff0
commit df34e24de5
3 changed files with 10 additions and 5 deletions

View file

@ -474,7 +474,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
{
// Hack initialization
if (this->m_flLastAnimationPlayed >= 3 * BALANCE_VAR(kLeapROF) * gpGlobals->time)
if (this->m_flLastAnimationPlayed >= 3 * BALANCE_VAR(kLeapROF) + gpGlobals->time)
this->m_flLastAnimationPlayed = 0.0f;
if ((m_fInReload) && (m_pPlayer->m_flNextAttack <= 0.0))
@ -603,7 +603,11 @@ void CBasePlayerWeapon::ItemPostFrame( void )
}
}
this->PrevAttack2Status = true;
if (this->m_flLastAnimationPlayed + BALANCE_VAR(kLeapROF) < gpGlobals->time)
this->PrevAttack2Status = false;
else
this->PrevAttack2Status = true;
return;
// if (GetCanUseWeapon())
// {

View file

@ -149,7 +149,7 @@ void AvHLeap::Spawn()
float AvHLeap::GetRateOfFire(void) const
{
return (float)BALANCE_VAR(kLeapROF);
return (float)BALANCE_VAR(kLeapROF) * 0.5f;
}
bool AvHLeap::UsesAmmo(void) const
@ -177,6 +177,7 @@ void AvHLeap::FireProjectiles(void)
if(g_runfuncs)
{
//IN_Attack2Down();
//this->SendWeaponAnim(3);
gHUD.SetAlienAbility(this->GetAbilityImpulse());
}
#endif

View file

@ -3014,9 +3014,9 @@ void EV_Devour(struct event_args_s* inArgs)
void EV_Leap(struct event_args_s* inArgs)
{
char* theSoundToPlay = kLeapSound;
//char* theSoundToPlay = kLeapSound;
// gEngfuncs.pEventAPI->EV_PlaySound(inArgs->entindex, inArgs->origin, CHAN_WEAPON, theSoundToPlay, inArgs->fparam1, ATTN_NORM, 0, 94 + gEngfuncs.pfnRandomLong( 0, 0xf ));
//gEngfuncs.pEventAPI->EV_PlaySound(inArgs->entindex, inArgs->origin, CHAN_WEAPON, theSoundToPlay, inArgs->fparam1, ATTN_NORM, 0, 94 + gEngfuncs.pfnRandomLong( 0, 0xf ));
if (EV_IsLocal(inArgs->entindex))
{