Wrong death frames with BD v20

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
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Wrong death frames with BD v20

Post by drfrag »

GZDoom 3.3.2 but it's an old thing. I think this time is an engine bug, happens with several wads (.pk3 i think) after loading several maps. With a BLOOD fixed brutalv20.pk3 or with my brutalv20c_UP.pk3. The death frames when you shoot small monsters in the head are wrong and plasma death is shown instead.
Start a new game with joymaps3.pk3 to reproduce and changemap several times, to me happens on MAP07 or even earlier.
https://www.doomworld.com/idgames/level ... s/joymaps3
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wrong death frames with BD v20

Post by Graf Zahl »

Unless you can reproduce this without BD v20 I won't investigate. There are so many scripting bugs in that mod that it is pointless. Yes, I have seen some that caused similar effects because the convoluted code did not execute what its author expected.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Wrong death frames with BD v20

Post by _mental_ »

drfrag wrote:Start a new game with joymaps3.pk3 to reproduce and changemap several times, to me happens on MAP07 or even earlier.
Please post a saved game or exact steps to reproduce.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Wrong death frames with BD v20

Post by drfrag »

With ZDL:
file0=C:\temp\gzdoom3\lights.pk3
file1=C:\temp\gzdoom3\brightmaps.pk3
file2=C:\temp\gzdoom\brutalv20b.pk3
file3=C:\temp\gzdoom\joymaps3.pk3

Fixed BDv20 (BLOOD.TXT), just start a new game and changemap several times, now happened on MAP04, it can be the same map. Blow their heads off.
Also happens with brutalv20c_UP.pk3. Attached savegame anyway.

Fixed BDv20 if needed can be downloaded from here:
http://www.moddb.com/mods/brutal-doom/d ... cy-edition :mrgreen:
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Wrong death frames with BD v20

Post by _mental_ »

Take a look at PLASMA.txt

Code: Select all

ACTOR Plasma_Gun : PlasmaRifle
{
	// ...
	States
	{
	Select:
		// ...
		TNT1 A 0 A_Giveinventory("HasPlasmaWeapon",1)
		// ...
	}
	// ...
}
Important things to note:
  • Zero tic duration frame that gives HasPlasmaWeapon inventory item
  • The Joy of Mapping resets player's inventory after each level
  • When weapon-type inventory items is removed, engine tries to select a remaining weapon
Let's assume that player had rocket launcher and plasma gun. When the first one is removed, the second is chosen and it enters its Select state.
All zero tic duration frames are executed in process. So, HasPlasmaWeapon is given to a player. This won't happen if the first frame would have one tic duration.
During destruction of plasma gun it doesn't enter its Deselect state and HasPlasmaWeapon remains in the inventory.

This is how it works at the moment.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wrong death frames with BD v20

Post by Graf Zahl »

... and that's how Doom has been working for 25 years. This cannot be changed, annoying as it may be. The entire state selection mechanism is broken by design. I've known that for all those years but changing it will incur so many broken stuff that it's simply not an option.
I cannot say this clearly enough, as I had to close a bug caused by the same thing last week: Do not execute any critical action right after a state label! This can have unforeseen side effects that are impossible to fix in a generic fashion.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Wrong death frames with BD v20

Post by drfrag »

Thanks guys, fixed mod side. Also the Thing_ChangeTID issue for the RL and BFG (but it worked).
@_mental: This time i'll add you to the V20c credits. :)
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Wrong death frames with BD v20

Post by Major Cooke »

Graf Zahl wrote: I cannot say this clearly enough, as I had to close a bug caused by the same thing last week: Do not execute any critical action right after a state label! This can have unforeseen side effects that are impossible to fix in a generic fashion.
ANY state label? Only now have I actually heard of this happening for things outside of Spawn. So you always recommend something like #### # 0 right after it first and then doing the rest of the code?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wrong death frames with BD v20

Post by Graf Zahl »

Any SetState call will execute all functions assigned to the first state in a sequence and all preceding ones that follow with 0-duration. Whether you want that or not is something only you can decide. The main problem is that some of the original actors and many Dehacked mods depend on it.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Wrong death frames with BD v20

Post by Major Cooke »

Ah, so it requires 1 tic delay then.
Post Reply

Return to “Closed Bugs [GZDoom]”