20 if (!target || (target && target.GetObject()))
24 vector hitPosition = target.GetCursorHitPos();
26 hitPosition = player.GetPosition();
29 float waterLevel = player.GetCurrentWaterLevel();
30 g_Game.SurfaceGetType3D(hitPosition[0], hitPosition[1] + waterLevel, hitPosition[2], surfaceType);
35 float surfaceHeight =
g_Game.SurfaceY(hitPosition[0], hitPosition[2]);
39 surfaceHeight = hitPosition[1];
42 float heightDiff =
Math.
AbsFloat(hitPosition[1] - surfaceHeight);
class ActionTargets ActionTarget
protected float m_MaximalActionDistanceSq
override bool CanContinue(PlayerBase player, ActionTarget target)
void CCTWaterSurface(float maximal_target_distance=UAMaxDistances.DEFAULT, string surfaceType="")
protected string m_SurfaceType
override bool Can(PlayerBase player, ActionTarget target)
protected const int HEIGHT_DIFF_LIMIT_METERS
protected ref array< string > m_AllowedSurfaceList
DEPRECATED.
static bool AllowedWaterSurface(float pHeight, string pSurface, array< string > pAllowedSurfaceList)
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.