From 81dc49d0bcb0f56f7548d31318e5fdef8ff00c91 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 9 Dec 2020 09:53:32 +0100 Subject: [PATCH] [MIRROR] Windows "lag" fix (#2093) * Windows "lag" fix (#55372) Change to Move() to make only anchored windows to update the air when they move through the turfs (should prevent abusable situations of lag machines too) Makes singulo from stage 2 unanchor windows when pulling them (low performance increment for singulo(?)) Why It's Good For The Game less abusable lag good Changelog cl tweak: only anchored windows call move_update_turf() tweak: singularities from stage 2 and over will unanchor windows /cl * Windows "lag" fix Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com> --- code/game/objects/structures/window.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 4276062da16..37830f27055 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -92,6 +92,8 @@ /obj/structure/window/singularity_pull(S, current_size) ..() + if(anchored && current_size >= STAGE_TWO) + set_anchored(FALSE) if(current_size >= STAGE_FIVE) deconstruct(FALSE) @@ -310,7 +312,8 @@ var/turf/T = loc . = ..() setDir(ini_dir) - move_update_air(T) + if(anchored) + move_update_air(T) /obj/structure/window/CanAtmosPass(turf/T) if(!anchored || !density)