DIFF

class WorldData

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 42

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
ref map<int, float> m_TemperatureUnderSunModifier
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 int m_ShortestDayOfYear = 1
Referenced by NasdaraData.Init()
protected int m_LongestDayOfYear = 1
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 float m_WorldWindCoef
protected bool m_IsSandstorm
protected bool m_IsSandstormStartedByWeather
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 45

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 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 int DayOfYear(int day, int month)

Returns number of day in current year (eg. 1 - 365)

protected float GetSunriseTime(float dayNumber)

Returns sunrise time for passed day

References Math.Cos(), m_LongestDayOfYear, m_Sunrise_Jan
Show 2 more, m_Sunrise_Jul, and Math.PI2
protected float GetSunsetTime(float dayNumber)

Returns sunset time for passed day

References Math.Cos(), m_LongestDayOfYear, m_Sunset_Jan
Show 2 more, m_Sunset_Jul, and Math.PI2
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()
protected void SetupDustEffects()
protected void StartSandstorm(float timeToGather)

Helper function that starts the sandstorm while setting an internal flag that allows WorldData identify the source of the call.

sealed void WeatherSandstormStart(bool continuedSession)

Event propagated from SandstormController::OnStart raised when the sandstorm starts and begins fading in to its target magnitude.

sealed void WeatherSandstormStop(bool calledFromWeather)

Event propagated from SandstormController::OnStop raised when the sandstorm fades out and terminates.

protected void OnSandstormStart(bool isStartedByWeather)
isStartedByWeather
Whether the start is instigated by WorldData (true) or external factors (false).

See also: See, `WeatherSandstormStart`, instead.

protected void OnSandstormStop(bool calledFromWeather)

See also: See, `WeatherSandstormStop`, instead.

float GetDayTemperature()
References m_DayTemperature
float GetNightTemperature()
DustEffectsSettings GetDustEffectsSettings()