(old?) Projectiles warping when they die deal damage 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
Turret49
Posts: 92
Joined: Sat Aug 29, 2015 1:40 pm

(old?) Projectiles warping when they die deal damage twice

Post by Turret49 »

I don't know how long this bug's been around, found it in 3.3.1 and it's still there in 3.3.2. Even my old 2.4.0 version of GZDoom seems to have this bug!
When a projectile warps on the same tic it dies from hitting something, actors it collides with at its warp destination tend to also get hurt, meaning a projectile can hit (at least?) two different actors or the same actor twice. Notably even when the WARPF_NOCHECKPOSITION flag is set this still happens.

Attached is a .wad with a test pistol that fires a projectile with this DECORATE code:

Code: Select all

actor BuggedProjectile : DoomImpBall
{
  Damage (10)
  States
  {
  XDeath:
	//TNT1 A 1 // bug doesn't occur if there's a delay
	TNT1 A 0 A_Warp(AAPTR_Default,10,10,10,0,WARPF_NOCHECKPOSITION)
  goto Super::Death
  }
}
You can quickly get to the test pistol by inputting IDFA and pressing 2. Note that the Damage (10) projectile often kills the zombies in Doom 2's MAP01 in one shot, and imps three.
Attachments
warpbug.wad
(971 Bytes) Downloaded 25 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (old?) Projectiles warping when they die deal damage twi

Post by Graf Zahl »

A clear case of "Don't do that!" If you want to have special actions in a projectile's or monster's death state you have to add a one-tic delay. Otherwise the code runs right at the time the actor dies which can have unforeseeable side effects.
Turret49
Posts: 92
Joined: Sat Aug 29, 2015 1:40 pm

Re: (old?) Projectiles warping when they die deal damage twi

Post by Turret49 »

Alright, I couldn't find anything about this from searching, thanks for clarifying. It's just something that happens as a quirk of the death code and should be worked around.
Post Reply

Return to “Closed Bugs [GZDoom]”