Skip to content

Commit

Permalink
Fixes qdel in optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerfulBacon committed Aug 24, 2024
1 parent 66c79d1 commit 764a780
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/zmimic.dm
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/implants/implant_track.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions code/modules/multiz/zmimic/mimic_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 764a780

Please sign in to comment.