42 {
43 if( !player.m_Environment.IsTemperatureSet() )
44 return;
45 float air_temperature = player.m_Environment.GetTemperature();
46 int level = 0;
47 if( MiscGameplayFunctions.IsValueInRange( air_temperature, PlayerConstants.BREATH_VAPOUR_THRESHOLD_HIGH, PlayerConstants.BREATH_VAPOUR_THRESHOLD_LOW) )
48 {
49 float value = Math.InverseLerp( PlayerConstants.BREATH_VAPOUR_THRESHOLD_LOW, PlayerConstants.BREATH_VAPOUR_THRESHOLD_HIGH,air_temperature);
50 value = Math.Clamp(value,0,1);
52 }
53 else if(air_temperature < PlayerConstants.BREATH_VAPOUR_THRESHOLD_HIGH)
54 {
56 }
57 if( level != player.m_BreathVapour )
58 {
59 player.m_BreathVapour = level;
60 player.SetSynchDirty();
61 }
62 }
const int BREATH_VAPOUR_LEVEL_MAX