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: 5 additions & 1 deletion src/game/server/hl2mp/hl2mp_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,12 @@ bool CHL2MP_Player::BumpWeapon( CBaseCombatWeapon *pWeapon )
}
#endif

// Don't let the player fetch weapons through walls (use MASK_SOLID so that you can't pickup through windows)
#ifdef NEO
if( GetAbsOrigin() != pWeapon->GetAbsOrigin() && !pWeapon->FVisible( this, MASK_SOLID ) && !(GetFlags() & FL_NOTARGET) )
#else
if( !pWeapon->FVisible( this, MASK_SOLID ) && !(GetFlags() & FL_NOTARGET) )
#endif // NEO
// Don't let the player fetch weapons through walls (use MASK_SOLID so that you can't pickup through windows)
{
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/server/neo/neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2825,7 +2825,7 @@ void GiveDet(CNEO_Player* pPlayer)
}
else
{
pent->SetAbsOrigin(pPlayer->EyePosition());
pent->SetLocalOrigin(pPlayer->GetLocalOrigin());
pent->AddSpawnFlags(SF_NORESPAWN);

auto pWeapon = dynamic_cast<CNEOBaseCombatWeapon*>((CBaseEntity*)pent);
Expand Down Expand Up @@ -2921,7 +2921,7 @@ void CNEO_Player::GiveLoadoutWeapon(void)
return;
}

pEnt->SetAbsOrigin(EyePosition());
pEnt->SetLocalOrigin(GetLocalOrigin());
pEnt->AddSpawnFlags(SF_NORESPAWN);

CNEOBaseCombatWeapon *pNeoWeapon = dynamic_cast<CNEOBaseCombatWeapon*>((CBaseEntity*)pEnt);
Expand Down
7 changes: 2 additions & 5 deletions src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6070,12 +6070,9 @@ CBaseEntity *CBasePlayer::GiveNamedItem( const char *pszName, int iSubType )
Msg( "NULL Ent in GiveNamedItem!\n" );
return NULL;
}
#ifdef NEO
pent->SetAbsOrigin(EyePosition());
#else

pent->SetLocalOrigin( GetLocalOrigin() );
#endif
pent->AddSpawnFlags( SF_NORESPAWN );
pent->AddSpawnFlags(SF_NORESPAWN);

CBaseCombatWeapon *pWeapon = dynamic_cast<CBaseCombatWeapon*>( (CBaseEntity*)pent );
if ( pWeapon )
Expand Down