Wrong death frames with BD v20
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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Wrong death frames with BD v20
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
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
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wrong death frames with BD v20
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.
Re: Wrong death frames with BD v20
Please post a saved game or exact steps to reproduce.drfrag wrote:Start a new game with joymaps3.pk3 to reproduce and changemap several times, to me happens on MAP07 or even earlier.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Wrong death frames with BD v20
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
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
Re: Wrong death frames with BD v20
Take a look at PLASMA.txt
Important things to note:
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.
Code: Select all
ACTOR Plasma_Gun : PlasmaRifle
{
// ...
States
{
Select:
// ...
TNT1 A 0 A_Giveinventory("HasPlasmaWeapon",1)
// ...
}
// ...
}
- 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
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wrong death frames with BD v20
... 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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Wrong death frames with BD v20
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.
@_mental: This time i'll add you to the V20c credits.
- 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
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?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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wrong death frames with BD v20
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.
- 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
Ah, so it requires 1 tic delay then.