diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bdff751849..d51e52b99d 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1315,6 +1315,8 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) GLOB.dview_mob.see_invisible = invis_flags; \ for(type in view(range, GLOB.dview_mob)) +#define FOR_DVIEW_END GLOB.dview_mob.loc = null + //can a window be here, or is there a window blocking it? /proc/valid_window_location(turf/T, dir_to_check) if(!T) diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 0876e5c1f7..685b97614c 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -232,6 +232,7 @@ spotlights+=L continue continue + FOR_DVIEW_END /obj/machinery/disco/proc/hierofunk() for(var/i in 1 to 10) diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index dacbb1ac33..1cf14c3c47 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -221,7 +221,7 @@ LAZYADD(T.affecting_lights, src) affecting_turfs += T - + FOR_DVIEW_END update_gen++ /datum/light_source/proc/remove_lum() @@ -262,6 +262,7 @@ C = thing corners[C] = 0 turfs += T + FOR_DVIEW_END var/list/L = turfs - affecting_turfs // New turfs, add us to the affecting lights of them. affecting_turfs += L