Fix thermal regulation (#35971)

This commit is contained in:
slarticodefast 2025-03-20 23:40:31 +01:00 committed by deltanedas
parent 1991019b7a
commit c96f788455
1 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ public sealed class ThermalRegulatorSystem : EntitySystem
if (!Resolve(ent, ref ent.Comp2, logMissing: false))
return;
// TODO: Why do we have two datafields for this if they are only ever used once here?
var totalMetabolismTempChange = ent.Comp1.MetabolismHeat - ent.Comp1.RadiatedHeat;
// implicit heat regulation
@ -74,7 +75,7 @@ public sealed class ThermalRegulatorSystem : EntitySystem
// if body temperature is not within comfortable, thermal regulation
// processes starts
if (tempDiff > ent.Comp1.ThermalRegulationTemperatureThreshold)
if (tempDiff < ent.Comp1.ThermalRegulationTemperatureThreshold)
return;
if (ent.Comp2.CurrentTemperature > ent.Comp1.NormalBodyTemperature)