From c1e97f712cfcc8a868c752599eafa9ac7cf3ce2a Mon Sep 17 00:00:00 2001 From: chuga-git <98280110+chuga-git@users.noreply.github.com> Date: Mon, 8 Jul 2024 16:07:18 -0500 Subject: [PATCH] Minor throwing fixes (#26179) * fix treadmill throwat * fixes dropdel runtimes and end_throw() not being called * dgl review --- code/controllers/subsystem/SSthrowing.dm | 1 + code/modules/games/cards.dm | 2 +- code/modules/mob/living/carbon/carbon_procs.dm | 12 +++++++----- code/modules/power/generators/treadmill.dm | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/controllers/subsystem/SSthrowing.dm b/code/controllers/subsystem/SSthrowing.dm index 46ecde8aa5a..1618b44f061 100644 --- a/code/controllers/subsystem/SSthrowing.dm +++ b/code/controllers/subsystem/SSthrowing.dm @@ -268,6 +268,7 @@ SUBSYSTEM_DEF(throwing) if(thrownthing) SEND_SIGNAL(thrownthing, COMSIG_MOVABLE_THROW_LANDED, src) + thrownthing.end_throw() qdel(src) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index fb1712d8f82..a794a6c784a 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -220,7 +220,7 @@ user.visible_message("[user] deals [dcard] card(s) to [user.p_themselves()].") else user.visible_message("[user] deals [dcard] card(s) to [target].") - H.throw_at(get_step(target,target.dir),3,1,H) + H.throw_at(get_step(target, target.dir), 3, 1, null) /obj/item/deck/attack_self() diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index 38d5c7cadaf..49de19a2499 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -694,11 +694,13 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven to_chat(src, "You set [I] down gently on the ground.") return - if(thrown_thing) - if(!HAS_TRAIT(thrown_thing, TRAIT_NO_THROWN_MESSAGE)) - visible_message("[src] has thrown [thrown_thing].") - newtonian_move(get_dir(target, src)) - thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src, null, null, null, move_force) + if(QDELETED(thrown_thing)) + return + + if(!HAS_TRAIT(thrown_thing, TRAIT_NO_THROWN_MESSAGE)) + visible_message("[src] has thrown [thrown_thing].") + newtonian_move(get_dir(target, src)) + thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src, null, null, null, move_force) /mob/living/carbon/can_use_hands() if(handcuffed) diff --git a/code/modules/power/generators/treadmill.dm b/code/modules/power/generators/treadmill.dm index 25fd175d013..efaf83b4af2 100644 --- a/code/modules/power/generators/treadmill.dm +++ b/code/modules/power/generators/treadmill.dm @@ -41,7 +41,7 @@ // if 2fast, throw the person, otherwise they just slide off, if there's reasonable speed at all if(speed && A.move_resist < INFINITY) var/dist = max(throw_dist * speed / MAX_SPEED, 1) - A.throw_at(get_distant_turf(get_turf(src), REVERSE_DIR(dir), dist), A.throw_range, A.throw_speed, src, 1) + A.throw_at(get_distant_turf(get_turf(src), REVERSE_DIR(dir), dist), A.throw_range, A.throw_speed, null, 1) /obj/machinery/power/treadmill/process() if(!anchored)