DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс CCTWaterSurface
+ Граф наследования:CCTWaterSurface:

Защищенные члены

void CCTWaterSurface (float maximal_target_distance=UAMaxDistances.DEFAULT, string surfaceType="")
 
override bool Can (PlayerBase player, ActionTarget target)
 
override bool CanContinue (PlayerBase player, ActionTarget target)
 

Защищенные данные

const int HEIGHT_DIFF_LIMIT_METERS = 1.0
 
float m_MaximalActionDistanceSq
 
string m_SurfaceType
 
ref array< stringm_AllowedSurfaceList
 DEPRECATED.
 

Подробное описание

Конструктор(ы)

◆ CCTWaterSurface()

void CCTWaterSurface ( float maximal_target_distance = UAMaxDistances.DEFAULT,
string surfaceType = "" )
inlineprotected
10 {
13
16 }
float m_MaximalActionDistanceSq
Definition CCTWaterSurface.c:5
string m_SurfaceType
Definition CCTWaterSurface.c:6
ref array< string > m_AllowedSurfaceList
DEPRECATED.
Definition CCTWaterSurface.c:7
Definition EntityAI.c:95

Перекрестные ссылки m_AllowedSurfaceList, m_MaximalActionDistanceSq и m_SurfaceType.

Методы

◆ Can()

override bool Can ( PlayerBase player,
ActionTarget target )
inlineprotected

use hit position from ActionTarget otherwise player's position

special handling for sea

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)
32
33 float surfaceHeight = g_Game.SurfaceY(hitPosition[0], hitPosition[2]);
35 if (!surfaceType)
36 {
38 }
39
42 return false;
43
44 float distSq = vector.DistanceSq(player.GetPosition(), hitPosition);
46 return false;
47
49 }
DayZGame g_Game
Definition DayZGame.c:3815
const int HEIGHT_DIFF_LIMIT_METERS
Definition CCTWaterSurface.c:3
Definition EnMath.c:7
Definition Surface.c:2
static bool AllowedWaterSurface(float pHeight, string pSurface, array< string > pAllowedSurfaceList)
Definition Surface.c:31
Definition EnConvert.c:106
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.

Перекрестные ссылки Math::AbsFloat(), Surface::AllowedWaterSurface(), vector::DistanceSq(), g_Game, HEIGHT_DIFF_LIMIT_METERS, m_AllowedSurfaceList и m_MaximalActionDistanceSq.

◆ CanContinue()

override bool CanContinue ( PlayerBase player,
ActionTarget target )
inlineprotected
52 {
53 return true;
54 }

Поля

◆ HEIGHT_DIFF_LIMIT_METERS

const int HEIGHT_DIFF_LIMIT_METERS = 1.0
protected

Используется в Can().

◆ m_AllowedSurfaceList

ref array<string> m_AllowedSurfaceList
protected

DEPRECATED.

Используется в Can() и CCTWaterSurface().

◆ m_MaximalActionDistanceSq

float m_MaximalActionDistanceSq
protected

Используется в Can() и CCTWaterSurface().

◆ m_SurfaceType

string m_SurfaceType
protected

Используется в CCTWaterSurface().


Объявления и описания членов класса находятся в файле: