From 44c10b670d2ce7f92001cdfd212204c8e91d9fce Mon Sep 17 00:00:00 2001 From: The Sharkening <95130227+StrangeWeirdKitten@users.noreply.github.com> Date: Mon, 6 May 2024 21:18:46 -0600 Subject: [PATCH] Makes the medibeam process only on active use (#83062) ## About The Pull Request Per title ## Why It's Good For The Game We can have things process only when they need to process ## Changelog --- code/modules/projectiles/guns/special/medbeam.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/modules/projectiles/guns/special/medbeam.dm b/code/modules/projectiles/guns/special/medbeam.dm index 267470f1701..0ad5caf2fec 100644 --- a/code/modules/projectiles/guns/special/medbeam.dm +++ b/code/modules/projectiles/guns/special/medbeam.dm @@ -16,12 +16,7 @@ weapon_weight = WEAPON_MEDIUM -/obj/item/gun/medbeam/Initialize(mapload) - . = ..() - START_PROCESSING(SSobj, src) - /obj/item/gun/medbeam/Destroy(mob/user) - STOP_PROCESSING(SSobj, src) LoseTarget() return ..() @@ -41,6 +36,7 @@ QDEL_NULL(current_beam) active = FALSE on_beam_release(current_target) + STOP_PROCESSING(SSobj, src) current_target = null /** @@ -69,6 +65,7 @@ active = TRUE current_beam = user.Beam(current_target, icon_state="medbeam", time = 10 MINUTES, maxdistance = max_range, beam_type = /obj/effect/ebeam/medical) RegisterSignal(current_beam, COMSIG_QDELETING, PROC_REF(beam_died))//this is a WAY better rangecheck than what was done before (process check) + START_PROCESSING(SSobj, src) SSblackbox.record_feedback("tally", "gun_fired", 1, type)