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

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

void ActionDeployBase ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool HasProgress ()
 
override ActionData CreateActionData ()
 
override Vector2 GetCameraUDAngle ()
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnItemLocationChanged (ItemBase item)
 
override void OnUpdate (ActionData action_data)
 
void DropDuringPlacing (PlayerBase player)
 
void MoveEntityToFinalPosition (ActionData action_data, vector position, vector orientation)
 
void MoveEntityToFinalPositionSinglePlayer (ActionData action_data, InventoryLocation source, InventoryLocation destination)
 

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

const float POSITION_OFFSET = 0.5
 
ref array< ItemBasem_MovedItems
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

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

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

◆ ActionDeployBase()

void ActionDeployBase ( )
inlineprotected
26 {
27 m_CallbackClass = ActiondeployObjectCB;
29 m_FullBody = true;
30
31 m_Text = "#deploy_object";
32 }
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
float m_SpecialtyWeight
Definition ActionBase.c:77
m_CallbackClass
Definition AnimatedActionBase.c:145
Definition EntityAI.c:95

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, ActionBase::m_FullBody, ActionBase::m_SpecialtyWeight и ActionBase::m_Text.

Методы

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprotected
51 {
54
55 return action_data;
56 }
ref array< ItemBase > m_MovedItems
Definition ActionDeployBase.c:23
Definition ActionDeployBase.c:2

Перекрестные ссылки m_MovedItems.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprotected
35 {
38 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINone.c:2
Definition CCTNone.c:2

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ DropDuringPlacing()

void DropDuringPlacing ( PlayerBase player)
inlineprotected
143 {
145 if (!Class.CastTo(item, player.GetItemInHands()))
146 return;
147
148 if (item.IsBasebuildingKit())
149 return;
150
151 player.PredictiveDropEntity(item);
152 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition InventoryItem.c:731
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo().

◆ GetCameraUDAngle()

override Vector2 GetCameraUDAngle ( )
inlineprotected
59 {
60 Vector2 udAngle = new Vector2(-80, -20);
61 return udAngle;
62 }
Definition Vector2.c:2

◆ HasProgress()

override bool HasProgress ( )
inlineprotected
46 {
47 return true;
48 }

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

◆ HasTarget()

override bool HasTarget ( )
inlineprotected
41 {
42 return false;
43 }

◆ MoveEntityToFinalPosition()

void MoveEntityToFinalPosition ( ActionData action_data,
vector position,
vector orientation )
inlineprotected
155 {
156 if (action_data.m_MainItem.IsBasebuildingKit())
157 return;
158
161 float direction[4];
164
167
168 if (entity_for_placing.GetInventory().GetCurrentInventoryLocation(source))
169 {
171
172 if (GetGame().IsMultiplayer())
173 action_data.m_Player.ServerTakeToDst(source, destination);
174 else // singleplayer
176
177 }
178 }
void MoveEntityToFinalPositionSinglePlayer(ActionData action_data, InventoryLocation source, InventoryLocation destination)
Definition ActionDeployBase.c:180
Definition Building.c:6
InventoryLocation.
Definition InventoryLocation.c:29
Definition EnMath3D.c:28
Definition EnConvert.c:106
proto native CGame GetGame()
static proto void MatrixToQuat(vector mat[3], out float d[4])
Converts rotation matrix to quaternion.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.

Перекрестные ссылки GetGame(), Math3D::MatrixToQuat(), MoveEntityToFinalPositionSinglePlayer() и Math3D::YawPitchRollMatrix().

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

◆ MoveEntityToFinalPositionSinglePlayer()

void MoveEntityToFinalPositionSinglePlayer ( ActionData action_data,
InventoryLocation source,
InventoryLocation destination )
inlineprotected
181 {
182 if (HasProgress())
183 action_data.m_Player.GetInventory().TakeToDst(InventoryMode.LOCAL, source, destination); // from ground to target position
184 else
185 action_data.m_Player.GetDayZPlayerInventory().RedirectToHandEvent(InventoryMode.LOCAL, source, destination); // placing directly from inventory
186 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
override bool HasProgress()
Definition ActionDeployBase.c:45

Перекрестные ссылки HasProgress().

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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprotected
65 {
68
69 if (!poActionData)
70 return;
71
72 if (!action_data.m_MainItem)
73 return;
74
78
79 // In case of placement with hologram
80 if (action_data.m_Player.GetHologramServer())
81 {
82 position = action_data.m_Player.GetLocalProjectionPosition();
83 orientation = action_data.m_Player.GetLocalProjectionOrientation();
84
85 action_data.m_Player.GetHologramServer().EvaluateCollision(action_data.m_MainItem);
86 if (GetGame().IsMultiplayer() && action_data.m_Player.GetHologramServer().IsColliding())
87 return;
88
89 action_data.m_Player.GetHologramServer().PlaceEntity(entity_for_placing);
90
91 if (GetGame().IsMultiplayer())
92 action_data.m_Player.GetHologramServer().CheckPowerSource();
93 }
94 else
95 {
96 position = action_data.m_Player.GetPosition();
97 orientation = action_data.m_Player.GetOrientation();
98 position = position + (action_data.m_Player.GetDirection() * POSITION_OFFSET);
99 }
100
102 GetGame().ClearJunctureEx(action_data.m_Player, entity_for_placing);
103 action_data.m_MainItem.SetIsBeingPlaced(false);
104 poActionData.m_AlreadyPlaced = true;
105 action_data.m_MainItem.SoundSynchRemoteReset();
106
107 entity_for_placing.OnPlacementComplete(action_data.m_Player, position, orientation); //beware, this WILL fire on server before the item is moved to final position!
108 action_data.m_Player.PlacingCompleteServer();
109
110 m_MovedItems.Clear();
111 }
const float POSITION_OFFSET
Definition ActionDeployBase.c:21
void MoveEntityToFinalPosition(ActionData action_data, vector position, vector orientation)
Definition ActionDeployBase.c:154

Перекрестные ссылки GetGame(), m_MovedItems, MoveEntityToFinalPosition() и POSITION_OFFSET.

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( ItemBase item)
inlineprotected
114 {
115 super.OnItemLocationChanged(item);
116
117 if (!GetGame().IsDedicatedServer())
118 {
119 if (m_MovedItems)
120 m_MovedItems.Insert(item);
121 }
122 }

Перекрестные ссылки GetGame() и m_MovedItems.

◆ OnUpdate()

override void OnUpdate ( ActionData action_data)
inlineprotected
125 {
126 super.OnUpdate(action_data);
127
128 foreach (ItemBase item : m_MovedItems)
129 {
130 if (item == action_data.m_MainItem)
131 {
133 item.GetInventory().GetCurrentInventoryLocation(loc);
134 if (loc && loc.GetType() == InventoryLocationType.GROUND) // if main item is placed on ground during deploy, re-reserve it
136 }
137 }
138
139 m_MovedItems.Clear();
140 }
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
bool InventoryReservation(ActionData action_data)
Definition ActionBase.c:863

Перекрестные ссылки ActionBase::InventoryReservation() и m_MovedItems.

Поля

◆ m_MovedItems

ref array<ItemBase> m_MovedItems
protected

◆ POSITION_OFFSET

const float POSITION_OFFSET = 0.5
protected

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


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