Commit Graph

9 Commits

Author SHA1 Message Date
Leshana
71587c5ad0 Fix rooms holding pressure when exposed to space.
This happens because edges cease processing when the delta between their zones is small enough.  This is normally a fine optimization, but when it results in a room at 4kPa with a window open to space, it breaks imurshuns.

Two main changes to solve this problem without too much cpu cost:
1) Stop edges from sleeping if one side is a hard vacuum.  This ensures that a zone doesn't freeze at a low-but-non-zero pressure when touching hard vacuum.
2) Prevent #1 from causing the edge to stay alive for ages while pressures asymptotically approach zero as they are repeatedly equalized but only half is dumped to space. (Would happen if ZoneA---ZoneB---Space arrangement exists) by detecting when the total amount of air left is small enough that it would normally sleep anyway, and just setting it to zero.

The end outcome is that behavior is mostly the same as before, except when zones have an open path to unsimulated space, they will reach equilibrium at zero instead of semi-random lowish values.
2017-03-15 19:04:33 -04:00
Leshana
0ad88fd29b Update values after equalizing gas mixtures.
Fixes rooms showing wrong pressure after reaching equilibrium.
* If we do not do this, zones are left with the wrong total_moles (and therefore the wrong **pressure readout**) after equalizing.
* Equalizing happens when two connected zones get close enough to suspend processing. Thus the effect of this bug would be wrong pressure readings on rooms that are no longer being updated, thus locking in the wrong value!
2017-03-15 14:08:57 -04:00
Zuhayr
7c3993b68b Revert "Revert "Bay update."" 2016-02-07 16:33:30 +10:30
Zuhayr
98d983577c Revert "Bay update." 2016-02-07 16:07:05 +10:30
PsiOmegaDelta
6a22086c17 Merge remote-tracking branch 'upstream/master' into dev-freeze
Conflicts:
	code/game/verbs/suicide.dm
	code/modules/nano/modules/crew_monitor.dm
2015-12-06 11:34:36 +01:00
PsiOmegaDelta
713a7bd654 Merge remote-tracking branch 'upstream/master' into dev-freeze
Conflicts:
	code/game/objects/items/devices/flashlight.dm
2015-08-25 08:12:39 +02:00
PsiOmega
f25e8a7a67 Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts:
	code/game/objects/items/stacks/tiles/plasteel.dm
	code/game/objects/items/stacks/tiles/tile_types.dm
	code/modules/materials/materials.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/silicon/pai/pai.dm
	code/modules/surgery/implant.dm
	code/setup.dm
2015-06-26 20:28:47 +02:00
Zuhayr
27a7768ffc Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into dev 2015-06-25 17:58:37 +09:30
Mloc
c1ce2f02b7 reorganize xgm into its own module
Signed-off-by: Mloc <colmohici@gmail.com>
2015-06-02 16:29:23 +01:00