Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes duplicate gas layers #11691

Merged
merged 1 commit into from Dec 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/ZAS/Controller.dm
Expand Up @@ -154,18 +154,18 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifdef ZASDBG
var/updated = 0
#endif

//defer updating of self-zone-blocked turfs until after all other turfs have been updated.
//this hopefully ensures that non-self-zone-blocked turfs adjacent to self-zone-blocked ones
//have valid zones when the self-zone-blocked turfs update.
var/list/deferred = list()

for(var/turf/T in updating)
//check if the turf is self-zone-blocked
if(T.c_airblock(T) & ZONE_BLOCKED)
deferred += T
continue

T.update_air_properties()
T.post_update_air_properties()
T.needs_air_update = 0
Expand Down Expand Up @@ -234,6 +234,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun

/datum/controller/air_system/proc/remove_zone(zone/z)
zones.Remove(z)
zones_to_update.Remove(z)

/datum/controller/air_system/proc/air_blocked(turf/A, turf/B)
#ifdef ZASDBG
Expand Down
5 changes: 3 additions & 2 deletions code/ZAS/Zone.dm
Expand Up @@ -108,11 +108,12 @@ Class Procs:
c_invalidate()
for(var/turf/simulated/T in contents)
into.add(T)
T.update_graphic(graphic_remove = air.graphic)
#ifdef ZASDBG
T.dbg(merged)
#endif
//rebuild the old zone's edges so that the will be possesed by the new zone

//rebuild the old zone's edges so that they will be possessed by the new zone
for(var/connection_edge/E in edges)
if(E.contains_zone(into))
continue //don't need to rebuild this edge
Expand Down