A_BossDeath doesn't fully check replaced actors

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!

A_BossDeath doesn't fully check replaced actors

Postby Major Cooke » Tue Sep 10, 2019 11:32 am

Load the attached file and start on MAP07 (hard skill to ensure the fatsos are randomized). Kill all of one color, and the walls will lower, which is not supposed to happen.

CheckReplacee was developed with the idea of not needing to to use RandomSpawners or any custom spawners. In particular, RandomSpawners rely upon the BOSS flag, which makes sense for cyberdemon and spider mastermind classes, but not barons, fatsos and arachnotrons.

The problematic code lies in CheckBossDeath function in p_enemy.cpp:

Code: Select allExpand view
while ( (other = iterator.Next ()) )
{
   if (other != actor &&
      (other->health > 0 || (other->flags & MF_ICECORPSE))
      && other->GetClass() == actor->GetClass())
   { // Found a living boss
      // [RH] Frozen bosses don't count as dead until they shatter
      return false;
   }
}


In particular this only compares direct classes instead of checking the replacees. As seen in my example package, I have an event handler set up to indicate the replacee of Fatsos 1 & 2 to be Fatso itself.
Attachments
BossDeathBug.pk3
(570 Bytes) Not downloaded yet
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: A_BossDeath doesn't fully check replaced actors

Postby Gez » Tue Sep 10, 2019 12:06 pm

Major Cooke wrote:In particular, RandomSpawners rely upon the BOSS flag, which makes sense for cyberdemon and spider mastermind classes, but not barons, fatsos and arachnotrons.

It looks for the BOSSDEATH flag too.

https://github.com/coelckers/gzdoom/blo ... #L235:L241
Gez
 
 
 
Joined: 06 Jul 2007


Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests