mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Added experimental singleplayer anim state
This commit is contained in:
@@ -215,6 +215,17 @@ acttable_t CWeaponShotgun::m_acttable[] =
|
||||
{ ACT_RANGE_AIM_MED, ACT_RANGE_AIM_SHOTGUN_MED, false },
|
||||
{ ACT_RANGE_ATTACK1_MED, ACT_RANGE_ATTACK_SHOTGUN_MED, false },
|
||||
#endif
|
||||
|
||||
#ifdef MAPBASE
|
||||
// HL2:DM activities (for third-person animations in SP)
|
||||
{ ACT_HL2MP_IDLE, ACT_HL2MP_IDLE_SHOTGUN, false },
|
||||
{ ACT_HL2MP_RUN, ACT_HL2MP_RUN_SHOTGUN, false },
|
||||
{ ACT_HL2MP_IDLE_CROUCH, ACT_HL2MP_IDLE_CROUCH_SHOTGUN, false },
|
||||
{ ACT_HL2MP_WALK_CROUCH, ACT_HL2MP_WALK_CROUCH_SHOTGUN, false },
|
||||
{ ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN, false },
|
||||
{ ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, false },
|
||||
{ ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_SHOTGUN, false },
|
||||
#endif
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTTABLE(CWeaponShotgun);
|
||||
@@ -531,7 +542,11 @@ void CWeaponShotgun::PrimaryAttack( void )
|
||||
pPlayer->SetAnimation( PLAYER_ATTACK1 );
|
||||
|
||||
// Don't fire again until fire animation has completed
|
||||
#ifdef MAPBASE
|
||||
m_flNextPrimaryAttack = gpGlobals->curtime + GetViewModelSequenceDuration();
|
||||
#else
|
||||
m_flNextPrimaryAttack = gpGlobals->curtime + SequenceDuration();
|
||||
#endif
|
||||
m_iClip1 -= 1;
|
||||
|
||||
Vector vecSrc = pPlayer->Weapon_ShootPosition( );
|
||||
@@ -589,7 +604,11 @@ void CWeaponShotgun::SecondaryAttack( void )
|
||||
pPlayer->SetAnimation( PLAYER_ATTACK1 );
|
||||
|
||||
// Don't fire again until fire animation has completed
|
||||
#ifdef MAPBASE
|
||||
m_flNextPrimaryAttack = gpGlobals->curtime + GetViewModelSequenceDuration();
|
||||
#else
|
||||
m_flNextPrimaryAttack = gpGlobals->curtime + SequenceDuration();
|
||||
#endif
|
||||
m_iClip1 -= 2; // Shotgun uses same clip for primary and secondary attacks
|
||||
|
||||
Vector vecSrc = pPlayer->Weapon_ShootPosition();
|
||||
|
||||
Reference in New Issue
Block a user