Decorative dead monsters inherit all states

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.
Post Reply
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Decorative dead monsters inherit all states

Post by Ed the Bat »

If any 'Dead' monster class (i.e. DeadCacodemon) is edited with DeHackEd to gain access to A_Chase, the monster will automatically have whatever Missile/Melee state(s) the 'live' monster had. This means DeadCacodemon will have the Missile state from Cacodemon, even though DeadCacodemon should not have a Missile state unless DeHackEd explicitly gives it one. This did not used to be the case. I am unsure when this regression first occurred, but Zandronum is old enough not to present it.

The attached example is trimmed out from a DeHackEd mod, last updated April 2000. DeadCacodemon is meant to be transformed into a slightly modified Demon, meaning only melee attacks. Given enough distance, he will now change into a Cacodemon for a missile attack.
Attachments
deadmontest.pk3
Launch any Doom game, summon 'DeadCacodemon'
(434 Bytes) Downloaded 24 times
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Decorative dead monsters inherit all states

Post by _mental_ »

The problem is Skip_Super doesn't reset states since transition to ZScript. The moment this property applied states are not fully initialized. I found no obvious solution yet.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Decorative dead monsters inherit all states

Post by Ed the Bat »

I don't normally suggest workarounds, but after one week and seeing that this one seems more complicated than expected, perhaps a stopgap could be to manually remove all states in the child classes? For instance:

Code: Select all

class DeadDoomImp : DoomImp
{
	States
	{
	Spawn:
		Goto Super::Death+4;
	See:
	Melee:
	Missile:
	Pain:
	Death:
	XDeath:
	Raise:
		Stop;
	}
}
The dead monsters in Doom, and GoldWandPuff2, seem to be the only actors in all of gzdoom.pk3 to use Skip_Super.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Decorative dead monsters inherit all states

Post by Graf Zahl »

You forget user maps. The property needs to work.
Last edited by Graf Zahl on Sat Jan 13, 2018 2:09 pm, edited 1 time in total.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Decorative dead monsters inherit all states

Post by Ed the Bat »

I didn't forget user maps. I know this would not be a complete solution, hence why I called it a stopgap.

To play devil's advocate, though, I am genuinely curious how many user mods have used skip_super. I feel it's a somewhat esoteric command, and I'm having trouble thinking of any item in my collection that has used it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Decorative dead monsters inherit all states

Post by Graf Zahl »

Ed the Bat wrote:I don't normally suggest workarounds, but after one week and seeing that this one seems more complicated than expected
Not really. You merely have to understand what happened here and the solution presents itself on its own.
Post Reply

Return to “Closed Bugs [GZDoom]”