TAG 667 not activated thru MAPINFO with same replacements

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

TAG 667 not activated thru MAPINFO with same replacements

Postby drfrag » Thu Jul 09, 2020 5:13 am

There's a problem in MAP07 when you replace both monster types with barons, then only tag 666 is activated. It happens with MAPINFO and a custom skill but not with DECORATE.
Code: Select allExpand view
skill doggie
{

   ReplaceActor = "Arachnotron", "BaronOfHell"
   ReplaceActor = "Fatso", "BaronOfHell"
   SpawnFilter = Hard
   Name = "Doggie"
}

SetReplacement is called from ParseActorHeader and ZCCDoomCompiler::InitDefaults when substitutions are performed via DECORATE or ZScript i believe.
Proposed fix:
Code: Select allExpand view
diff --git a/src/playsim/p_enemy.cpp b/src/playsim/p_enemy.cpp
index cc54174d1..fd71e8321 100644
--- a/src/playsim/p_enemy.cpp
+++ b/src/playsim/p_enemy.cpp
@@ -3153,13 +3153,17 @@ void A_BossDeath(AActor *self)
    }
    if (Level->flags & LEVEL_MAP07SPECIAL)
    {
+      PClassActor *fatso = PClass::FindActor(NAME_Fatso);
+      PClassActor *arachnotron = PClass::FindActor(NAME_Arachnotron);
+      bool samereplacement = fatso->GetReplacement(Level) == arachnotron->GetReplacement(Level);
       if (type == NAME_Fatso)
       {
          Level->EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, 1., 0, -1, 0, false);
-         return;
+         if (!samereplacement)
+            return;
       }
-     
-      if (type == NAME_Arachnotron)
+
+      if (type == NAME_Arachnotron || samereplacement)
       {
          Level->EV_DoFloor (DFloor::floorRaiseByTexture, NULL, 667, 1., 0, -1, 0, false);
          return;
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest