Forever - Smart sprite clipping dehacked bodies -> monsters

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Forever - Smart sprite clipping dehacked bodies -> monsters

Post by Enjay »

This is something that I have been meaning to mention for... well, for years I guess. However, I suspect that it may just be something that has to be fixed with user preferences.

As an example my NJ Zdoom 2001 uses dehacked to change the dead zombieman into a "super imp". As far as I can remember, everything is set correctly - the new monster works, bleeds, counts towards kills etc. However, when adjust sprite clipping is set to smart, GZdoom is obviously not recognising the new enemy as a living enemy and does not raise it up.

Setting adjust sprite clipping to always fixes it.

If you want to see it, load the WAD and summon deadzombieman. If you have adjust sprite clipping set to smart, a grey imp will appear with his feet somewhere below the floor.

My guess is that GZdoom looks for a flag that is not settable in dehacked when deciding whether to adjust a sprite or not?
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Forever - Smart sprite clipping dehacked bodies -> monsters

Post by Gez »

The condition, for when spriteclip isn't set to "never":

Code: Select all

			if (((thing->player || thing->flags3&MF3_ISMONSTER || thing->IsKindOf(RUNTIME_CLASS(AInventory))) && 
				(thing->flags&MF_ICECORPSE || !(thing->flags&MF_CORPSE))) || gl_spriteclip==2)
Or, in human-readable format:
- if gl_spriteclip is set to always, or
- if it's not a regular corpse (ice corpses are okay) and is either a player, a monster or an inventory item


MF3_ISMONSTER cannot be accessed directly by DeHackEd, but if you give them COUNTKILL it is set as well.

But apparently, while a DeadZombieMan does not have the CORPSE flag, the dehacked DeadZombieMan gained it. (In my custom build of G/ZDoom, I have an "info" console command that gives me a lot of details about an actor, kinda like the "linetarget" command but a lot more talkative and it works on non-shootable things as well, there's just the noblockmap actors that it cannot detect.)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Forever - Smart sprite clipping dehacked bodies -> monsters

Post by Graf Zahl »

Gez wrote:(In my custom build of G/ZDoom, I have an "info" console command that gives me a lot of details about an actor, kinda like the "linetarget" command but a lot more talkative and it works on non-shootable things as well, there's just the noblockmap actors that it cannot detect.)


How about a code submission?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Forever - Smart sprite clipping dehacked bodies -> monsters

Post by Graf Zahl »

The MF_CORPSE flag gets set by the Dehacked 'bits' value for that monster so this is not an engine bug.
Locked

Return to “Closed Bugs”