MantisBT - Zandronum
View Issue Details
0004190Zandronum[All Projects] Suggestionpublic2024-01-30 04:522024-04-08 19:51
StrikerMan780 
 
normalmajoralways
resolvedfixed 
MicrosoftWindowsXP/Vista/7
3.1 
3.23.2 
0004190: GAMEEVENT_ACTOR_ARMORDAMAGED doesn't fire if actor lacks an inventory
GAMEEVENT_ACTOR_ARMORDAMAGED doesn't seem to trigger when hit by radius damage, even though radius damage can affect armor.
Just make an event script checking for type == GAMEEVENT_ACTOR_ARMORDAMAGED, and have it print when fired. Use the rocket launcher on some enemies, and you'll notice that the script will only fire for enemies that were directly hit, and not for any that were hit with splash damage.
No tags attached.
Issue History
2024-01-30 04:52StrikerMan780New Issue
2024-02-09 14:58WaTaKiDNote Added: 0023060
2024-02-09 16:06StrikerMan780Note Added: 0023065
2024-02-09 20:31StrikerMan780Note Added: 0023067
2024-02-09 20:31StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14074
2024-02-09 20:32StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14075
2024-02-09 20:33StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14076
2024-02-09 21:48StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14077
2024-02-09 21:49StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14078
2024-02-09 21:49StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14079
2024-02-09 21:51StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14080
2024-02-09 21:55StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14081
2024-02-09 22:08StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14082
2024-02-09 22:09StrikerMan780Note Edited: 0023067bug_revision_view_page.php?bugnote_id=23067#r14083
2024-04-06 00:22StrikerMan780Note Added: 0023522
2024-04-06 02:22KaminskyStatusnew => needs review
2024-04-06 02:22KaminskySummaryGAMEEVENT_ACTOR_ARMORDAMAGED doesn't fire for radius damage => GAMEEVENT_ACTOR_ARMORDAMAGED doesn't fire if actor lacks an inventory
2024-04-06 13:32KaminskyNote Added: 0023524
2024-04-06 13:32KaminskyCategoryBug => Suggestion
2024-04-07 20:28Ru5tK1ngNote Added: 0023525
2024-04-07 20:28Ru5tK1ngStatusneeds review => needs testing
2024-04-07 20:28Ru5tK1ngTarget Version => 3.2
2024-04-07 23:03StrikerMan780Note Added: 0023543
2024-04-08 19:51Ru5tK1ngNote Added: 0023556
2024-04-08 19:51Ru5tK1ngStatusneeds testing => resolved
2024-04-08 19:51Ru5tK1ngResolutionopen => fixed
2024-04-08 19:51Ru5tK1ngFixed in Version => 3.2

Notes
(0023060)
WaTaKiD   
2024-02-09 14:58   
example wad please
(0023065)
StrikerMan780   
2024-02-09 16:06   
About to go to sleep, but I'll get one uploaded when I wake up tomorrow.
(0023067)
StrikerMan780   
2024-02-09 20:31   
(edited on: 2024-02-09 22:09)
Had some interesting findings. There's a Inventory != NULL check before executing the event in P_DamageMobj, and if a monster doesn't have any inventory, the event won't fire. This means if you give the monster so much as a clip, or other random item, the event will then fire.

Perhaps the ticket title/description should be renamed "GAMEEVENT_ACTOR_ARMORDAMAGED doesn't fire if actor lacks an inventory."

I propose moving the event call up a line, out of that block, and naming the event something more appropriate, like GAMEEVENT_ACTOR_DAMAGE_PREARMOR, as this code occurs BEFORE any armor takes damage, not when it is taking damage.

This way, it'll behave more consistently, but still keep its current use/function. It would also mean one doesn't have to go around giving everyone dummy items so it works across all monsters/players.

(0023522)
StrikerMan780   
2024-04-06 00:22   
MR with proposed changes:'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/90 [^]'
(0023524)
Kaminsky   
2024-04-06 13:32   
I changed this to a suggestion because GAMEEVENT_ACTOR_ARMORDAMAGED was intended to only trigger for actors that have inventory items that can potentially absorb some of the damage (thus, actors without an inventory shouldn't have triggered the event). This isn't a bug and the MR only improves the behaviour.
(0023525)
Ru5tK1ng   
2024-04-07 20:28   
Changes were merged in:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/da48bf1babf89393ba97cfa9e090d7d5c7a6b38e [^]'
(0023543)
StrikerMan780   
2024-04-07 23:03   
Cheers.
(0023556)
Ru5tK1ng   
2024-04-08 19:51   
Marking as resolved since Strikerman extensively tested this for a performance check.