mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-13 05:51:19 +00:00
Merge branch 'opfor' into opforfixed
This commit is contained in:
commit
575096ac76
@ -164,7 +164,9 @@ int CKnife::Swing(int fFirst)
|
|||||||
{
|
{
|
||||||
// miss
|
// miss
|
||||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
m_flNextPrimaryAttack = GetNextAttackDelay(0.5);
|
||||||
|
#if CROWBAR_IDLE_ANIM
|
||||||
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
||||||
|
#endif
|
||||||
// player "shoot" animation
|
// player "shoot" animation
|
||||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||||
}
|
}
|
||||||
@ -276,7 +278,44 @@ int CKnife::Swing(int fFirst)
|
|||||||
SetThink(&CKnife::Smack);
|
SetThink(&CKnife::Smack);
|
||||||
pev->nextthink = UTIL_WeaponTimeBase() + 0.2;
|
pev->nextthink = UTIL_WeaponTimeBase() + 0.2;
|
||||||
#endif
|
#endif
|
||||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.25);
|
#if CROWBAR_DELAY_FIX
|
||||||
|
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25f;
|
||||||
|
#else
|
||||||
|
m_flNextPrimaryAttack = GetNextAttackDelay( 0.25f );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#if CROWBAR_IDLE_ANIM
|
||||||
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
||||||
|
#endif
|
||||||
return fDidHit;
|
return fDidHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CROWBAR_IDLE_ANIM
|
||||||
|
void CKnife::WeaponIdle( void )
|
||||||
|
{
|
||||||
|
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )
|
||||||
|
{
|
||||||
|
int iAnim;
|
||||||
|
float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 );
|
||||||
|
if( flRand > 0.9f )
|
||||||
|
{
|
||||||
|
iAnim = KNIFE_IDLE2;
|
||||||
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0f / 30.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( flRand > 0.5f )
|
||||||
|
{
|
||||||
|
iAnim = KNIFE_IDLE1;
|
||||||
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 70.0f / 25.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iAnim = KNIFE_IDLE3;
|
||||||
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0f / 30.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SendWeaponAnim( iAnim );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -177,7 +177,6 @@ void CShotgun::PrimaryAttack()
|
|||||||
|
|
||||||
m_flNextPrimaryAttack = GetNextAttackDelay( 0.75f );
|
m_flNextPrimaryAttack = GetNextAttackDelay( 0.75f );
|
||||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.75f;
|
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.75f;
|
||||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.75;
|
|
||||||
if( m_iClip != 0 )
|
if( m_iClip != 0 )
|
||||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 5.0f;
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 5.0f;
|
||||||
else
|
else
|
||||||
@ -249,7 +248,6 @@ void CShotgun::SecondaryAttack( void )
|
|||||||
|
|
||||||
m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f );
|
m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f );
|
||||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f;
|
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f;
|
||||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.5;
|
|
||||||
if( m_iClip != 0 )
|
if( m_iClip != 0 )
|
||||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 6.0f;
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 6.0f;
|
||||||
else
|
else
|
||||||
|
@ -1210,6 +1210,9 @@ public:
|
|||||||
int Swing(int fFirst);
|
int Swing(int fFirst);
|
||||||
BOOL Deploy(void);
|
BOOL Deploy(void);
|
||||||
void Holster(int skiplocal = 0);
|
void Holster(int skiplocal = 0);
|
||||||
|
#if CROWBAR_IDLE_ANIM
|
||||||
|
void WeaponIdle();
|
||||||
|
#endif
|
||||||
int m_iSwing;
|
int m_iSwing;
|
||||||
TraceResult m_trHit;
|
TraceResult m_trHit;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user