mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Adds a type check for put_in_l_hand() and put_in_r_hand() to avoid server crashing runtimes caused by bad code or var editing.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3940 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
|
||||
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_l_hand(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(lying) return 0
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(!l_hand)
|
||||
W.loc = src //TODO: move to equipped?
|
||||
l_hand = W
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_r_hand(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(lying) return 0
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(!r_hand)
|
||||
W.loc = src
|
||||
r_hand = W
|
||||
|
||||
Reference in New Issue
Block a user