- give P_ExplodeMissile a damage type when being called from P_DamageMobj

This commit is contained in:
Christoph Oelckers 2019-09-09 15:41:09 +02:00
parent 21a621031b
commit 62b0fc5f4e
3 changed files with 4 additions and 4 deletions

View file

@ -352,7 +352,7 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags, FName MeansOf
if (flags & MF_MISSILE) if (flags & MF_MISSILE)
{ // [RH] When missiles die, they just explode { // [RH] When missiles die, they just explode
P_ExplodeMissile (this, NULL, NULL); P_ExplodeMissile (this, NULL, NULL, false, MeansOfDeath);
return; return;
} }
// [RH] Set the target to the thing that killed it. Strife apparently does this. // [RH] Set the target to the thing that killed it. Strife apparently does this.

View file

@ -111,7 +111,7 @@ void P_BloodSplatter (const DVector3 &pos, AActor *originator, DAngle hitangle);
void P_BloodSplatter2 (const DVector3 &pos, AActor *originator, DAngle hitangle); void P_BloodSplatter2 (const DVector3 &pos, AActor *originator, DAngle hitangle);
void P_RipperBlood (AActor *mo, AActor *bleeder); void P_RipperBlood (AActor *mo, AActor *bleeder);
int P_GetThingFloorType (AActor *thing); int P_GetThingFloorType (AActor *thing);
void P_ExplodeMissile (AActor *missile, line_t *explodeline, AActor *target, bool onsky = false); void P_ExplodeMissile (AActor *missile, line_t *explodeline, AActor *target, bool onsky = false, FName damageType = NAME_None);
AActor *P_OldSpawnMissile(AActor *source, AActor *owner, AActor *dest, PClassActor *type); AActor *P_OldSpawnMissile(AActor *source, AActor *owner, AActor *dest, PClassActor *type);
AActor *P_SpawnMissile (AActor* source, AActor* dest, PClassActor *type, AActor* owner = NULL); AActor *P_SpawnMissile (AActor* source, AActor* dest, PClassActor *type, AActor* owner = NULL);

View file

@ -1340,7 +1340,7 @@ bool AActor::Massacre ()
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target, bool onsky) void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target, bool onsky, FName damageType)
{ {
// [ZZ] line damage callback // [ZZ] line damage callback
if (line) if (line)
@ -1372,7 +1372,7 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target, bool onsky)
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, NAME_Extreme); if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, NAME_Extreme);
} }
} }
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death); if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, damageType);
if (onsky || (line != NULL && line->special == Line_Horizon)) if (onsky || (line != NULL && line->special == Line_Horizon))
{ {