Skip to content

Commit

Permalink
Fixes workshop gautlets not checking if a target is qdeleted before i…
Browse files Browse the repository at this point in the history
…ts thrown, making a runtime (#2477)

fix
  • Loading branch information
Gboster-0 authored Oct 11, 2024
1 parent b2bbaf3 commit 038bc46
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions ModularTegustation/tegu_items/workshop/templates/gauntlet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,25 @@
if(specialmod)
specialmod.ActivateEffect(src, special_count, target, user)

if(do_after(user, attack_speed*5, target))
if(!do_after(user, attack_speed * 5, target))
to_chat(user, "<span class='spider'><b>Your attack was interrupted!</b></span>")
return

to_chat(target, span_userdanger("[user] punches you with everything they got!!"))
to_chat(user, span_danger("You throw your entire body into this punch!"))
var/punch_damage = force
//I gotta regrab justice here
var/userjust = (get_modified_attribute_level(user, JUSTICE_ATTRIBUTE))
var/justicemod = 1 + userjust/100
punch_damage *= justicemod
to_chat(target, span_userdanger("[user] punches you with everything they got!!"))
to_chat(user, span_danger("You throw your entire body into this punch!"))

if(ishuman(target))
punch_damage = 50
var/punch_damage = force
//I gotta regrab justice here
var/userjust = (get_modified_attribute_level(user, JUSTICE_ATTRIBUTE))
var/justicemod = 1 + userjust/100
punch_damage *= justicemod

target.apply_damage(punch_damage, damtype, null, target.run_armor_check(null, damtype), spread_damage = TRUE) //MASSIVE fuckoff punch
if(ishuman(target))
punch_damage = 50

playsound(src, 'sound/weapons/resonator_blast.ogg', 50, TRUE)
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(target && !target?.anchored)
target.throw_at(throw_target, 2, 4, user) //Bigass knockback.
target.apply_damage(punch_damage, damtype, null, target.run_armor_check(null, damtype), spread_damage = TRUE) //MASSIVE fuckoff punch

else
to_chat(user, "<span class='spider'><b>Your attack was interrupted!</b></span>")
return
playsound(src, 'sound/weapons/resonator_blast.ogg', 50, TRUE)
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(target.anchored && !QDELETED(target))
target.throw_at(throw_target, 2, 4, user) //Bigass knockback.

0 comments on commit 038bc46

Please sign in to comment.