diff --git a/code/modules/antagonists/space_ninja/equipment/ninja_explosive.dm b/code/modules/antagonists/space_ninja/equipment/ninja_explosive.dm index 6e61ad68761..25317f623b7 100644 --- a/code/modules/antagonists/space_ninja/equipment/ninja_explosive.dm +++ b/code/modules/antagonists/space_ninja/equipment/ninja_explosive.dm @@ -51,7 +51,7 @@ if(!IS_SPACE_NINJA(user)) say("Access denied.") return FALSE - if(!check_loc(user)) + if(!check_loc(bomb_target, user)) return FALSE if(!..()) return FALSE @@ -59,7 +59,7 @@ return TRUE /obj/item/grenade/c4/ninja/detonate(mob/living/lanced_by) - if(!check_loc(detonator.resolve())) // if its moved, deactivate the c4 + if(!check_loc(target, detonator.resolve())) // if its moved, deactivate the c4 var/obj/item/grenade/c4/ninja/new_c4 = new /obj/item/grenade/c4/ninja(target.loc) new_c4.detonation_area = detonation_area new_c4.say("Invalid location!") @@ -87,11 +87,11 @@ * Arguments * * mob/user - The planter of the c4 */ -/obj/item/grenade/c4/ninja/proc/check_loc(mob/user) +/obj/item/grenade/c4/ninja/proc/check_loc(atom/bomb_target, mob/user) if(isnull(detonation_area)) balloon_alert(user, "no location set!") return FALSE - if((get_area(target) != detonation_area) && (get_area(src) != detonation_area)) + if(get_area(bomb_target) != detonation_area) if (!active) balloon_alert(user, "wrong location!") return FALSE