-Small improvements to atmos. Most notable is combining two loops into one during initialization and commenting out a loop with no nested code.

-Set chunk/update to be a background proc.
-Made it so the Eye's loc won't be set to null when moving out of the map.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4735 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-09-20 14:24:50 +00:00
parent ea1c1a5a0d
commit 7fc77b0bc5
5 changed files with 19 additions and 17 deletions

View File

@@ -81,7 +81,8 @@ datum/air_group
turf/process_group() turf/process_group()
current_cycle = air_master.current_cycle current_cycle = air_master.current_cycle
if(!group_processing) //Revert to individual processing then end if(!group_processing) //Revert to individual processing then end
for(var/turf/simulated/member in members) for(var/T in members)
var/turf/simulated/member = T
member.process_cell() member.process_cell()
return return
@@ -204,12 +205,14 @@ datum/air_group
suspend_group_processing() suspend_group_processing()
else else
if(air.check_tile_graphic()) if(air.check_tile_graphic())
for(var/turf/simulated/member in members) for(var/T in members)
var/turf/simulated/member = T
member.update_visuals(air) member.update_visuals(air)
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
for(var/turf/simulated/member in members) for(var/T in members)
var/turf/simulated/member = T
member.hotspot_expose(air.temperature, CELL_VOLUME) member.hotspot_expose(air.temperature, CELL_VOLUME)
member.consider_superconductivity(starting=1) member.consider_superconductivity(starting=1)

View File

@@ -163,7 +163,8 @@ What are the archived variables for?
else else
burned_fuel = fuel_store.moles burned_fuel = fuel_store.moles
oxygen -= fuel_store.moles oxygen -= fuel_store.moles
del(fuel_store) trace_gases -= fuel_store
fuel_store = null
energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
carbon_dioxide += burned_fuel carbon_dioxide += burned_fuel

View File

@@ -154,17 +154,10 @@ datum
for(var/turf/simulated/S in world) for(var/turf/simulated/S in world)
if(!S.blocks_air && !S.parent && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE if(!S.blocks_air && !S.parent && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE
assemble_group_turf(S) assemble_group_turf(S)
for(var/turf/simulated/S in world) //Update all pathing and border information as well
if(S.z > 4) // Skipping asteroids -- TLE if(S.z > 4) // Skipping asteroids -- TLE
continue continue
S.update_air_properties() S.update_air_properties()
/*
for(var/obj/movable/floor/S in world)
if(!S.parent)
assemble_group_object(S)
for(var/obj/movable/floor/S in world) //Update all pathing and border information as well
S.update_air_properties()
*/
world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!" world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!"
assemble_group_turf(turf/simulated/base) assemble_group_turf(turf/simulated/base)
@@ -284,7 +277,8 @@ datum
return 1 return 1
process_update_tiles() process_update_tiles()
for(var/turf/simulated/T in tiles_to_update) for(var/turf in tiles_to_update)
var/turf/simulated/T = turf
T.update_air_properties() T.update_air_properties()
/* /*
for(var/obj/movable/floor/O in tiles_to_update) for(var/obj/movable/floor/O in tiles_to_update)
@@ -296,7 +290,8 @@ datum
var/turf/list/turfs = list() var/turf/list/turfs = list()
for(var/datum/air_group/turf/turf_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members for(var/datum/air_group/turf/turf_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
for(var/turf/simulated/T in turf_AG.members) for(var/turf in turf_AG.members)
var/turf/simulated/T = turf
T.parent = null T.parent = null
turfs += T turfs += T
del(turf_AG) del(turf_AG)
@@ -309,7 +304,7 @@ datum
// var/obj/movable/list/movable_objects = list() // var/obj/movable/list/movable_objects = list()
for(var/datum/air_group/object/object_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members // for(var/datum/air_group/object/object_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
/* /*
for(var/obj/movable/floor/OM in object_AG.members) for(var/obj/movable/floor/OM in object_AG.members)
OM.parent = null OM.parent = null

View File

@@ -42,7 +42,6 @@
/datum/camerachunk/proc/visibilityChanged(turf/loc) /datum/camerachunk/proc/visibilityChanged(turf/loc)
if(!(loc in visibleTurfs)) if(!(loc in visibleTurfs))
return return
hasChanged() hasChanged()
// Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will // Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will
@@ -62,6 +61,8 @@
/datum/camerachunk/proc/update() /datum/camerachunk/proc/update()
set background = 1
var/list/newVisibleTurfs = list() var/list/newVisibleTurfs = list()
for(var/obj/machinery/camera/c in cameras) for(var/obj/machinery/camera/c in cameras)

View File

@@ -103,7 +103,9 @@
user.sprint = initial user.sprint = initial
for(var/i = 0; i < max(user.sprint, initial); i += 20) for(var/i = 0; i < max(user.sprint, initial); i += 20)
user.eyeobj.setLoc(get_turf(get_step(user.eyeobj, direct))) var/turf/step = get_turf(get_step(user.eyeobj, direct))
if(step)
user.eyeobj.setLoc(step)
user.cooldown = world.timeofday + 5 user.cooldown = world.timeofday + 5
if(user.acceleration) if(user.acceleration)