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