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

◆ TryGetNonWaterSurfaceAt()

bool CCTLiquid::TryGetNonWaterSurfaceAt ( vector probePosition,
out vector surfacePosition )
inlineprotected

Check if we have the same or an other liquid surface

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

951 {
952 surfacePosition = vector.Zero;
953
954 m_SurfaceDetectionParamsNoWater.position = probePosition;
955 m_SurfaceDetectionParamsNoWater.rsd = RoadSurfaceDetection.CLOSEST;
956 SurfaceDetectionResult surfaceResult = new SurfaceDetectionResult();
957 if (!g_Game.GetSurface(m_SurfaceDetectionParamsNoWater, surfaceResult))
958 return false;
959
960 if (!surfaceResult)
961 return false;
962
963 SurfaceInfo surfaceInfo = surfaceResult.surface;
964 if (!surfaceInfo)
965 return false;
966
967 string surfaceType = surfaceInfo.GetSurfaceType();
968 if (surfaceType == string.Empty)
969 return false;
970
971 int surfaceLiquid = surfaceInfo.GetLiquidType();
973 if (surfaceLiquid > LIQUID_NONE)
974 return false;
975
976 surfacePosition = probePosition;
977 surfacePosition[1] = surfaceResult.height;
978
979 return true;
980 }
DayZGame g_Game
Определения DayZGame.c:4074
Empty
Определения Hand_States.c:14
int[] SurfaceInfo
Определения SurfaceInfo.c:1
ref SurfaceDetectionParameters m_SurfaceDetectionParamsNoWater
Определения CCTLiquid.c:26
SurfaceInfo surface
Returned SurfaceInfo, plain pointer.
Определения SurfaceInfo.c:134
float height
Height position.
Определения SurfaceInfo.c:122
proto int GetLiquidType()
See 'LiquidTypes' in 'constants.c'.
proto string GetSurfaceType()
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:566

Перекрестные ссылки Empty, g_Game, SurfaceInfo::GetLiquidType(), SurfaceInfo::GetSurfaceType(), SurfaceDetectionResult::height, LIQUID_NONE, m_SurfaceDetectionParamsNoWater, SurfaceDetectionResult::surface и vector::Zero.

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