Background: a long while ago, I created a projectile which uses the PoisonDamage property apply a damage-over-time effect. Since this was of "fire" type, I also wanted the initial applications of the "poison" to start a visual burning effect, using particle effects and a thinker for this purpose. This thinker would only be created if the monster had no existing PoisonDamageDuration on it when the projectile hit. Now, since poison damage seems to be already applied by the time the projectile's Death-state and its actions are reached, I needed to work around this problem by performing the relevant checks earlier in SpecialMissileHit function instead, and saving the result in a custom class variable which I could later compare against, in the Death state (see code below).
Code: Select all
override int SpecialMissileHit(actor victim) {
lastVictim = victim;
lastVictimHasPoisonDuration = victim.PoisonDurationReceived;
return Super.SpecialMissileHit(victim);
}
I have to think about how I work around this problem for bouncing projectiles as well. Perhaps even more checks and new class variables to hold the results are required (of course, better ideas and suggestions are welcome).
But I'm also a bit curious if this change in timing of PoisonDamage application (relative to the last SpecialMissileHit call) is intended to happen for bouncing projectiles, and what exactly explains it?