by Matt » Wed Feb 13, 2019 5:50 pm
The way I track this in HD is to have each bullet check for a specialized thinker that is targeting the victim, creating a new one if none already exists, and add its damage to that thinker's counter. Once that thinker expires (about 3-4 tics, I vaguely recall needing 2 to reliably get everything that I thought should have hit in the same tic), it does all the accumulated damage to the victim at once.
For a custom monster/player/target instead of a custom projectile, I can imagine something similar happening using the victim's DamageMobj where it never calls "super.damagemobj" unless the inflictor is that damage-aggregating actor (can't use a thinker in this case).
The way I track this in HD is to have each bullet check for a specialized thinker that is targeting the victim, creating a new one if none already exists, and add its damage to that thinker's counter. Once that thinker expires (about 3-4 tics, I vaguely recall needing 2 to reliably get everything that I [i]thought[/i] should have hit in the same tic), it does all the accumulated damage to the victim at once.
For a custom monster/player/target instead of a custom projectile, I can imagine something similar happening using the victim's DamageMobj where it never calls "super.damagemobj" unless the inflictor is that damage-aggregating actor (can't use a thinker in this case).