mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
Fixes rifle scopes working despite not having the gun in hand (#59403)
Gun scopes no longer work unless you are holding them in hand (they persist even if you switch your active hand though, useful for reloading)
This commit is contained in:
@@ -590,7 +590,7 @@
|
||||
if(azoom)
|
||||
azoom.Remove(user)
|
||||
if(zoomed)
|
||||
zoom(user, user.dir)
|
||||
zoom(user, user.dir, FALSE)
|
||||
|
||||
/obj/item/gun/update_overlays()
|
||||
. = ..()
|
||||
@@ -676,10 +676,15 @@
|
||||
var/obj/item/gun/gun = null
|
||||
|
||||
/datum/action/toggle_scope_zoom/Trigger()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
gun.zoom(owner, owner.dir)
|
||||
|
||||
/datum/action/toggle_scope_zoom/IsAvailable()
|
||||
. = ..()
|
||||
if(owner.get_active_held_item() != gun)
|
||||
. = FALSE
|
||||
if(!. && gun)
|
||||
gun.zoom(owner, owner.dir, FALSE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user