mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixing some infinite loops in gun update_icon() calls.
This commit is contained in:
@@ -94,10 +94,12 @@
|
||||
var/mob/living/M = loc
|
||||
if(istype(M))
|
||||
if((M.l_hand == src && !M.r_hand) || (M.r_hand == src && !M.l_hand))
|
||||
name = "[initial(name)] (wielded)"
|
||||
item_state = wielded_icon
|
||||
else
|
||||
name = initial(name)
|
||||
item_state = initial(item_state)
|
||||
update_icon() // In case item_state is set somewhere else.
|
||||
update_icon(ignore_inhands=1) // In case item_state is set somewhere else.
|
||||
..()
|
||||
|
||||
//Checks whether a given mob can use the gun
|
||||
@@ -177,7 +179,6 @@
|
||||
var/held_acc_mod = 0
|
||||
var/held_disp_mod = 0
|
||||
if(requires_two_hands)
|
||||
update_held_icon()
|
||||
if((user.l_hand == src && user.r_hand) || (user.r_hand == src && user.l_hand))
|
||||
held_acc_mod = -3
|
||||
held_disp_mod = 3
|
||||
@@ -210,8 +211,6 @@
|
||||
|
||||
admin_attack_log(usr, attacker_message="Fired [src]", admin_message="fired a gun ([src]) (MODE: [src.mode_name]) [reflex ? "by reflex" : "manually"].")
|
||||
|
||||
update_held_icon()
|
||||
|
||||
//update timing
|
||||
user.setClickCooldown(4)
|
||||
user.setMoveCooldown(move_delay)
|
||||
|
||||
Reference in New Issue
Block a user