20 if (!target || (target && target.GetObject()))
24 vector hitPosition = target.GetCursorHitPos();
27 float waterLevel = player.GetCurrentWaterLevel();
28 g_Game.SurfaceGetType3D(hitPosition[0], hitPosition[1] + waterLevel, hitPosition[2], surfaceType);
33 float surfaceHeight =
g_Game.SurfaceY(hitPosition[0], hitPosition[2]);
37 surfaceHeight = hitPosition[1];
40 float heightDiff =
Math.
AbsFloat(hitPosition[1] - surfaceHeight);
70 if (!target || (target && target.GetObject()))
73 vector hitPosition = target.GetCursorHitPos();
75 g_Game.SurfaceGetType3D(hitPosition[0], hitPosition[1], hitPosition[2], surfaceType);
class ActionTargets ActionTarget
int m_AllowedLiquidSource
void CCTWaterSurfaceEx(float maximal_target_distance, int allowedLiquidSource)
CCTWaterSurface m_MaximalActionDistanceSq
bool CanContinue(PlayerBase player, ActionTarget target)
bool Can(PlayerBase player, ActionTarget target)
float m_MaximalActionDistanceSq
override bool CanContinue(PlayerBase player, ActionTarget target)
override bool Can(PlayerBase player, ActionTarget target)
void CCTWaterSurface(float maximal_target_distance=UAMaxDistances.DEFAULT, string surfaceType="")
const int HEIGHT_DIFF_LIMIT_METERS
ref array< string > m_AllowedSurfaceList
DEPRECATED.
static bool AllowedWaterSurface(float pHeight, string pSurface, array< string > pAllowedSurfaceList)
static bool CheckLiquidSource(float pHeight, string pSurface, int allowedWaterSourceMask)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto float AbsFloat(float f)
Returns absolute value.