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

@@ -113,7 +113,7 @@ void CSquidSpit::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity
pSpit->SetThink ( &CSquidSpit::Animate );
pSpit->pev->nextthink = gpGlobals->time + 0.1;
pSpit->SetTouch ( &CSquidSpit::SpitTouch );
pSpit->SetTouch ( &CSquidSpit::SpitTouch );
}
void CSquidSpit :: SpitTouch ( edict_t *pOther )
@@ -166,6 +166,8 @@ void CSquidSpit :: SpitTouch ( edict_t *pOther )
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
pMonster->TakeDamage ( pev, pev, gSkillData.bullsquidDmgSpit, DMG_GENERIC );
}
else
UTIL_TakeDamageExternal( pOther, pev, pev, gSkillData.bullsquidDmgSpit, DMG_GENERIC );
}
SetThink ( &CSquidSpit::SUB_Remove );