DayZ 1.24
Loading...
Searching...
No Matches
Surface Class Reference

Static Private Member Functions

static float GetParamFloat (string surface_name, string param_name)
 
static bool AllowedWaterSurface (float pHeight, string pSurface, array< string > pAllowedSurfaceList)
 

Detailed Description

Definition at line 1 of file Surface.c.

Member Function Documentation

◆ AllowedWaterSurface()

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

Definition at line 8 of file Surface.c.

9 {
10 if (pSurface)
11 {
12 pSurface.Replace("_ext", "");
13 pSurface.Replace("_int", "");
14 }
15
16 bool isSeaCheck = false;
17
18 foreach (string allowedSurface : pAllowedSurfaceList)
19 {
20 if (pSurface == "" && allowedSurface == UAWaterType.SEA)
21 isSeaCheck = pHeight <= g_Game.SurfaceGetSeaLevel() + 0.001;
22
24 return true;
25 }
26
27 return false;
28 }
DayZGame g_Game
Definition DayZGame.c:3528
const string SEA

References g_Game, and UAWaterType::SEA.

Referenced by CCTWaterSurface::Can(), and ItemBase::IsSurfaceWater().

◆ GetParamFloat()

static float Surface::GetParamFloat ( string surface_name,
string param_name )
inlinestaticprivate

Definition at line 3 of file Surface.c.

4 {
5 return GetGame().ConfigGetFloat("CfgSurfaces " + surface_name + " " + param_name);
6 }
proto native CGame GetGame()

References GetGame().

Referenced by ManBase::ProcessFeetDamageServer().


The documentation for this class was generated from the following file: