Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/game/shared/activitylist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2537,6 +2537,10 @@ void ActivityList_RegisterSharedActivities( void )
REGISTER_SHARED_ACTIVITY( ACT_MP_CYOA_PDA_INTRO );
REGISTER_SHARED_ACTIVITY( ACT_MP_CYOA_PDA_IDLE );
REGISTER_SHARED_ACTIVITY( ACT_MP_CYOA_PDA_OUTRO );

#ifdef NEO
REGISTER_SHARED_ACTIVITY( ACT_VM_IDLE_LOWERED_EMPTY );
#endif

AssertMsg( g_HighestActivity == LAST_SHARED_ACTIVITY - 1, "Not all activities from ai_activity.h registered in activitylist.cpp" );
}
Expand Down
4 changes: 4 additions & 0 deletions src/game/shared/ai_activity.h
Original file line number Diff line number Diff line change
Expand Up @@ -2363,6 +2363,10 @@ typedef enum
ACT_MP_CYOA_PDA_IDLE,
ACT_MP_CYOA_PDA_OUTRO,

#ifdef NEO
ACT_VM_IDLE_LOWERED_EMPTY,
#endif


// this is the end of the global activities, private per-monster activities start here.
LAST_SHARED_ACTIVITY,
Expand Down
8 changes: 7 additions & 1 deletion src/game/shared/neo/weapons/weapon_neobasecombatweapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,13 +989,19 @@ void CNEOBaseCombatWeapon::DryFire()
m_flNextPrimaryAttack = gpGlobals->curtime + GetFastestDryRefireTime(); // SequenceDuration();
}

// An empty weapon idles on its empty sequence where the model has one, such as a pistol with its slide held back
// An empty weapon idles, raised or lowered, on its empty sequence where the model has one,
// such as a pistol with its slide held back
bool CNEOBaseCombatWeapon::SendWeaponAnim(int iActivity)
{
if (iActivity == ACT_VM_IDLE && UsesClipsForAmmo1() && m_iClip1 <= 0 && HasEmptyIdle())
{
iActivity = ACT_VM_IDLE_EMPTY;
}
else if (iActivity == ACT_VM_IDLE_LOWERED && UsesClipsForAmmo1() && m_iClip1 <= 0
&& SelectWeightedSequence(ACT_VM_IDLE_LOWERED_EMPTY) != ACTIVITY_NOT_AVAILABLE)
{
iActivity = ACT_VM_IDLE_LOWERED_EMPTY;
}

return BaseClass::SendWeaponAnim(iActivity);
}
Expand Down
Loading