[Closed] CMF_CHECKTARGETDEAD... incorrect implementation?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

CMF_CHECKTARGETDEAD... incorrect implementation?

Postby Blue Shadow » Mon Mar 28, 2022 5:51 am

Produceable with: 4.7.1 and later (64 bit)
Test material: https://www.dropbox.com/s/986t7r1uy6ds6 ... o.pk3?dl=1



CMF_CHECKTARGETDEAD is a flag for A_SpawnProjectile. From looking at the source and from testing in the game, I found out that the flag makes the calling actor abort its attack and jump to the See state if its target no longer exists, as opposed to doing all of that if said target is dead, as is implied by how the flag is named and what the wiki says about flag itself.

The attached file has a modified version of the Cyberdemon which use A_SpawnProjectile with the flag in question set, instead of A_CyberAttack. Summon it (it's called Cybor) and let it fight and kill an imp (remains after death) one time, and a lost soul (disappears after death) another time. In the imp's case, the cyberdemon will continue firing at the imp even after it dies, while in the lost soul's case, it'll abort it's attack after the lost soul disappears after death.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: CMF_CHECKTARGETDEAD... incorrect implementation?

Postby Graf Zahl » Mon Mar 28, 2022 9:02 am

That implementation comes right from Heretic's Snake. So it's more a bad name than a bad implementation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: CMF_CHECKTARGETDEAD... incorrect implementation?

Postby Blue Shadow » Mon Mar 28, 2022 11:26 am

I find it odd that nobody brought this up until now. It's been 15 years since the flag was added!
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests