mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user