Skip to content

Commit

Permalink
- let Dehacked set the implicit missile flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Sep 14, 2023
1 parent 79ef78e commit 04815f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gamedata/d_dehacked.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,11 @@ static int PatchThing (int thingy)
value[0] &= ~MF_TRANSLUCENT; // clean the slot
vchanged[2] = true; value[2] |= 2; // let the TRANSLUCxx code below handle it
}
if (value[0] & MF_MISSILE)
{
// all missiles in Doom are NOTELEPORT, the other flags are for consistency.
info->flags2 |= MF2_IMPACT | MF2_PCROSS | MF2_NOTELEPORT;
}
if ((info->flags & MF_MISSILE) && (info->flags2 & MF2_NOTELEPORT)
&& !(value[0] & MF_MISSILE))
{
Expand Down Expand Up @@ -4031,12 +4036,14 @@ void ClearBounces(AActor* info)
void SetMissile(AActor* info)
{
info->flags |= MF_MISSILE;
info->flags2 |= MF2_NOTELEPORT | MF2_PCROSS | MF2_IMPACT;
if (info->BounceFlags & BOUNCE_DEH) info->BounceFlags = BOUNCE_Classic | BOUNCE_DEH;
}

void ClearMissile(AActor* info)
{
info->flags &= ~MF_MISSILE;
info->flags2 &= ~(MF2_NOTELEPORT | MF2_PCROSS | MF2_IMPACT);
if (info->BounceFlags & BOUNCE_DEH) info->BounceFlags = BOUNCE_Grenade | BOUNCE_DEH;
}

Expand Down

0 comments on commit 04815f9

Please sign in to comment.