Fixed tons of monsters not working/crashing when attacking HL monsters.

This commit is contained in:
Giegue
2023-03-16 15:58:09 -03:00
parent bc7633bf9c
commit ecf3bd9a3d
13 changed files with 69 additions and 21 deletions

View File

@@ -295,13 +295,15 @@ void CMSqueakGrenade::SuperBounceTouch( edict_t *pOther )
// ALERT( at_console, "hit enemy\n");
ClearMultiDamage( );
if (UTIL_IsPlayer(pOther))
if (UTIL_IsPlayer(pOther))
UTIL_TraceAttack(pOther, pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
else if (pOther->v.euser4 != NULL)
{
else if (pOther->v.euser4 != NULL)
{
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
pMonster->TraceAttack(pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
}
}
else
UTIL_TraceAttack(pOther, pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
ApplyMultiDamage( pev, pev );