MantisBT - Zandronum
View Issue Details
0002862Zandronum[All Projects] Bugpublic2016-10-07 00:462017-06-13 18:22
Toxicity 
 
highmajoralways
closedno change required 
MicrosoftWindowsXP/Vista/7
 
 
0002862: Using a random value for A_Explode's radius parameter is broken in Zan 3.0
'https://youtu.be/9c1HRLzjisU [^]'

Doom64 Unabsolved's taser uses a projectile which calls A_Explode every few tics with a damage value of only 1 and a random range each call between 8 and 56 units. "A_Explode(1,random(8,56),0)"

In Zan 2.0, this functions as intended. However I noticed when running the mod with 3.0 that the taser is now horribly broken to the point of being ineffective in gameplay. Monsters only seem to painchance 1/10th as often as they did in 2.0. Works fine in the latest GZDoom.

I have a feeling it's because only the lowest value of the random radius range is being used, because every other aspect of the projectile is behaving correctly. If you watch the video closely, you'll notice that the monsters don't painchance at all when being tased before being woken up (when the projectile is exploding at the very edge of their hitbox). However, once the monster wakes up and walks "through" the projectile, they start getting pained (and actually die very quickly, due to all the projectiles which are now "stacked" affecting them all at once).
Download Unabsolved (you can use just the 2.0 version since the taser code is the same there as it is in the 3.0 version of the mod):
'http://www.mediafire.com/file/6hn47505cu52xo5/sd64_unabsolved_alpha9-zan2.0.pk3 [^]'

Run the mod with Zan2.0. Cycle your sidearm (R by default) to the Taser and use it on any monster. Should work fine.

Now run the mod with Zan 3.0 and try the Taser on any monster. Very broken.
I'll make a minimum example pk3 tomorrow. But the code for the projectile is this (yes it's messy):

ACTOR ZapperBeam : MageWandMissile
{
  Speed 160//200
  Radius 8
  Height 8
  Damage 0//2
  //Decal DoomImpScorch
  damagetype "Taser"
  deathsound ""//"BFGArc"
  seesound "Taser/zap"
  -RIPPER
  -CANNOTPUSH
  +NODAMAGETHRUST
  +STRIFEDAMAGE
  +NOTIMEFREEZE
  +BLOODLESSIMPACT
  +NOBLOODDECALS
  +MTHRUSPECIES
  //scale 0.5
  renderstyle translucent//add
  alpha 0.9
  states
  {
  Spawn:
    TNT1 A 1//2
    Goto Snoot
  Death:
    TFOG A 0 A_Playsoundex("Taser/Wall","soundslot6")
    TNT1 A 0 A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-10, 10), random(-10, 10), random(-2, 6), random(-360,360), SXF_CLIENTSIDE, 64)
  Snoot:
    TNT1 A 0 A_ChangeFlag("MISSILE",0)
    TNT1 A 0 A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-10, 10), random(-10, 10), random(-2, 6), random(-360,360), SXF_CLIENTSIDE, 64)
    TFOG A 0 A_Stop
    BFB2 DDEEFF 1 BRIGHT A_FadeOut(0.1)
    Stop
  //Crash:
  XDeath:
    TFOG A 0 A_Stop
    TFOG A 0 A_Playsoundex("Taser/Hit","soundslot6")
    BFB2 E 2 Bright A_Fadeout(0.09)
    TNT1 A 0 Bright A_SpawnItemEx("ElectricArc_Blue", 0, 0, 0, 0, 0, 0, random(-180,180), SXF_CLIENTSIDE, 0)
    RFOG A 0 Bright A_Explode(1,random(8,56),0) // electricution
    BFB2 D 2 Bright A_Fadeout(0.09)
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 64)
    RFOG B 0 Bright A_Explode(1,random(8,56),0)
    TFOG A 0 A_Playsoundex("Taser/Hit","soundslot6")
    BFB2 E 4 Bright A_Fadeout(0.09)
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 64)
    RFOG A 0 Bright A_Explode(1,random(8,48),0)
    BFB2 F 8 Bright A_Fadeout(0.09)
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 64)
    RFOG B 0 Bright A_Explode(1,random(8,48),0)
    TFOG A 0 A_Playsoundex("Taser/Hit","soundslot6")
    BFB2 E 12 Bright A_Fadeout(0.09)
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 96)
    RFOG C 0 Bright A_Explode(1,random(8,40),0)
    BFB2 D 16 Bright A_Fadeout(0.09)
    TFOG A 0 A_Playsoundex("Taser/Hit","soundslot6")
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 96)
    RFOG D 0 Bright A_Explode(1,random(8,40),0)
    BFB2 E 20 Bright A_Fadeout(0.09)
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 96)
    RFOG E 0 Bright A_Explode(1,random(8,36),0)
    BFB2 F 24 Bright A_Fadeout(0.09)
    TNT1 AAA 0 Bright A_SpawnItemEx("BluePlasmaSpark", 0, 0, 0, random(-8, 8), random(-8, 8), random(2, 12), random(-360,360), SXF_CLIENTSIDE, 128)
    RFOG F 0 Bright A_Explode(1,random(8,36),0)
    stop
  }
}
No tags attached.
? exploderadius.wad (3,631) 2016-10-14 09:39
/tracker/file_download.php?file_id=1945&type=bug
? exploderadius_02.wad (631) 2016-10-19 17:55
/tracker/file_download.php?file_id=1958&type=bug
Issue History
2016-10-07 00:46ToxicityNew Issue
2016-10-09 12:03Torr SamahoNote Added: 0015838
2016-10-09 12:03Torr SamahoStatusnew => feedback
2016-10-09 17:54Torr SamahoTarget Version => 3.0
2016-10-14 09:39unknownnaFile Added: exploderadius.wad
2016-10-14 09:42unknownnaNote Added: 0015982
2016-10-14 09:52unknownnaNote Edited: 0015982bug_revision_view_page.php?bugnote_id=15982#r9726
2016-10-14 09:53unknownnaStatusfeedback => confirmed
2016-10-14 09:57unknownnaNote Edited: 0015982bug_revision_view_page.php?bugnote_id=15982#r9727
2016-10-14 11:09Edward-sanNote Added: 0015986
2016-10-14 11:09Edward-sanStatusconfirmed => feedback
2016-10-14 11:10Edward-sanNote Edited: 0015986bug_revision_view_page.php?bugnote_id=15986#r9729
2016-10-18 19:21Edward-sanNote Added: 0016050
2016-10-18 19:21Edward-sanNote Edited: 0016050bug_revision_view_page.php?bugnote_id=16050#r9783
2016-10-19 17:55unknownnaFile Added: exploderadius_02.wad
2016-10-19 17:59unknownnaNote Added: 0016067
2016-10-19 19:20Edward-sanNote Added: 0016068
2016-10-19 19:33Edward-sanNote Edited: 0016068bug_revision_view_page.php?bugnote_id=16068#r9800
2016-11-06 17:01Torr SamahoNote Added: 0016153
2016-11-21 16:34Edward-sanNote Added: 0016256
2017-04-23 19:53Torr SamahoNote Added: 0017290
2017-06-10 19:22Ru5tK1ngNote Added: 0017813
2017-06-10 19:28CombinebobntNote Added: 0017814
2017-06-13 18:22Ru5tK1ngNote Added: 0017824
2017-06-13 18:22Ru5tK1ngStatusfeedback => closed
2017-06-13 18:22Ru5tK1ngResolutionopen => no change required
2017-06-13 18:22Ru5tK1ngProduct Version3.0-beta =>
2017-06-13 18:22Ru5tK1ngTarget Version3.0 =>

