Skip to content

Commit

Permalink
Adjust temperature equalization
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze authored and comma committed Mar 26, 2024
1 parent 7ecd6a4 commit 1cee3f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/game/atoms_temperature.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
// Determine if our temperature needs to change.
var/old_temp = temperature
var/diff_temp = adjust_temp - temperature
if(abs(diff_temp) >= ATOM_TEMPERATURE_EQUILIBRIUM_THRESHOLD)
var/altered_temp = max(temperature + (get_thermal_mass_coefficient() * diff_temp), 0)
var/thermal_mass_coefficient = get_thermal_mass_coefficient()
if(abs(diff_temp) >= (thermal_mass_coefficient * ATOM_TEMPERATURE_EQUILIBRIUM_THRESHOLD))
var/altered_temp = max(temperature + (thermal_mass_coefficient * diff_temp), 0)
ADJUST_ATOM_TEMPERATURE(src, (diff_temp > 0) ? min(adjust_temp, altered_temp) : max(adjust_temp, altered_temp))
else
temperature = adjust_temp
Expand Down

0 comments on commit 1cee3f1

Please sign in to comment.