[Zandronum-latest]Projectiles with +SHOOTABLE can die twice

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
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

[Zandronum-latest]Projectiles with +SHOOTABLE can die twice

Post by Edward-san »

Bug report.
Projectiles which got this flag and have some delay before explosion(A_Explode in my case) can die twice. When hit the wall they enter their Death state and then explode but damaging themselves die again. And what is most important they explode again! This bug could be avoided(and is avoided in my case) placing A_UnsetShootable in Death state. Howewer this is not intuitive.
A way to solve it is making projectiles become unshootable as they enter Death state automatically.
Attached wad.

Is it intended behaviour?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by Gez »

Meh.
This bug could be avoided(and is avoided in my case) placing A_UnsetShootable in Death state. Howewer this is not intuitive.
Shootable projectiles are not intuitive either. The Doom engine was never designed with the idea that projectiles can be shot. They use their Death state, but they are directly sent to it when they impact, instead of being sent to it by being explicitly killed. (They keep all their hit points.)

Also, I see this as no different from having to use A_Fall (or A_NoBlocking) in the death state sequence of a monster.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by NeuralStunner »

You can also begin the death state with [wiki]A_Die[/wiki]. If it "died"by impact it'll immediately "re-die" bay damage. If it "died" by damage, it can't "re-die" so it'll proceed.

Code: Select all

Death:
	BOOM A 0 A_Die
	BOOM A 4 A_Explode
	BOOM BCD 4
	
In that case I'm not sure the engine needs an override, likely wouldn't be difficult but it's simple enough on the modder's side too.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by Xaser »

Doesn't A_Die immediately jump to Death? That looks infinte-loop-y to me, unless it's got a special check to never re-die.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by NeuralStunner »

If the thing is already health-dead, the function does nothing. It's fine.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by randi »

Mehh, might as well. Changed in r3827.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by DoomRater »

Aha, that DOES explain why the Duke pipebombs were shootable on the ground before but not now. Now that I know this is now the intentional behavior, I can make sure upon normal death that shootable is re-enabled.

One question though- does this activate when a projectile bounces off a wall as well? If so I might actually ask if it can be reverted...
Guest

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by Guest »

Only if they "die" when they hit the wall.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [Zandronum-latest]Projectiles with +SHOOTABLE can die tw

Post by DoomRater »

That's fine, the code for pipebombs only needs to set shootable again when they reach that point and reset when forcibly blown up by shot or when told to detonate. Twas funny getting stuffed throwing pipebombs at Hexen monsters and having them blow up in my face!
Post Reply

Return to “Closed Bugs [GZDoom]”