Aim Intent Safety Fix (#19280)

* Fixed aim intent triggering clicking messages if someone moves
(despite being allowed to move) when you're not on harm intent.

Fixes https://github.com/Aurorastation/Aurora.3/issues/19242
This commit is contained in:
Geeves
2024-05-31 20:15:25 +00:00
committed by GitHub
parent 0173a9c100
commit 4aa7278a73
2 changed files with 13 additions and 6 deletions
@@ -23,6 +23,13 @@
return TRUE
/obj/aiming_overlay/proc/trigger(var/perm)
if(!owner || !aiming_with || !aiming_at || !locked)
return FALSE
if(perm && (target_permissions & perm))
return FALSE
if(!owner.canClick())
return FALSE
var/obj/item/gun/G = aiming_with
if(istype(G) && G.safety())
if(owner.a_intent == I_HURT)
@@ -30,12 +37,6 @@
else
G.handle_click_empty(owner)
to_chat(owner, SPAN_WARNING("Your [G]'s safety prevents firing."))
if(!owner || !aiming_with || !aiming_at || !locked)
return FALSE
if(perm && (target_permissions & perm))
return FALSE
if(!owner.canClick())
return FALSE
owner.setClickCooldown(DEFAULT_QUICK_COOLDOWN) // Spam prevention, essentially.
owner.visible_message(