# HG changeset patch # User Adam Kaminski # Date 1642036998 18000 # Wed Jan 12 20:23:18 2022 -0500 # Node ID 69302e3c9950fe9d3b6b0c6477516c84fdec0cbb # Parent ce920358391d3ccf89f2f497b27dbb735b5a26e9 Fixed: projectiles and bulletpuffs didn't trigger GAMEEVENT_ACTOR_SPAWNED if "ForceSpawnEventScripts" was enabled. diff -r ce920358391d -r 69302e3c9950 src/p_mobj.cpp --- a/src/p_mobj.cpp Wed Jan 12 16:14:23 2022 -0500 +++ b/src/p_mobj.cpp Wed Jan 12 20:23:18 2022 -0500 @@ -5188,7 +5188,13 @@ // script types like ENTER, RETURN, and RESPAWN. if (( player == NULL ) && (( STFlags & STFL_NOSPAWNEVENTSCRIPT ) == false )) { - bool bNotImportant = (( flags & ( MF_NOBLOCKMAP|MF_NOSECTOR )) || IsKindOf( RUNTIME_CLASS( AHexenArmor ))); + bool bNotImportant = false; + + // [AK] Projectiles and BulletPuffs can have NOBLOCKMAP enabled but that doesn't make them unimportant. + if (( flags & MF_NOBLOCKMAP ) && ((( flags & MF_MISSILE ) == false ) && ( IsKindOf( PClass::FindClass( NAME_BulletPuff )) == false ))) + bNotImportant = true; + else if (( flags & MF_NOSECTOR ) || ( IsKindOf( RUNTIME_CLASS( AHexenArmor )))) + bNotImportant = true; // [AK] If we want to force GAMEEVENT_ACTOR_SPAWNED on every actor, then at least ignore // the less imporant actors unless they have the USESPAWNEVENTSCRIPT flag enabled.