From 6070a9222bbc08b56e9a8d81e1d3941ceafd7ca8 Mon Sep 17 00:00:00 2001 From: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> Date: Tue, 8 Mar 2022 06:39:17 -0500 Subject: [PATCH] Players can no longer exploit Meteorshot to throw anything that's not a turf (#17465) * glorious fix * moves check over to move_resist * Update code/modules/projectiles/projectile/bullets.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> --- code/game/machinery/shieldgen.dm | 2 ++ code/modules/power/apc.dm | 1 + code/modules/projectiles/projectile/bullets.dm | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 467e77cdaf50..c21adad62638 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -6,6 +6,7 @@ density = 1 opacity = FALSE anchored = 1 + move_resist = INFINITY resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags_2 = RAD_NO_CONTAMINATE_2 max_integrity = 200 @@ -532,6 +533,7 @@ icon_state = "shieldwall" anchored = 1 density = 1 + move_resist = INFINITY resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF light_range = 3 var/needs_power = 0 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7621ea4cbfe0..edb19428a503 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -58,6 +58,7 @@ req_access = list(ACCESS_ENGINE_EQUIP) siemens_strength = 1 damage_deflection = 10 + move_resist = INFINITY var/area/area var/areastring = null var/obj/item/stock_parts/cell/cell diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 2531e8b8da09..40418a61517d 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -194,8 +194,9 @@ ..() if(ismovable(target)) var/atom/movable/M = target - var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src))) - M.throw_at(throw_target, 3, 2) + if(M.move_resist < INFINITY) + var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src))) + M.throw_at(throw_target, 3, 2) /obj/item/projectile/bullet/meteorshot/New() ..()