Skip to content

Commit

Permalink
[s] Fixes a major exploit with TK in-hand clicking. (tgstation#17760)
Browse files Browse the repository at this point in the history
* Adds a sanity check to sbeacondrop spawns

* generalized fix with qdeleted
  • Loading branch information
bgobandit authored and KorPhaeron committed May 19, 2016
1 parent 2460d53 commit 0305868
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/_onclick/telekinesis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ var/const/tk_maxrange = 15


/obj/item/tk_grab/attack_self(mob/user)
if(focus)
focus.attack_self_tk(user)
if(!focus)
return
if(qdeleted(focus))
qdel(src)
return
focus.attack_self_tk(user)

/obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity, params)//TODO: go over this
if(!target || !user)
Expand Down

0 comments on commit 0305868

Please sign in to comment.