Browse Source

Deactivate satchels on disconnect.

halloween
Night Owl 8 years ago
parent
commit
4800c0d54c
  1. 12
      dlls/client.cpp

12
dlls/client.cpp

@ -110,21 +110,25 @@ void ClientDisconnect( edict_t *pEntity ) @@ -110,21 +110,25 @@ void ClientDisconnect( edict_t *pEntity )
WRITE_STRING( text );
MESSAGE_END();
CSound *pSound;
pSound = CSoundEnt::SoundPointerForIndex( CSoundEnt::ClientSoundIndex( pEntity ) );
{
CSound *pSound = CSoundEnt::SoundPointerForIndex( CSoundEnt::ClientSoundIndex( pEntity ) );
// since this client isn't around to think anymore, reset their sound.
if( pSound )
{
pSound->Reset();
}
}
// since the edict doesn't get deleted, fix it so it doesn't interfere.
pEntity->v.takedamage = DAMAGE_NO;// don't attract autoaim
pEntity->v.solid = SOLID_NOT;// nonsolid
UTIL_SetOrigin( &pEntity->v, pEntity->v.origin );
CBasePlayer *pl = (CBasePlayer *)CBaseEntity::Instance( pEntity );
if( pl->HasNamedPlayerItem( "weapon_satchel" ) )
{
DeactivateSatchels( pl );
}
g_pGameRules->ClientDisconnected( pEntity );
}

Loading…
Cancel
Save