diff --git a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm index c0dfc5633e..4ad3bbf575 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm @@ -12,6 +12,8 @@ var/obj/machinery/atmospherics/components/unary/heat_exchanger/partner = null var/update_cycle + var/old_temperature = 0 + var/other_old_temperature = 0 pipe_state = "heunary" @@ -59,9 +61,6 @@ var/other_air_heat_capacity = partner_air_contents.heat_capacity() var/combined_heat_capacity = other_air_heat_capacity + air_heat_capacity - var/old_temperature = air_contents.return_temperature() - var/other_old_temperature = partner_air_contents.return_temperature() - if(combined_heat_capacity > 0) var/combined_energy = partner_air_contents.return_temperature()*other_air_heat_capacity + air_heat_capacity*air_contents.return_temperature() @@ -71,6 +70,8 @@ if(abs(old_temperature-air_contents.return_temperature()) > 1) update_parents() + old_temperature = air_contents.return_temperature() if(abs(other_old_temperature-partner_air_contents.return_temperature()) > 1) partner.update_parents() + other_old_temperature = partner_air_contents.return_temperature()