DIFF

class WorldDataSource

Keeps information about currently loaded world, like temperature

Constructors 1

void WorldData()

Constants 2

const float SPAWN_CHANCE_CHOLERA_DEF = 50
Referenced by GetAgentSpawnChance()
const float COLD_AREA_TOOL_DMG_MODIF_DEF = 1

Members 36

float m_TemperaturePerHeightReductionModifier

directly accesible (defined/overriden in Init())

float m_CloudsTemperatureEffectModifier

how many % of environment temperature can be lowered by clouds

float m_TemperatureInsideBuildingsModifier
float m_WaterContactTemperatureModifier
protected float SUDDENCHANGE_TIME_MULTIPLIER = 0.2
protected float SUDDENCHANGE_LENGTH_MULTIPLIER = 0.4
protected float m_EnvironmentTemperature
protected bool m_EnTempUpdated
protected float m_Timer
protected float m_MaxTemps[12]
protected float m_MinTemps[12]
protected float m_Sunrise_Jan
protected float m_Sunset_Jan
protected float m_Sunrise_Jul
protected float m_Sunset_Jul
protected ref array<vector> m_FiringPos

Where we should fire from. On Init set the relevant data

protected bool m_Pollution
protected ref TStringArray m_DefaultPlayerRestrictedAreas
protected int m_BadWeatherChance

weather related

protected bool m_IsSuddenChange
protected float m_WorldWindCoef
Referenced by ChernarusPlusData.Init(), EnochData.Init(), GetWindCoef()
Show 1 more, Init()
protected float m_UniversalTemperatureSourceCapModifier
protected float m_DayTemperature = 10

DEPRECATED

Referenced by GetDayTemperature()
protected float m_NightTemperature = 6

legacy, no longer used

Referenced by GetNightTemperature()

Methods 34

float GetApproxSunriseTime(float monthday)
float GetApproxSunsetTime(float monthday)
References m_Sunset_Jan, and m_Sunset_Jul
protected float CalcBaseEnvironmentTemperature(float monthday, float daytime)
void UpdateWeatherEffects(Weather weather, float timeslice)

Updates *local* weather effects.

weather
Weather instance
timeslice
Time delta since last update
Referenced by DayZGame.OnUpdate()
float ComputeSnowflakeScale(Weather weather)

Returns the desired snowflake scale based on weather simulation state.

weather
Weather instance
float GetBaseEnvTemperatureExact(int month, int day, int hour, int minute)
Referenced by BaseTempDebug()
bool WeatherOnBeforeChange(EWeatherPhenomenon type, float actual, float change, float time)
array<vector> GetArtyFiringPos()
References m_FiringPos
float GetAgentSpawnChance(eAgents agent)
float GetColdAreaToolDamageModifier()
void BaseTempDebug(int month, int day)
float GetUniversalTemperatureSourceCapModifier()
float GetTemperature(Object object, EEnvironmentTemperatureComponent properties = EEnvironmentTemperatureComponent.BASE)

Return actual temperature of environment based on provided parameters

object
Reference to object that is used mainly for sea height related calculation
properties
Flag made of EEnvironmentTemperatureComponent which will influence the resulting value of temperature based on combination of the parts
float GetTemperatureComponentValue(float temperatureIn, EEnvironmentTemperatureComponent properties = 0)

Return value of queried EEnvironmentTemperatureComponent which can be used in future calculation(s)

temperature
Base temperature which will be used in component calculation (currently WIND only)
properties
Flag made of EEnvironmentTemperatureComponent which will influence the resulting value of temperature based on combination of the parts
protected void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
protected void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
protected void CreateYieldBank()
Referenced by WorldData()
protected void InitYieldBank()

override this to properly register world-specific yields

protected void SetupLiquidTemperatures()
Referenced by Init()
float GetDayTemperature()
References m_DayTemperature
float GetNightTemperature()