Skip to content
Merged
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
18 changes: 15 additions & 3 deletions mp/src/game/server/neo/neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1868,6 +1868,11 @@ bool CNEO_Player::Weapon_Switch( CBaseCombatWeapon *pWeapon,
{
ShowCrosshair(false);
Weapon_SetZoom(false);
const auto activeWeapon = GetActiveWeapon();
if (activeWeapon)
{
activeWeapon->StopWeaponSound(RELOAD_NPC);
}

return BaseClass::Weapon_Switch(pWeapon, viewmodelindex);
}
Expand Down Expand Up @@ -1895,10 +1900,11 @@ bool CNEO_Player::Weapon_CanSwitchTo(CBaseCombatWeapon *pWeapon)
if (!pWeapon->CanDeploy())
return false;

if (GetActiveWeapon())
const auto activeWeapon = GetActiveWeapon();
if (activeWeapon)
{
if (!GetActiveWeapon()->CanHolster())
return false;
if (!activeWeapon->CanHolster())
return false;
}

return true;
Expand Down Expand Up @@ -2025,6 +2031,12 @@ void CNEO_Player::Weapon_Drop( CBaseCombatWeapon *pWeapon,
return; // Return early to not drop weapon
}
}

if (!pWeapon)
return;

pWeapon->m_bInReload = false;
pWeapon->StopWeaponSound(RELOAD_NPC);
BaseClass::Weapon_Drop(pWeapon, pvecTarget, pVelocity);
}

Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/shared/basecombatweapon_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ bool CBaseCombatWeapon::DefaultReload( int iClipSize1, int iClipSize2, int iActi
// On NEO, we want to always give out reload sound cues
#if defined(CLIENT_DLL) || defined(NEO)
// Play reload
WeaponSound( RELOAD );
CBaseCombatWeapon::WeaponSound(RELOAD_NPC);
#endif
SendWeaponAnim( iActivity );

Expand Down