DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetWind()

proto native void Weather::SetWind ( vector wind)
private

Sets the wind vector (direction and speed as length of the vector).

Заметки
Equivalent to setting WindMagnitude and WindDirection phenomenon(s) with zero time and duration.
См. также
See Weather.WindDirectionToAngle and Weather.AngleToWindDirection for conversions.
float len = wind.Normalize();
if ( len > 0 )
{
float angle = WindDirectionToAngle( wind );
GetWindMagnitude().Set( len, 0, 0 );
GetWindDirection().Set( angle, 0, 0 );
}
proto native WindMagnitude GetWindMagnitude()
Returns a wind magnitude phenomenon object.
static proto float WindDirectionToAngle(vector dir)
Returns the xz angle of the provided wind vector.
proto native WindDirection GetWindDirection()
Returns a wind direction phenomenon object.
proto native void Set(float forecast, float time=0, float minDuration=0)
Sets the forecast.