Browse Source

possible crash fix for DeathNotice

hl_urbicide
nillerusr 4 years ago
parent
commit
b16001bc1a
  1. 6
      dlls/multiplay_gamerules.cpp

6
dlls/multiplay_gamerules.cpp

@ -709,12 +709,12 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller,
const char *tau = "tau_cannon"; const char *tau = "tau_cannon";
const char *gluon = "gluon gun"; const char *gluon = "gluon gun";
if( pevInflictor )
{
if( pKiller->flags & FL_CLIENT ) if( pKiller->flags & FL_CLIENT )
{ {
killer_index = ENTINDEX( ENT( pKiller ) ); killer_index = ENTINDEX( ENT( pKiller ) );
if( pevInflictor )
{
if( pevInflictor == pKiller ) if( pevInflictor == pKiller )
{ {
// If the inflictor is the killer, then it must be their current weapon doing the damage // If the inflictor is the killer, then it must be their current weapon doing the damage
@ -730,11 +730,11 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller,
killer_weapon_name = STRING( pevInflictor->classname ); // it's just that easy killer_weapon_name = STRING( pevInflictor->classname ); // it's just that easy
} }
} }
}
else else
{ {
killer_weapon_name = STRING( pevInflictor->classname ); killer_weapon_name = STRING( pevInflictor->classname );
} }
}
// strip the monster_* or weapon_* from the inflictor's classname // strip the monster_* or weapon_* from the inflictor's classname
if( strncmp( killer_weapon_name, "weapon_", 7 ) == 0 ) if( strncmp( killer_weapon_name, "weapon_", 7 ) == 0 )

Loading…
Cancel
Save