Fix weapon respawn ownership issues in multiplayer

Removed GetOwnerEntity() from Create() in CBaseCombatWeapon::Respawn(). Prevents weapons from inheriting unintended ownership after respawning, fixing multiplayer pickup issues and potential desync bugs.
This commit is contained in:
speedvoltage 2025-03-10 10:26:39 +01:00
parent a62efecf62
commit 3bcc1681e3

View file

@ -236,7 +236,7 @@ CBaseEntity* CBaseCombatWeapon::Respawn( void )
{
// make a copy of this weapon that is invisible and inaccessible to players (no touch function). The weapon spawn/respawn code
// will decide when to make the weapon visible and touchable.
CBaseEntity *pNewWeapon = CBaseEntity::Create( GetClassname(), g_pGameRules->VecWeaponRespawnSpot( this ), GetLocalAngles(), GetOwnerEntity() );
CBaseEntity *pNewWeapon = CBaseEntity::Create( GetClassname(), g_pGameRules->VecWeaponRespawnSpot( this ), GetLocalAngles() );
if ( pNewWeapon )
{