D3ltaQ's picture
Upload 2197 files
24b81cb verified
raw
history blame contribute delete
680 Bytes
class Surface
{
static float GetParamFloat(string surface_name, string param_name)
{
return GetGame().ConfigGetFloat("CfgSurfaces " + surface_name + " " + param_name);
}
static bool AllowedWaterSurface(float pHeight, string pSurface, array<string> pAllowedSurfaceList)
{
if (pSurface)
{
pSurface.Replace("_ext", "");
pSurface.Replace("_int", "");
}
bool isSeaCheck = false;
foreach (string allowedSurface : pAllowedSurfaceList)
{
if (pSurface == "" && allowedSurface == UAWaterType.SEA)
isSeaCheck = pHeight <= g_Game.SurfaceGetSeaLevel() + 0.001;
if (isSeaCheck || allowedSurface == pSurface)
return true;
}
return false;
}
}