Files
Bubberstation/code/modules/mob
SkyratBot b6eefc6363 [MIRROR] Fixes projectiles logging/displaying messages twice [MDB IGNORE] (#11320)
* Fixes projectiles logging/displaying messages twice (#64683)

#64659 introduced a bug where, now that mob/living/bullet_act() was now calling parent, which called projectile.on_hit() while also calling on_hit() itself with its own armor arguments, would cause duplicated logging entries, impact effects, and messages among other things. This was an annoying bug to figure out a fix for as on_hit was something that all atoms need to call in bullet_act, but it had to be run at the top of the proc since it had to be run alongside the COMSIG_ATOM_BULLET_ACT signal.

The solution I settled on was simply introducing a cut-out proc for getting the armor type that's supposed to be used for on_hit. Note that on_hit doesn't appear to have any mechanical effects like dealing damage or stuns, so there were no effects on actual balance.

* Fixes projectiles logging/displaying messages twice

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2022-02-06 20:30:57 +00:00
..