Fixes freezers never quite reaching their thermostat temperature

This commit is contained in:
mwerezak
2014-08-23 10:52:57 -04:00
parent 025838532a
commit 3cd0cdf27f
2 changed files with 2 additions and 2 deletions

View File

@@ -112,7 +112,7 @@
//Returns the thermal energy change required to get to a new temperature
/datum/gas_mixture/proc/get_thermal_energy_change(var/new_temperature)
return heat_capacity()*(new_temperature - temperature)
return heat_capacity()*(max(new_temperature, 0) - temperature)
//Technically vacuum doesn't have a specific entropy. Just use a really big number (infinity would be ideal) here so that it's easy to add gas to vacuum and hard to take gas out.
#define SPECIFIC_ENTROPY_VACUUM 150000