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

◆ AllowedWaterSurface()

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

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

32 {
33 if (pSurface)
34 {
35 pSurface.Replace("_ext", "");
36 pSurface.Replace("_int", "");
37 pSurface.Replace("sakhal_", "");
38 }
39
40 bool isSeaCheck = false;
41
42 foreach (string allowedSurface : pAllowedSurfaceList)
43 {
44 if (pSurface == "" && allowedSurface == UAWaterType.SEA)
45 isSeaCheck = pHeight <= (g_Game.SurfaceGetSeaLevel() + 0.25); //MaxWave_default
46
47 if (isSeaCheck || allowedSurface == pSurface)
48 return true;
49 }
50
51 return false;
52 }
DayZGame g_Game
Определения DayZGame.c:3868
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().