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

◆ Can()

override bool Can ( PlayerBase player,
ActionTarget target )
protected

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

69 {
70 if (!target || (target && target.GetObject()))
71 return false;
72
73 vector hitPosition = target.GetCursorHitPos();
74 string surfaceType;
75 g_Game.SurfaceGetType3D(hitPosition[0], hitPosition[1], hitPosition[2], surfaceType);
76
77 float distSq = vector.DistanceSq(player.GetPosition(), hitPosition);
78 if (distSq > m_MaximalActionDistanceSq)
79 return false;
80
81 return Surface.CheckLiquidSource(hitPosition[1], surfaceType, m_AllowedLiquidSource);
82 }
int m_AllowedLiquidSource
Определения CCTWaterSurface.c:60
CCTWaterSurface m_MaximalActionDistanceSq
DayZGame g_Game
Определения DayZGame.c:3868
static bool CheckLiquidSource(float pHeight, string pSurface, int allowedWaterSourceMask)
Определения Surface.c:54
Определения Surface.c:2
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
Определения EnConvert.c:106

Перекрестные ссылки ActionTarget, Surface::CheckLiquidSource(), vector::DistanceSq(), g_Game, m_AllowedLiquidSource и m_MaximalActionDistanceSq.