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

◆ AllowedWaterSurface()

static bool Surface::AllowedWaterSurface ( float pHeight,
string pSurface,
array< string > pAllowedSurfaceList )
inlinestaticprivate

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

22 {
23 if (pSurface)
24 {
25 pSurface.Replace("_ext", "");
26 pSurface.Replace("_int", "");
27 pSurface.Replace("sakhal_", "");
28 }
29
30 bool isSeaCheck = false;
31
32 foreach (string allowedSurface : pAllowedSurfaceList)
33 {
34 if (pSurface == "" && allowedSurface == UAWaterType.SEA)
35 isSeaCheck = pHeight <= (g_Game.SurfaceGetSeaLevel() + 0.25); //MaxWave_default
36
37 if (isSeaCheck || allowedSurface == pSurface)
38 return true;
39 }
40
41 return false;
42 }
DayZGame g_Game
Определения DayZGame.c:4074
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.

Перекрестные ссылки g_Game, string::Replace() и UAWaterType::SEA.

Используется в CCTWaterSurface::Can() и ItemBase::IsSurfaceWater().