Fix handcuff resist - layer bug

Fixes #4324

Resisting out of handcuffs was leaving the handcuffs layer set to 20 (over top of the UI).
Changed it to use the drop_from_inventory() proc so it handles the drop event correctly.
This commit is contained in:
Loganbacca
2014-01-30 21:35:38 +13:00
parent a05e016aae
commit 48e4b9a698

View File

@@ -626,9 +626,10 @@
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.handcuffed]."
CM.handcuffed.loc = usr.loc
CM.drop_from_inventory(CM.handcuffed)
CM.handcuffed = null
CM.update_inv_handcuffed()
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
@@ -664,7 +665,7 @@
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.legcuffed]."
CM.legcuffed.loc = usr.loc
CM.drop_from_inventory(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()