fixes zooming guns being plausible even if you aren't holding the gun in any of your hands (#8012)

This commit is contained in:
deathride58
2019-02-22 09:01:48 -05:00
committed by kevinz000
parent 2d2d690c54
commit 19035c4450
+5 -1
View File
@@ -477,8 +477,12 @@
/datum/action/toggle_scope_zoom/IsAvailable()
. = ..()
if(!. && gun)
if(!gun)
return FALSE
if(!.)
gun.zoom(owner, FALSE)
if(!owner.get_held_index_of_item(gun))
return FALSE
/datum/action/toggle_scope_zoom/Remove(mob/living/L)
gun.zoom(L, FALSE)