19 {
20 if (!target || (target && target.GetObject()))
21 return false;
22
24 vector hitPosition = target.GetCursorHitPos();
25
26 string surfaceType;
27 float waterLevel = player.GetCurrentWaterLevel();
28 g_Game.SurfaceGetType3D(hitPosition[0], hitPosition[1] + waterLevel, hitPosition[2], surfaceType);
29
30 if (waterLevel > 0.0)
31 return Surface.AllowedWaterSurface(hitPosition[1] + waterLevel, surfaceType,
m_AllowedSurfaceList);
32
33 float surfaceHeight =
g_Game.SurfaceY(hitPosition[0], hitPosition[2]);
35 if (!surfaceType)
36 {
37 surfaceHeight = hitPosition[1];
38 }
39
40 float heightDiff = Math.AbsFloat(hitPosition[1] - surfaceHeight);
42 return false;
43
44 float distSq = vector.DistanceSq(player.GetPosition(), hitPosition);
46 return false;
47
49 }
float m_MaximalActionDistanceSq
const int HEIGHT_DIFF_LIMIT_METERS
ref array< string > m_AllowedSurfaceList
DEPRECATED.