- fixed: All missiles which can bounce off actors need the CANPASS/PASSMOBJ flag so setting this in the 'bouncetype' property is insufficient, it needs to be done when the actor has been completely parsed.

This commit is contained in:
Christoph Oelckers 2016-12-27 00:32:54 +01:00
parent e9574276a5
commit a37db1c4d7
2 changed files with 9 additions and 5 deletions

View File

@ -425,6 +425,15 @@ void LoadActors()
CheckForUnsafeStates(ti); CheckForUnsafeStates(ti);
} }
// ensure that all actor bouncers have PASSMOBJ set.
auto defaults = GetDefaultByType(ti);
if (defaults->BounceFlags & (BOUNCE_Actors | BOUNCE_AllActors))
{
// PASSMOBJ is irrelevant for normal missiles, but not for bouncers.
defaults->flags2 |= MF2_PASSMOBJ;
}
} }
if (FScriptPosition::ErrorCounter > 0) if (FScriptPosition::ErrorCounter > 0)
{ {

View File

@ -1216,11 +1216,6 @@ DEFINE_PROPERTY(bouncetype, S, Actor)
} }
defaults->BounceFlags &= ~(BOUNCE_TypeMask | BOUNCE_UseSeeSound); defaults->BounceFlags &= ~(BOUNCE_TypeMask | BOUNCE_UseSeeSound);
defaults->BounceFlags |= flags[match]; defaults->BounceFlags |= flags[match];
if (defaults->BounceFlags & (BOUNCE_Actors | BOUNCE_AllActors))
{
// PASSMOBJ is irrelevant for normal missiles, but not for bouncers.
defaults->flags2 |= MF2_PASSMOBJ;
}
} }
//========================================================================== //==========================================================================