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

◆ ApplySurfaceDistanceModifier()

void ScriptedSandstormController::ApplySurfaceDistanceModifier ( inout float intensity,
PlayerBase player )
inlineprivate

См. определение в файле ScriptedSandstormController.c строка 199

200 {
201 vector playerPos = player.GetPosition();
202 //float surfaceHeight = GetInterpolatedSurfaceY(playerPos[0], playerPos[2]);
203 float surfaceHeight = g_Game.SurfaceY(playerPos[0], playerPos[2]);
204
205 if (playerPos[1] < surfaceHeight)
206 {
207 float depthBelowSurface = surfaceHeight - playerPos[1];
208 float fade = Math.Clamp(depthBelowSurface * MAX_SURFACE_DISTANCE_INVERSE, 0, 1.0);
209 intensity *= (1.0 - fade);
210 }
211 }
DayZGame g_Game
Определения DayZGame.c:4074
static const float MAX_SURFACE_DISTANCE_INVERSE
Определения ScriptedSandstormController.c:8

Перекрестные ссылки Math::Clamp(), g_Game и MAX_SURFACE_DISTANCE_INVERSE.

Используется в ApplyUndergroundModifier().