Page MenuHomeFeedback Tracker

Colder when indoors and warmer in water when environment temperature is negative.
Closed, ResolvedPublic

Description

If environment temperature is negative and you go inside a building, the environment temperature drops instead of increasing. Here is the problem code in Environment.c inside the method GetEnvironmentTemperature()

if( IsWaterContact() ) 
{
	temperature = temperature * GameConstants.ENVIRO_WATER_TEMPERATURE_COEF; // 0.5
}
		
if( IsInsideBuilding() )
{
	temperature = temperature * GameConstants.ENVIRO_TEMPERATURE_INSIDE_COEF; // 1.25
}
		
if( IsUnderRoof() )
{
	temperature = temperature * GameConstants.ENVIRO_TEMPERATURE_UNDERROOF_COEF; // 1.1
}

Example:
Lets say temperature is -2 and you go inside a building. The temperature calculation would be -2 * 1.25 = -2.5 (a decrease). The same problem with under a roof.
If you go in some water the temperature calculation would be -2 * 0.5 = -1 (an increase).

Details

Severity
Trivial
Resolution
Open
Reproducibility
Always
Operating System
Windows 10
Category
Scripting
Steps To Reproduce

Simply set the environment temperature to a negative number and monitor it when you enter a building or contact water.

Additional Information

Suggested fix

if( IsWaterContact() ) 
{
	temperature -= Math.AbsFloat(temperature) * GameConstants.ENVIRO_WATER_TEMPERATURE_COEF;
}
		
if( IsInsideBuilding() )
{
	temperature += Math.AbsFloat(temperature) * (GameConstants.ENVIRO_TEMPERATURE_INSIDE_COEF - 1.0);
}
		
if( IsUnderRoof() )
{
	temperature += Math.AbsFloat(temperature) * (GameConstants.ENVIRO_TEMPERATURE_UNDERROOF_COEF - 1.0);
}

Event Timeline

tannerng created this task.Apr 7 2020, 5:09 PM
Geez closed this task as Resolved.Apr 15 2020, 5:05 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Hello tannerng.
This has been fixed internally and will be fixed on Steam in the future.
Regards,
Geez