MantisBT - Zandronum
View Issue Details
0002136Zandronum[All Projects] Bugpublic2015-03-25 04:082018-09-30 21:38
Ru5tK1ng 
Dusk 
normalminorN/A
closedfixed 
MicrosoftWindowsXP/Vista/7
1.3 
2.12.1 
0002136: Railgun ignores armor completely
Rail attacks currently ignore armor and mods that make use of a rail attack, either from a monster or player, has to rely on fast projectiles if they wish to respect armour. The issue with relying on fast projectiles is that they get laggy with higher latency. I couldn't find the changelog version, but I know GZDoom and perhaps ZDoom fixed this issue.
No tags attached.
? railguytest.wad (934) 2015-03-25 19:58
/tracker/file_download.php?file_id=1432&type=bug
Issue History
2015-03-25 04:08Ru5tK1ngNew Issue
2015-03-25 10:33Edward-sanNote Added: 0011885
2015-03-25 19:58Ru5tK1ngFile Added: railguytest.wad
2015-03-25 20:00Ru5tK1ngNote Added: 0011886
2015-03-25 23:23Edward-sanNote Added: 0011891
2015-03-25 23:23Edward-sanNote Edited: 0011891bug_revision_view_page.php?bugnote_id=11891#r6827
2015-03-25 23:51DuskCategorySuggestion => Bug
2015-03-25 23:51DuskSummaryBackport GZDoom Railgun Armor Fix => Railgun ignores armor completely
2015-03-25 23:52DuskNote Added: 0011894
2015-03-26 00:38Edward-sanNote Added: 0011895
2015-03-26 00:39Edward-sanNote Edited: 0011895bug_revision_view_page.php?bugnote_id=11895#r6829
2015-03-26 01:10Ru5tK1ngNote Added: 0011896
2015-03-28 01:15DuskNote Added: 0011902
2015-03-28 02:08Ru5tK1ngNote Added: 0011904
2015-03-30 15:11DuskAssigned To => Dusk
2015-03-30 15:11DuskStatusnew => assigned
2015-03-30 15:12DuskTarget Version => 2.1
2015-03-30 22:01DuskNote Added: 0011948
2015-03-30 22:01DuskStatusassigned => needs review
2015-04-03 15:02Torr SamahoNote Added: 0012004
2015-04-03 15:03Torr SamahoStatusneeds review => feedback
2015-04-03 18:53DuskStatusfeedback => assigned
2015-04-25 16:03DuskNote Added: 0012169
2015-04-25 16:03DuskStatusassigned => needs review
2015-05-24 11:12cobaltStatusneeds review => needs testing
2015-05-24 11:12cobaltNote Added: 0012354
2015-06-24 22:46DuskStatusneeds testing => resolved
2015-06-24 22:46DuskFixed in Version => 2.2
2015-06-24 22:46DuskResolutionopen => fixed
2015-06-24 22:47DuskFixed in Version2.2 => 2.1
2018-09-30 21:38Blzut3Statusresolved => closed

Notes
(0011885)
Edward-san   
2015-03-25 10:33   
Do you have an example wad with a monster which does a rail attack with not high damage?
(0011886)
Ru5tK1ng   
2015-03-25 20:00   
I attached a simple zombieman replacement wad. In this test wad simply grab the blue armor then shoot the zombieman. He will return fire with a basic rail attack that takes off 50 health and leaves the armor untouched.
(0011891)
Edward-san   
2015-03-25 23:23   
Interesting, I tested with gzdoom 900 and seems to work fine, but in zandronum 1.3 and 2.0 it doesn't work.

(0011894)
Dusk   
2015-03-25 23:52   

[01:50:02] <@Dusk> r2560 has P_DamageMobj (RailHits[i].HitActor, thepuff? thepuff:source, source, damage, damagetype, DMG_INFLICTOR_IS_PUFF);
[01:50:16] <@Dusk> which means zan should drop the DMG_NO_ARMOR
[01:50:33] <@Dusk> i have a feeling it was not merged properly because of instagib


c.f.'https://github.com/rheit/zdoom/blob/6f82db47b857218d147dd8fbddfc42ce371f6461/src/p_map.cpp#L3874 [^]'
(0011895)
Edward-san   
2015-03-26 00:38   
(edited on: 2015-03-26 00:39)
According to the Skulltag history, the railgun attacks become armor piercing since v96b:


- - The railgun attacks are now armor piercing, like they were meant to be.


But in zdoom, there's no trace of this in the code history, so my guess is that Skulltag did it intentionally.

How many mods rely on this?

(0011896)
Ru5tK1ng   
2015-03-26 01:10   
I'm not sure how many mods explicitly rely on the rail's armor piercing. It would be a safe bet that it's more likely that a mod uses a projectile with the PIERCEARMOR flag on rather than use a rail. Of course, there is no real way to find out the number of mods relying on the armor piercing rail unless the mod authors speak up. It seems that the rail attacks are either piercing or not(essentially being mutually exclusive). Ultimately it depends whether or not Zandronum wants to maintain consistency with (g)ZDoom or continue on a decision made by Carn. I would suggest the former.
(0011902)
Dusk   
2015-03-28 01:15   
Considering how old the change is, I guess Carn intended the change to affect the Skulltag railgun, which IMO means we should remove DMG_NO_ARMOR from P_RailAttack's P_DamageMobj calls and add PIERCEARMOR to Railgun. If this change somehow breaks some wad, we can use compatibility.txt to cater for it.
(0011904)
Ru5tK1ng   
2015-03-28 02:08   
That is a fair course of action. Currently there isn't any real way to get around the armor piercing factor of rail attacks. Going the route you suggested enables modders to decide on their own whether armor piercing should be on or off.
(0011948)
Dusk   
2015-03-30 22:01   
Changed

This one was annoying, ugh.
(0012004)
Torr Samaho   
2015-04-03 15:02   
Looks fine except that you forget to mark the change from

DEFINE_ACTION_FUNCTION(AActor, A_FireRailgun)

to

DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireRailgun)

with your initials.
(0012169)
Dusk   
2015-04-25 16:03   
That is done now. I figured the comment inside was good enough. Moved it outside now.
(0012354)
cobalt   
2015-05-24 11:12   
Issue addressed by commit ce87b16b4652: - railgun attacks no longer always pierce armor; piercing must be manually specified by use of PIERCEARMOR in the puff, like in ZDoom (addresses 2136)
Committed by Teemu Piippo [Dusk] on Saturday 25 April 2015 19:00:08

Changes in files:
 docs/zandronum-history.txt | 1 +
 src/g_doom/a_doomweaps.cpp | 13 +++++++++----
 src/p_map.cpp | 6 +++---
 wadsrc/static/actors/shared/inventory.txt | 2 +-
 wadsrc_st/static/actors/skulltagweapons.txt | 20 +++++++++++++++++++-
 5 files changed, 33 insertions(+), 9 deletions(-)