From d5032663ad016d5c11ee4fa434bbd63097c44816 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 27 Dec 2016 00:32:54 +0100 Subject: [PATCH] - 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. --- src/scripting/thingdef.cpp | 9 +++++++++ src/scripting/thingdef_properties.cpp | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/scripting/thingdef.cpp b/src/scripting/thingdef.cpp index 355cc87f3..ef26d8a50 100644 --- a/src/scripting/thingdef.cpp +++ b/src/scripting/thingdef.cpp @@ -425,6 +425,15 @@ void LoadActors() 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) { diff --git a/src/scripting/thingdef_properties.cpp b/src/scripting/thingdef_properties.cpp index 27b7ab2d3..e54a00963 100644 --- a/src/scripting/thingdef_properties.cpp +++ b/src/scripting/thingdef_properties.cpp @@ -1216,11 +1216,6 @@ DEFINE_PROPERTY(bouncetype, S, Actor) } defaults->BounceFlags &= ~(BOUNCE_TypeMask | BOUNCE_UseSeeSound); 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; - } } //==========================================================================