mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-27 15:25:30 +03:00
Implemented new pistol, 357, and crossbow activities
This commit is contained in:
parent
4cfa6dd22c
commit
6490e89256
@ -1687,9 +1687,88 @@ Activity CNPC_Alyx::NPC_TranslateActivity( Activity activity )
|
|||||||
case ACT_DROP_WEAPON: if ( HasShotgun() ) return (Activity)ACT_DROP_WEAPON_SHOTGUN;
|
case ACT_DROP_WEAPON: if ( HasShotgun() ) return (Activity)ACT_DROP_WEAPON_SHOTGUN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
// Alyx has her own pistol readiness animations which use the default activities
|
||||||
|
switch (activity)
|
||||||
|
{
|
||||||
|
case ACT_IDLE_PISTOL_RELAXED:
|
||||||
|
return ACT_IDLE_RELAXED;
|
||||||
|
case ACT_IDLE_PISTOL_STIMULATED:
|
||||||
|
return ACT_IDLE_STIMULATED;
|
||||||
|
case ACT_WALK_PISTOL_RELAXED:
|
||||||
|
return ACT_WALK;
|
||||||
|
case ACT_WALK_PISTOL_STIMULATED:
|
||||||
|
return ACT_WALK_PISTOL;
|
||||||
|
case ACT_RUN_PISTOL_RELAXED:
|
||||||
|
return ACT_RUN;
|
||||||
|
case ACT_RUN_PISTOL_STIMULATED:
|
||||||
|
return ACT_RUN_PISTOL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return activity;
|
return activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose:
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
Activity CNPC_Alyx::Weapon_TranslateActivity( Activity activity, bool *pRequired )
|
||||||
|
{
|
||||||
|
activity = BaseClass::Weapon_TranslateActivity( activity, pRequired );
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
// Alyx has her own pistol readiness animations which use the default activities
|
||||||
|
switch (activity)
|
||||||
|
{
|
||||||
|
case ACT_IDLE_PISTOL_RELAXED:
|
||||||
|
return ACT_IDLE_RELAXED;
|
||||||
|
case ACT_IDLE_PISTOL_STIMULATED:
|
||||||
|
return ACT_IDLE_STIMULATED;
|
||||||
|
case ACT_WALK_PISTOL_RELAXED:
|
||||||
|
return ACT_WALK;
|
||||||
|
case ACT_WALK_PISTOL_STIMULATED:
|
||||||
|
return ACT_WALK_PISTOL;
|
||||||
|
case ACT_RUN_PISTOL_RELAXED:
|
||||||
|
return ACT_RUN;
|
||||||
|
case ACT_RUN_PISTOL_STIMULATED:
|
||||||
|
return ACT_RUN_PISTOL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose:
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
Activity CNPC_Alyx::Weapon_BackupActivity( Activity activity, bool weaponTranslationWasRequired, CBaseCombatWeapon *pSpecificWeapon )
|
||||||
|
{
|
||||||
|
activity = BaseClass::Weapon_BackupActivity( activity, weaponTranslationWasRequired, pSpecificWeapon );
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
// Alyx has her own pistol readiness animations which use the default activities
|
||||||
|
switch (activity)
|
||||||
|
{
|
||||||
|
case ACT_IDLE_PISTOL_RELAXED:
|
||||||
|
return ACT_IDLE_RELAXED;
|
||||||
|
case ACT_IDLE_PISTOL_STIMULATED:
|
||||||
|
return ACT_IDLE_STIMULATED;
|
||||||
|
case ACT_WALK_PISTOL_RELAXED:
|
||||||
|
return ACT_WALK;
|
||||||
|
case ACT_WALK_PISTOL_STIMULATED:
|
||||||
|
return ACT_WALK_PISTOL;
|
||||||
|
case ACT_RUN_PISTOL_RELAXED:
|
||||||
|
return ACT_RUN;
|
||||||
|
case ACT_RUN_PISTOL_STIMULATED:
|
||||||
|
return ACT_RUN_PISTOL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool CNPC_Alyx::ShouldDeferToFollowBehavior()
|
bool CNPC_Alyx::ShouldDeferToFollowBehavior()
|
||||||
{
|
{
|
||||||
return BaseClass::ShouldDeferToFollowBehavior();
|
return BaseClass::ShouldDeferToFollowBehavior();
|
||||||
|
@ -91,6 +91,10 @@ public:
|
|||||||
bool CanSeeEntityInDarkness( CBaseEntity *pEntity );
|
bool CanSeeEntityInDarkness( CBaseEntity *pEntity );
|
||||||
bool IsCoverPosition( const Vector &vecThreat, const Vector &vecPosition );
|
bool IsCoverPosition( const Vector &vecThreat, const Vector &vecPosition );
|
||||||
Activity NPC_TranslateActivity ( Activity activity );
|
Activity NPC_TranslateActivity ( Activity activity );
|
||||||
|
#ifdef MAPBASE
|
||||||
|
Activity Weapon_TranslateActivity( Activity baseAct, bool *pRequired = NULL );
|
||||||
|
Activity Weapon_BackupActivity( Activity activity, bool weaponTranslationWasRequired = false, CBaseCombatWeapon *pSpecificWeapon = NULL );
|
||||||
|
#endif
|
||||||
bool ShouldDeferToFollowBehavior();
|
bool ShouldDeferToFollowBehavior();
|
||||||
void BuildScheduleTestBits();
|
void BuildScheduleTestBits();
|
||||||
bool ShouldBehaviorSelectSchedule( CAI_BehaviorBase *pBehavior );
|
bool ShouldBehaviorSelectSchedule( CAI_BehaviorBase *pBehavior );
|
||||||
|
@ -2085,6 +2085,13 @@ Activity CNPC_Citizen::NPC_TranslateActivity( Activity activity )
|
|||||||
return ACT_RUN_AIM_AR2_STIMULATED;
|
return ACT_RUN_AIM_AR2_STIMULATED;
|
||||||
if (activity == ACT_WALK_AIM_AR2)
|
if (activity == ACT_WALK_AIM_AR2)
|
||||||
return ACT_WALK_AIM_AR2_STIMULATED;
|
return ACT_WALK_AIM_AR2_STIMULATED;
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
if (activity == ACT_RUN_AIM_PISTOL)
|
||||||
|
return ACT_RUN_AIM_PISTOL_STIMULATED;
|
||||||
|
if (activity == ACT_WALK_AIM_PISTOL)
|
||||||
|
return ACT_WALK_AIM_PISTOL_STIMULATED;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3791,6 +3791,13 @@ WeaponProficiency_t CNPC_Combine::CalcWeaponProficiency( CBaseCombatWeapon *pWea
|
|||||||
{
|
{
|
||||||
return WEAPON_PROFICIENCY_GOOD;
|
return WEAPON_PROFICIENCY_GOOD;
|
||||||
}
|
}
|
||||||
|
#ifdef MAPBASE
|
||||||
|
else if ( pWeapon->ClassMatches( gm_isz_class_Pistol ) )
|
||||||
|
{
|
||||||
|
// Mods which need a lower soldier pistol accuracy can either change this value or use proficiency override in Hammer.
|
||||||
|
return WEAPON_PROFICIENCY_VERY_GOOD;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return BaseClass::CalcWeaponProficiency( pWeapon );
|
return BaseClass::CalcWeaponProficiency( pWeapon );
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,22 @@ END_DATADESC()
|
|||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
acttable_t CWeapon357::m_acttable[] =
|
acttable_t CWeapon357::m_acttable[] =
|
||||||
{
|
{
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_IDLE, ACT_IDLE_REVOLVER, true },
|
||||||
|
{ ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_REVOLVER, true },
|
||||||
|
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_REVOLVER, true },
|
||||||
|
{ ACT_RELOAD, ACT_RELOAD_REVOLVER, true },
|
||||||
|
{ ACT_WALK_AIM, ACT_WALK_AIM_REVOLVER, true },
|
||||||
|
{ ACT_RUN_AIM, ACT_RUN_AIM_REVOLVER, true },
|
||||||
|
{ ACT_GESTURE_RANGE_ATTACK1, ACT_GESTURE_RANGE_ATTACK_REVOLVER, true },
|
||||||
|
{ ACT_RELOAD_LOW, ACT_RELOAD_REVOLVER_LOW, false },
|
||||||
|
{ ACT_RANGE_ATTACK1_LOW, ACT_RANGE_ATTACK_REVOLVER_LOW, false },
|
||||||
|
{ ACT_COVER_LOW, ACT_COVER_REVOLVER_LOW, false },
|
||||||
|
{ ACT_RANGE_AIM_LOW, ACT_RANGE_AIM_REVOLVER_LOW, false },
|
||||||
|
{ ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_REVOLVER, false },
|
||||||
|
{ ACT_WALK, ACT_WALK_REVOLVER, true },
|
||||||
|
{ ACT_RUN, ACT_RUN_REVOLVER, true },
|
||||||
|
#else
|
||||||
{ ACT_IDLE, ACT_IDLE_PISTOL, true },
|
{ ACT_IDLE, ACT_IDLE_PISTOL, true },
|
||||||
{ ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_PISTOL, true },
|
{ ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_PISTOL, true },
|
||||||
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_PISTOL, true },
|
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_PISTOL, true },
|
||||||
@ -113,24 +129,40 @@ acttable_t CWeapon357::m_acttable[] =
|
|||||||
{ ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_PISTOL, false },
|
{ ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_PISTOL, false },
|
||||||
{ ACT_WALK, ACT_WALK_PISTOL, false },
|
{ ACT_WALK, ACT_WALK_PISTOL, false },
|
||||||
{ ACT_RUN, ACT_RUN_PISTOL, false },
|
{ ACT_RUN, ACT_RUN_PISTOL, false },
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Activities ported from weapon_alyxgun below
|
// Activities ported from weapon_alyxgun below
|
||||||
//
|
//
|
||||||
|
|
||||||
// Readiness activities (not aiming)
|
// Readiness activities (not aiming)
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_IDLE_STIMULATED, ACT_IDLE_PISTOL_STIMULATED, false },
|
||||||
|
#else
|
||||||
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL, false },//never aims
|
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL, false },//never aims
|
||||||
{ ACT_IDLE_STIMULATED, ACT_IDLE_STIMULATED, false },
|
{ ACT_IDLE_STIMULATED, ACT_IDLE_STIMULATED, false },
|
||||||
|
#endif
|
||||||
{ ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_PISTOL, false },//always aims
|
{ ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_PISTOL, false },//always aims
|
||||||
{ ACT_IDLE_STEALTH, ACT_IDLE_STEALTH_PISTOL, false },
|
{ ACT_IDLE_STEALTH, ACT_IDLE_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_WALK_RELAXED, ACT_WALK_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_WALK_STIMULATED, ACT_WALK_PISTOL_STIMULATED, false },
|
||||||
|
#else
|
||||||
{ ACT_WALK_RELAXED, ACT_WALK, false },//never aims
|
{ ACT_WALK_RELAXED, ACT_WALK, false },//never aims
|
||||||
{ ACT_WALK_STIMULATED, ACT_WALK_STIMULATED, false },
|
{ ACT_WALK_STIMULATED, ACT_WALK_STIMULATED, false },
|
||||||
|
#endif
|
||||||
{ ACT_WALK_AGITATED, ACT_WALK_AIM_PISTOL, false },//always aims
|
{ ACT_WALK_AGITATED, ACT_WALK_AIM_PISTOL, false },//always aims
|
||||||
{ ACT_WALK_STEALTH, ACT_WALK_STEALTH_PISTOL, false },
|
{ ACT_WALK_STEALTH, ACT_WALK_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_RUN_RELAXED, ACT_RUN_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_RUN_STIMULATED, ACT_RUN_PISTOL_STIMULATED, false },
|
||||||
|
#else
|
||||||
{ ACT_RUN_RELAXED, ACT_RUN, false },//never aims
|
{ ACT_RUN_RELAXED, ACT_RUN, false },//never aims
|
||||||
{ ACT_RUN_STIMULATED, ACT_RUN_STIMULATED, false },
|
{ ACT_RUN_STIMULATED, ACT_RUN_STIMULATED, false },
|
||||||
|
#endif
|
||||||
{ ACT_RUN_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
{ ACT_RUN_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
||||||
{ ACT_RUN_STEALTH, ACT_RUN_STEALTH_PISTOL, false },
|
{ ACT_RUN_STEALTH, ACT_RUN_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
@ -44,18 +44,33 @@ acttable_t CWeaponAlyxGun::m_acttable[] =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Readiness activities (not aiming)
|
// Readiness activities (not aiming)
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_IDLE_STIMULATED, ACT_IDLE_PISTOL_STIMULATED, false },
|
||||||
|
#else
|
||||||
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL, false },//never aims
|
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL, false },//never aims
|
||||||
{ ACT_IDLE_STIMULATED, ACT_IDLE_STIMULATED, false },
|
{ ACT_IDLE_STIMULATED, ACT_IDLE_STIMULATED, false },
|
||||||
|
#endif
|
||||||
{ ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_PISTOL, false },//always aims
|
{ ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_PISTOL, false },//always aims
|
||||||
{ ACT_IDLE_STEALTH, ACT_IDLE_STEALTH_PISTOL, false },
|
{ ACT_IDLE_STEALTH, ACT_IDLE_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_WALK_RELAXED, ACT_WALK_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_WALK_STIMULATED, ACT_WALK_PISTOL_STIMULATED, false },
|
||||||
|
#else
|
||||||
{ ACT_WALK_RELAXED, ACT_WALK, false },//never aims
|
{ ACT_WALK_RELAXED, ACT_WALK, false },//never aims
|
||||||
{ ACT_WALK_STIMULATED, ACT_WALK_STIMULATED, false },
|
{ ACT_WALK_STIMULATED, ACT_WALK_STIMULATED, false },
|
||||||
|
#endif
|
||||||
{ ACT_WALK_AGITATED, ACT_WALK_AIM_PISTOL, false },//always aims
|
{ ACT_WALK_AGITATED, ACT_WALK_AIM_PISTOL, false },//always aims
|
||||||
{ ACT_WALK_STEALTH, ACT_WALK_STEALTH_PISTOL, false },
|
{ ACT_WALK_STEALTH, ACT_WALK_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_RUN_RELAXED, ACT_RUN_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_RUN_STIMULATED, ACT_RUN_PISTOL_STIMULATED, false },
|
||||||
|
#else
|
||||||
{ ACT_RUN_RELAXED, ACT_RUN, false },//never aims
|
{ ACT_RUN_RELAXED, ACT_RUN, false },//never aims
|
||||||
{ ACT_RUN_STIMULATED, ACT_RUN_STIMULATED, false },
|
{ ACT_RUN_STIMULATED, ACT_RUN_STIMULATED, false },
|
||||||
|
#endif
|
||||||
{ ACT_RUN_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
{ ACT_RUN_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
||||||
{ ACT_RUN_STEALTH, ACT_RUN_STEALTH_PISTOL, false },
|
{ ACT_RUN_STEALTH, ACT_RUN_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
@ -638,6 +638,15 @@ END_DATADESC()
|
|||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
acttable_t CWeaponCrossbow::m_acttable[] =
|
acttable_t CWeaponCrossbow::m_acttable[] =
|
||||||
{
|
{
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_CROSSBOW, true },
|
||||||
|
{ ACT_RELOAD, ACT_RELOAD_CROSSBOW, true },
|
||||||
|
{ ACT_IDLE, ACT_IDLE_CROSSBOW, true },
|
||||||
|
{ ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_CROSSBOW, true },
|
||||||
|
|
||||||
|
{ ACT_WALK, ACT_WALK_CROSSBOW, true },
|
||||||
|
{ ACT_WALK_AIM, ACT_WALK_AIM_CROSSBOW, true },
|
||||||
|
#else
|
||||||
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SMG1, true },
|
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SMG1, true },
|
||||||
{ ACT_RELOAD, ACT_RELOAD_SMG1, true },
|
{ ACT_RELOAD, ACT_RELOAD_SMG1, true },
|
||||||
{ ACT_IDLE, ACT_IDLE_SMG1, true },
|
{ ACT_IDLE, ACT_IDLE_SMG1, true },
|
||||||
@ -645,6 +654,7 @@ acttable_t CWeaponCrossbow::m_acttable[] =
|
|||||||
|
|
||||||
{ ACT_WALK, ACT_WALK_RIFLE, true },
|
{ ACT_WALK, ACT_WALK_RIFLE, true },
|
||||||
{ ACT_WALK_AIM, ACT_WALK_AIM_RIFLE, true },
|
{ ACT_WALK_AIM, ACT_WALK_AIM_RIFLE, true },
|
||||||
|
#endif
|
||||||
|
|
||||||
// Readiness activities (not aiming)
|
// Readiness activities (not aiming)
|
||||||
{ ACT_IDLE_RELAXED, ACT_IDLE_SMG1_RELAXED, false },//never aims
|
{ ACT_IDLE_RELAXED, ACT_IDLE_SMG1_RELAXED, false },//never aims
|
||||||
@ -673,6 +683,21 @@ acttable_t CWeaponCrossbow::m_acttable[] =
|
|||||||
{ ACT_RUN_AIM_AGITATED, ACT_RUN_AIM_RIFLE, false },//always aims
|
{ ACT_RUN_AIM_AGITATED, ACT_RUN_AIM_RIFLE, false },//always aims
|
||||||
//End readiness activities
|
//End readiness activities
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
{ ACT_WALK_AIM, ACT_WALK_AIM_CROSSBOW, true },
|
||||||
|
{ ACT_WALK_CROUCH, ACT_WALK_CROUCH_RIFLE, true },
|
||||||
|
{ ACT_WALK_CROUCH_AIM, ACT_WALK_CROUCH_AIM_RIFLE, true },
|
||||||
|
{ ACT_RUN, ACT_RUN_CROSSBOW, true },
|
||||||
|
{ ACT_RUN_AIM, ACT_RUN_AIM_CROSSBOW, true },
|
||||||
|
{ ACT_RUN_CROUCH, ACT_RUN_CROUCH_RIFLE, true },
|
||||||
|
{ ACT_RUN_CROUCH_AIM, ACT_RUN_CROUCH_AIM_RIFLE, true },
|
||||||
|
{ ACT_GESTURE_RANGE_ATTACK1, ACT_GESTURE_RANGE_ATTACK_CROSSBOW, true },
|
||||||
|
{ ACT_RANGE_ATTACK1_LOW, ACT_RANGE_ATTACK_CROSSBOW_LOW, true },
|
||||||
|
{ ACT_COVER_LOW, ACT_COVER_CROSSBOW_LOW, false },
|
||||||
|
{ ACT_RANGE_AIM_LOW, ACT_RANGE_AIM_CROSSBOW_LOW, false },
|
||||||
|
{ ACT_RELOAD_LOW, ACT_RELOAD_CROSSBOW_LOW, false },
|
||||||
|
{ ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_CROSSBOW, true },
|
||||||
|
#else
|
||||||
{ ACT_WALK_AIM, ACT_WALK_AIM_RIFLE, true },
|
{ ACT_WALK_AIM, ACT_WALK_AIM_RIFLE, true },
|
||||||
{ ACT_WALK_CROUCH, ACT_WALK_CROUCH_RIFLE, true },
|
{ ACT_WALK_CROUCH, ACT_WALK_CROUCH_RIFLE, true },
|
||||||
{ ACT_WALK_CROUCH_AIM, ACT_WALK_CROUCH_AIM_RIFLE, true },
|
{ ACT_WALK_CROUCH_AIM, ACT_WALK_CROUCH_AIM_RIFLE, true },
|
||||||
@ -686,6 +711,7 @@ acttable_t CWeaponCrossbow::m_acttable[] =
|
|||||||
{ ACT_RANGE_AIM_LOW, ACT_RANGE_AIM_SMG1_LOW, false },
|
{ ACT_RANGE_AIM_LOW, ACT_RANGE_AIM_SMG1_LOW, false },
|
||||||
{ ACT_RELOAD_LOW, ACT_RELOAD_SMG1_LOW, false },
|
{ ACT_RELOAD_LOW, ACT_RELOAD_SMG1_LOW, false },
|
||||||
{ ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_SMG1, true },
|
{ ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_SMG1, true },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_ACTTABLE(CWeaponCrossbow);
|
IMPLEMENT_ACTTABLE(CWeaponCrossbow);
|
||||||
|
@ -161,6 +161,40 @@ acttable_t CWeaponPistol::m_acttable[] =
|
|||||||
// Activities ported from weapon_alyxgun below
|
// Activities ported from weapon_alyxgun below
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
// Readiness activities (not aiming)
|
||||||
|
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_IDLE_STIMULATED, ACT_IDLE_PISTOL_STIMULATED, false },
|
||||||
|
{ ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_PISTOL, false },//always aims
|
||||||
|
{ ACT_IDLE_STEALTH, ACT_IDLE_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
{ ACT_WALK_RELAXED, ACT_WALK_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_WALK_STIMULATED, ACT_WALK_PISTOL_STIMULATED, false },
|
||||||
|
{ ACT_WALK_AGITATED, ACT_WALK_AIM_PISTOL, false },//always aims
|
||||||
|
{ ACT_WALK_STEALTH, ACT_WALK_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
{ ACT_RUN_RELAXED, ACT_RUN_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_RUN_STIMULATED, ACT_RUN_PISTOL_STIMULATED, false },
|
||||||
|
{ ACT_RUN_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
||||||
|
{ ACT_RUN_STEALTH, ACT_RUN_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
// Readiness activities (aiming)
|
||||||
|
{ ACT_IDLE_AIM_RELAXED, ACT_IDLE_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_IDLE_AIM_STIMULATED, ACT_IDLE_AIM_PISTOL_STIMULATED, false },
|
||||||
|
{ ACT_IDLE_AIM_AGITATED, ACT_IDLE_ANGRY_PISTOL, false },//always aims
|
||||||
|
{ ACT_IDLE_AIM_STEALTH, ACT_IDLE_STEALTH_PISTOL, false },
|
||||||
|
|
||||||
|
{ ACT_WALK_AIM_RELAXED, ACT_WALK_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_WALK_AIM_STIMULATED, ACT_WALK_AIM_PISTOL, false },
|
||||||
|
{ ACT_WALK_AIM_AGITATED, ACT_WALK_AIM_PISTOL, false },//always aims
|
||||||
|
{ ACT_WALK_AIM_STEALTH, ACT_WALK_AIM_STEALTH_PISTOL, false },//always aims
|
||||||
|
|
||||||
|
{ ACT_RUN_AIM_RELAXED, ACT_RUN_PISTOL_RELAXED, false },//never aims
|
||||||
|
{ ACT_RUN_AIM_STIMULATED, ACT_RUN_AIM_PISTOL, false },
|
||||||
|
{ ACT_RUN_AIM_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
||||||
|
{ ACT_RUN_AIM_STEALTH, ACT_RUN_AIM_STEALTH_PISTOL, false },//always aims
|
||||||
|
//End readiness activities
|
||||||
|
#else
|
||||||
// Readiness activities (not aiming)
|
// Readiness activities (not aiming)
|
||||||
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL, false },//never aims
|
{ ACT_IDLE_RELAXED, ACT_IDLE_PISTOL, false },//never aims
|
||||||
{ ACT_IDLE_STIMULATED, ACT_IDLE_STIMULATED, false },
|
{ ACT_IDLE_STIMULATED, ACT_IDLE_STIMULATED, false },
|
||||||
@ -193,6 +227,7 @@ acttable_t CWeaponPistol::m_acttable[] =
|
|||||||
{ ACT_RUN_AIM_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
{ ACT_RUN_AIM_AGITATED, ACT_RUN_AIM_PISTOL, false },//always aims
|
||||||
{ ACT_RUN_AIM_STEALTH, ACT_RUN_AIM_STEALTH_PISTOL, false },//always aims
|
{ ACT_RUN_AIM_STEALTH, ACT_RUN_AIM_STEALTH_PISTOL, false },//always aims
|
||||||
//End readiness activities
|
//End readiness activities
|
||||||
|
#endif
|
||||||
|
|
||||||
// Crouch activities
|
// Crouch activities
|
||||||
{ ACT_CROUCHIDLE_STIMULATED, ACT_CROUCHIDLE_STIMULATED, false },
|
{ ACT_CROUCHIDLE_STIMULATED, ACT_CROUCHIDLE_STIMULATED, false },
|
||||||
@ -210,6 +245,19 @@ acttable_t CWeaponPistol::m_acttable[] =
|
|||||||
|
|
||||||
IMPLEMENT_ACTTABLE( CWeaponPistol );
|
IMPLEMENT_ACTTABLE( CWeaponPistol );
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
// Allows Weapon_BackupActivity() to access the pistol's activity table.
|
||||||
|
acttable_t *GetPistolActtable()
|
||||||
|
{
|
||||||
|
return CWeaponPistol::m_acttable;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetPistolActtableCount()
|
||||||
|
{
|
||||||
|
return ARRAYSIZE(CWeaponPistol::m_acttable);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Constructor
|
// Purpose: Constructor
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -1046,7 +1046,13 @@ WeaponClass_t CBaseCombatWeapon::WeaponClassify()
|
|||||||
Activity idleact = ActivityOverride(ACT_IDLE_ANGRY, NULL);
|
Activity idleact = ActivityOverride(ACT_IDLE_ANGRY, NULL);
|
||||||
switch (idleact)
|
switch (idleact)
|
||||||
{
|
{
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
case ACT_IDLE_ANGRY_REVOLVER:
|
||||||
|
#endif
|
||||||
case ACT_IDLE_ANGRY_PISTOL: return WEPCLASS_HANDGUN;
|
case ACT_IDLE_ANGRY_PISTOL: return WEPCLASS_HANDGUN;
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
case ACT_IDLE_ANGRY_CROSSBOW: // For now, crossbows are rifles
|
||||||
|
#endif
|
||||||
case ACT_IDLE_ANGRY_SMG1:
|
case ACT_IDLE_ANGRY_SMG1:
|
||||||
case ACT_IDLE_ANGRY_AR2: return WEPCLASS_RIFLE;
|
case ACT_IDLE_ANGRY_AR2: return WEPCLASS_RIFLE;
|
||||||
case ACT_IDLE_ANGRY_SHOTGUN: return WEPCLASS_SHOTGUN;
|
case ACT_IDLE_ANGRY_SHOTGUN: return WEPCLASS_SHOTGUN;
|
||||||
|
Loading…
Reference in New Issue
Block a user