File size: 8,987 Bytes
24b81cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
class World: Managed
{
//proto private void ~World();
//proto private void World();
proto void CheckSoundObstruction(EntityAI source, bool inSource, out float obstruction, out float occlusion);
proto native void GetPlayerList(out array<Man> players);
/**
\brief Sets the world time acceleration, overriding config. Mostly used for debug purposes.
\param timeMultiplier 0-64 acceleration value, -1 to reset back
*/
proto native void SetTimeMultiplier(float timeMultiplier);
/**
\brief Get actual ingame world time
\param year
\param month in range <1, 12>
\param day in range <1, 31>
\param hour in range <0, 23>
\param minute in range <0, 59>
@code
int year, month, day, hour, minute;
GetGame().GetWorld().GetDate(year, month, day, hour, minute);
@endcode
*/
proto void GetDate(out int year, out int month, out int day, out int hour, out int minute);
/**
\brief Sets actual ingame world time
\param year
\param month in range <1, 12>
\param day in range <1, 31>
\param hour in range <0, 23>
\param minute in range <0, 59>
@code
int year = 2016;
int month = 5;
int day = 4;
int hour = 14;
int minute = 57;
GetGame().GetWorld().SetDate(year, month, day, hour, minute);
@endcode
*/
proto native void SetDate(int year, int month, int day, int hour, int minute);
proto native float GetLatitude();
proto native float GetLongitude();
proto native float GetMoonIntensity();
proto native float GetSunOrMoon();
proto native bool IsNight();
proto native float GetEyeAccom();
proto native void SetEyeAccom(float eyeAccom);
proto native void StartFpsBenchmark(int sectorsCount, float preloadDistance, float fpsLimitRed, float fpsLimitGreen, float fpsLimitBlue, float minX, float minY, float maxX, float maxY);
proto native void StartFpsBenchmarkWithMask(float preloadDistance, float fpsLimitRed, float fpsLimitGreen, float fpsLimitBlue);
proto native void StartFpsBenchmarkViews(string xmlFileName, float preloadDistance);
proto native void SetBuldozerWaterEnabled(bool enable);
/**
\brief Sets preferred view distance, which persists between game sessions
\param distance
*/
proto native void SetPreferredViewDistance(float distance);
proto native void SetViewDistance(float distance);
proto native void SetObjectViewDistance(float distance);
proto native void SetExplicitVolumeFactor_EnvSounds2D(float factor, float fadeTime);
/**
\brief Affects env sound controller value 'Shooting'
\param sound position
\param relative value (0..1) - how much should be value decreased
*/
proto native void AddEnvShootingSource(vector position, float shootingValDecrease);
proto int GetWorldSize();
/**
\brief Translates world coordinates to a grid coordinates(map grid)
\param pos
\param size of grid in meters
\param x grid position result [out]
\param z grid position result [out]
@code
int x,z;
GetGame().GetWorld().GetGridCoords(GetGame().GetPlayer().GetPosition(), 100, x, z);
@endcode
*/
proto void GetGridCoords(vector pos, float gridSize, out int gridX, out int gridZ);
/**
load light config
*/
proto native void LoadNewLightingCfg(string path);
/**
load user light config (just first item is used)
*/
proto native void LoadUserLightingCfg(string path, string name);
/**
set lerp to user lighting cfg
*/
proto native void SetUserLightingLerp(float val);
/**
returns reference to AIWorld
*/
proto native AIWorld GetAIWorld();
/**
For entities that aren't a house, any animation source that contains "door" is treated as a door by the pathgraph.
Using the phase value where 0=CLOSED, 1=OPENED, we can update the state of the door without regenerating the tile
*/
proto native void UpdatePathgraphDoorByAnimationSourceName(notnull Object object, string animSourceName);
proto native void MarkObjectForPathgraphUpdate(Object object);
proto native void ProcessMarkedObjectsForPathgraphUpdate();
/*!
@code
Material matColors = GetGame().GetWorld().GetMaterial("postprocess/glow");
SetMaterialParam(matColors, "Saturation", 0.8);
float color[4];
color[0] = 0.5;
color[1] = 0.8;
color[2] = 0.7;
color[3] = 0.6;
SetMaterialParam(matColors, "OverlayColor", color);
@endcode
*/
proto native Material GetMaterial(string materialName);
/*!
set new PP effect and its material
\param camera number of camera
\param effectIndex index of effect
\param effectName name of effect
\param matName name of material
*/
proto native void SetCameraPostProcessEffect(int cam, int ppEffect, string effectName, string materialName);
void SetAperture(float invDiameter)
{
if (invDiameter <= 0)
{
SetEyeAccom(-1);
}
else
{
float apertureArea = 1.0 / invDiameter;
SetEyeAccom(apertureArea * apertureArea);
}
}
/*!
checks if 3rd person camera is disabled from server
*/
proto native bool Is3rdPersonDisabled();
/*!
checks if crosshair is disabled from server
*/
proto native bool IsCrosshairDisabled();
/*!
checks if mouse and keyboard is enabled from server (only on console)
*/
proto native bool IsMouseAndKeyboardEnabledOnServer();
/*!
Returns the value set in server config for notifying high ping
*/
proto native int GetPingWarningThreshold();
/*!
Returns the value set in server config for notifying high ping
*/
proto native int GetPingCriticalThreshold();
/*!
Returns the value set in server config for notifying low server fps
*/
proto native float GetServerFpsWarningThreshold();
/*!
Returns the value set in server config for notifying low server fps
*/
proto native float GetServerFpsCriticalThreshold();
/*!
enable/disable transmiting voice over network globally
\param disable if true, then VoN is no more usable for transmiting voice
*/
proto native void DisableTransmitVoN(bool disable);
/*!
enable/disable receiving all voice over network globally
\param disable if true, then player is not able listen any voice from VoN
\return true if mute request was sent successfully to server. If false, then was problem with sent request or missing player idendity.
*/
proto native bool DisableReceiveVoN(bool disable);
/*!
\return true if transmiting voice over network is disabled, so player can not talking
*/
proto native bool IsDisabledTransmitingVoN();
/*!
\return true, if receiving voice over network is disabled, so player can not listen anybody
*/
proto native bool IsDisabledReceivingVoN();
/*!
enables/disables player's voice communication
\param listening enable or disable microphone
\param toggled enable or disable PTT/Voice activation
*/
proto void SetVoiceOn(bool listening, bool toggled = false);
/*!
create sphere
\param worldX world X of touch with ground
\param worldZ world X of touch with ground
\param radius radius
\param centerLerp01 lerp of values inside rasterization
\param timeDown01 relative speed of going down, 1 is usually 0.5secs
\param maxHeight01 maximum relative height of flattening, 0 = no flatten
*/
proto native void FlattenGrassSphere(float x, float z, float radius, float centerLerp01, float timeDown01, float maxHeight01);
/*!
create ellipse
\param worldX world X of touch with ground
\param worldZ world X of touch with ground
\param radiusX radius in X coord before rotate
\param radiusZ radius in Z coord before rotate
\param offset offset, 0 = default center, <-1, 1>
\param angleRAD rotation
\param centerLerp01 lerp of values inside rasterization
\param timeDown01 relative speed of going down, 1 is usually 0.5secs
\param maxHeight01 maximum relative height of flattening, 0 = no flatten
*/
proto native void FlattenGrassEllipse(float x, float z, float sideX, float sideZ, float offset, float angleRAD, float centerLerp01, float timeDown01, float maxHeight01);
/*!
create box
\param worldX world X of touch with ground
\param worldZ world X of touch with ground
\param sideSize size of side
\param angleRAD rotation
\param centerLerp01 lerp of values inside rasterization
\param timeDown01 relative speed of going down, 1 is usually 0.5secs
\param maxHeight01 maximum relative height of flattening, 0 = no flatten
*/
proto native void FlattenGrassBox(float x, float z, float side, float angleRAD, float centerLerp01, float timeDown01, float maxHeight01);
/*!
create rectangle
\param worldX world X of touch with ground
\param worldZ world X of touch with ground
\param sideXSize size of side in X
\param sideZSize size of side in Z
\param offset offset, 0 = default center, <-1, 1>
\param angleRAD rotation
\param centerLerp01 lerp of values inside rasterization
\param timeDown01 relative speed of going down, 1 is usually 0.5secs
\param maxHeight01 maximum relative height of flattening, 0 = no flatten
*/
proto native void FlattenGrassRect(float x, float z, float sideX, float sideZ, float offset, float angleRAD, float centerLerp01, float timeDown01, float maxHeight01);
};
|