Adds some throwing datum nullchecks (#91720)

## About The Pull Request

A few places seem to call `hitby` or `throw_impact` without a throwing
datum to mimic the effect of colliding with something, which is cringe,
but I guess we should support it.

So we need to nullcheck for `get_thrower`, else it runtimes and cancels
the whole proc.

## Changelog

🆑 Melbert
fix: Glass shards from colliding with vendors or glass table hurt you
again.
/🆑
This commit is contained in:
MrMelbert
2025-06-20 12:25:16 -05:00
committed by GitHub
parent d9de687335
commit d838bff525
11 changed files with 14 additions and 14 deletions

View File

@@ -102,7 +102,7 @@
if(.)
return
var/obj/projectile/energy/fisher/melee/simulated_hit = new
simulated_hit.firer = throwingdatum.get_thrower()
simulated_hit.firer = throwingdatum?.get_thrower()
simulated_hit.on_hit(hit_atom)
/obj/item/gun/ballistic/automatic/pistol/m1911

View File

@@ -168,5 +168,5 @@
// ...you reeeeeally just shoot them, but in case you can't/won't
. = ..()
var/obj/projectile/energy/fisher/melee/simulated_hit = new
simulated_hit.firer = throwingdatum.get_thrower()
simulated_hit.firer = throwingdatum?.get_thrower()
simulated_hit.on_hit(hit_atom)