Notes
(0015838)
Torr Samaho   
2016-10-09 12:03   
Does this also happen offline? If so, does it happen in GZDoom 1.8.6?

Quote
I'll make a minimum example pk3 tomorrow.

That would be very helpful.
(0015982)
unknownna   
2016-10-14 09:42   
(edited on: 2016-10-14 09:57)
I made an example wad with the DECORATE code posted above. Let me know if it's still broken for you. So far it seemed to work the same for me in 2.1.2 and 3.0, but I only tested it briefly.

Ok, I can confirm that it's broken. It's a GZDoom issue. It's also broken in 1.8.6, and fixed in 1.9.0.

(0015986)
Edward-san   
2016-10-14 11:09   
(edited on: 2016-10-14 11:10)
I'd like to know when did it break by bisecting.

(0016050)
Edward-san   
2016-10-18 19:21   
Can the example wad be reduced by lessening the number of action functions?

(0016067)
unknownna   
2016-10-19 17:59   
It seems that the radius is ignored if the damage of A_Explode is set to 1.
(0016068)
Edward-san   
2016-10-19 19:20   
(edited on: 2016-10-19 19:33)
With the new example wad, the issue can be also reproduced with latest zdoom git. New bug report here.

(0016153)
Torr Samaho   
2016-11-06 17:01   
After reading the ZDoom thread, is this really a bug or just "no damage - no pain" in effect, correcting the old ZDoom behavior?
(0016256)
Edward-san   
2016-11-21 16:34   
I'm starting to think there's a magical combination of damage and radius which makes the problem show in 3.0 and not gzdoom 1.9, like unknownna said in comment 0002862:0015982 .
(0017290)
Torr Samaho   
2017-04-23 19:53   
No feeback on 0002862:0016153? If not, I have to assume that this is just the intended ZDoom behavior.
(0017813)
Ru5tK1ng   
2017-06-10 19:22   
Quote
I'm starting to think there's a magical combination of damage and radius which makes the problem show in 3.0 and not gzdoom 1.9, like unknownna said


I don't believe so. I would agree with Graf that this is intended ZDoom behavior. Although the example wad causes pain on the zombies in g/zdoom 1.9/2.8 as it did in Zan 2.0, this isn't the case with GZ 3.0 or beta builds of ZDoom 2.9. That weapons current behavior in 3.0 is the correct behavior.
(0017814)
Combinebobnt   
2017-06-10 19:28   
A_Explode [(int damage [, int radius [, int flags [, bool alert [, int fulldamageradius [, int nails [, int naildamage [, str pufftype [, str damagetype]]]]]]]])]

try using fulldamageradius as you are using an explosion with 1 damage. I didn't know randoms worked on a_explode, never seen them before lol.
(0017824)
Ru5tK1ng   
2017-06-13 18:22   
Yep, that's correct. Using fullradiusdamage allows the example wad to behave in 3.0 as it does in 2.0.