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
6 changes: 6 additions & 0 deletions src/game/server/neo/neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,12 @@ bool CNEO_Player::Weapon_CanSwitchTo(CBaseCombatWeapon *pWeapon)

bool CNEO_Player::BumpWeapon( CBaseCombatWeapon *pWeapon )
{
// We had some cases of dead players chilling around with visible guns.
// While that will be addressed in ShouldDraw, here's a preventive measure
// to avoid that situation from occurring altogether.
if (IsDead())
return false;

auto weaponSlot = pWeapon->GetSlot();
// Only pick up grenades if we don't have grenades of that type NEOTODO (Adam) What if we have less than the maximum of that type (i.e one smoke grenade)? Can I carry more of a grenade than I spawn with?
if (weaponSlot == 3 && Weapon_GetPosition(weaponSlot, pWeapon->GetPosition()))
Expand Down
7 changes: 7 additions & 0 deletions src/game/shared/neo/weapons/weapon_neobasecombatweapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,13 @@ bool CNEOBaseCombatWeapon::ShouldDraw(void)
if (!pOwner)
return true;

// No supernatural gunowners allowed here
if (!pOwner->IsAlive())
{
Assert(false);
return false;
}

C_BasePlayer* pLocalPlayer = C_BasePlayer::GetLocalPlayer();

// carried by local player?
Expand Down
Loading