From 764a780950c75ca67e1cf8d74c4fef2baf521731 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:59:56 +0100 Subject: [PATCH] Fixes qdel in optimisation --- code/__DEFINES/zmimic.dm | 2 +- .../objects/effects/temporary_visuals/temporary_visual.dm | 2 +- code/game/objects/items/implants/implant_track.dm | 2 +- .../mob/living/simple_animal/hostile/mining_mobs/goliath.dm | 2 +- code/modules/multiz/zmimic/mimic_movable.dm | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/zmimic.dm b/code/__DEFINES/zmimic.dm index a56e30be3638b..685a6870ec51c 100644 --- a/code/__DEFINES/zmimic.dm +++ b/code/__DEFINES/zmimic.dm @@ -1,6 +1,6 @@ #define TURF_IS_MIMICKING(T) (isturf(T) && (T:z_flags & Z_MIMIC_BELOW)) -#define CHECK_OO_EXISTENCE(OO) if (OO && !MOVABLE_IS_ON_ZTURF(OO) && !OO:destruction_timer) { OO:destruction_timer = QDEL_IN(OO, 10 SECONDS); } +#define CHECK_OO_EXISTENCE(OO) if (OO && !MOVABLE_IS_ON_ZTURF(OO) && !OO:destruction_timer) { OO:destruction_timer = QDEL_IN_STOPPABLE(OO, 10 SECONDS); } #define UPDATE_OO_IF_PRESENT CHECK_OO_EXISTENCE(src:bound_overlay); if (src:bound_overlay) { update_above(); } // These aren't intended to be used anywhere else, they just can't be undef'd because DM is dum. diff --git a/code/game/objects/effects/temporary_visuals/temporary_visual.dm b/code/game/objects/effects/temporary_visuals/temporary_visual.dm index 685792d250b2a..2b6699f0a140f 100644 --- a/code/game/objects/effects/temporary_visuals/temporary_visual.dm +++ b/code/game/objects/effects/temporary_visuals/temporary_visual.dm @@ -13,7 +13,7 @@ if(randomdir) setDir(pick(GLOB.cardinals)) - timerid = QDEL_IN(src, duration) + timerid = QDEL_IN_STOPPABLE(src, duration) /obj/effect/temp_visual/Destroy() . = ..() diff --git a/code/game/objects/items/implants/implant_track.dm b/code/game/objects/items/implants/implant_track.dm index 1a222cfcc960b..c5dbe1f0471b0 100644 --- a/code/game/objects/items/implants/implant_track.dm +++ b/code/game/objects/items/implants/implant_track.dm @@ -17,7 +17,7 @@ /obj/item/implant/tracking/c38/Initialize(mapload) . = ..() - timerid = QDEL_IN(src, lifespan) + timerid = QDEL_IN_STOPPABLE(src, lifespan) /obj/item/implant/tracking/c38/Destroy() deltimer(timerid) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm index 9986f606e86e2..800d667ecefe6 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm @@ -206,4 +206,4 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/goliath_tentacle/original) /obj/effect/temp_visual/goliath_tentacle/proc/retract() icon_state = "Goliath_tentacle_retract" deltimer(timerid) - timerid = QDEL_IN(src, 7) + timerid = QDEL_IN_STOPPABLE(src, 7) diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index ba4f7965fb764..dac42d19e3b37 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -19,7 +19,7 @@ SSzcopy.queued_overlays += bound_overlay bound_overlay.queued += 1 else if (bound_overlay && !bound_overlay.destruction_timer) - bound_overlay.destruction_timer = QDEL_IN(bound_overlay, 10 SECONDS) + bound_overlay.destruction_timer = QDEL_IN_STOPPABLE(bound_overlay, 10 SECONDS) // Grabs a list of every openspace mimic that's directly or indirectly copying this object. Returns an empty list if none found. /atom/movable/proc/get_associated_mimics() @@ -195,12 +195,12 @@ deltimer(destruction_timer) destruction_timer = null else if (!destruction_timer) - destruction_timer = QDEL_IN(src, 10 SECONDS) + destruction_timer = QDEL_IN_STOPPABLE(src, 10 SECONDS) // Called when the turf we're on is deleted/changed. /atom/movable/openspace/mimic/proc/owning_turf_changed() if (!destruction_timer) - destruction_timer = QDEL_IN(src, 10 SECONDS) + destruction_timer = QDEL_IN_STOPPABLE(src, 10 SECONDS) // Get actual source atom when orbiting /atom/movable/openspace/mimic/get_orbitable()