DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionDropItem.c
См. документацию.
2{
3 override void CreateActionComponent()
4 {
5 super.CreateActionComponent();
7 }
8
9 override void EndActionComponent()
10 {
11 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
12 m_ActionData.m_State = UA_FINISHED;
13 }
14
16 {
18 m_ActionData.m_Player.GetMovementState(ms);
19 if (ms.m_CommandTypeId == DayZPlayerConstants.COMMANDID_MOVE)
20 {
21 // Cancel action, if hands are raised
22 if (ms.IsRaised())
23 return true;
24 }
25
26 return false;
27 }
28}
29
31{
32 string m_ItemName = "";
33
35 {
36 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_DROPITEM_HANDS;
37 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_DROPITEM_HANDS;
38 m_CallbackClass = ActionDropItemCB;
39 m_Text = "#drop_item";
40 }
41
43 {
46 }
47
48 override typename GetInputType()
49 {
50 return DropActionInput;
51 }
52
53 override bool HasProneException()
54 {
55 return true;
56 }
57
58 override bool CanBeUsedThrowing()
59 {
60 return true;
61 }
62
65 {
66 return false;
67 }
68
69 override bool HasTarget()
70 {
71 return false;
72 }
73
74 override bool UseAcknowledgment()
75 {
76 return false;
77 }
78
79 override bool ActionConditionContinue(ActionData action_data)
80 {
81 return true;
82 }
83
84 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
85 {
86 if (!player || !item)
87 return false;
88
89 HumanInputController hic = player.GetInputController();
90 HumanCommandMove hcm = player.GetCommand_Move();
91
93 if (hic && (hic.IsStanceChange() || hic.IsThrowingModeChange()))
94 return false;
95
97 if (hcm && (hcm.IsChangingStance() || hcm.IsStandingFromBack()))
98 return false;
99
100 return true;
101 }
102
103 override void OnExecuteServer(ActionData action_data)
104 {
105 if (action_data.m_Player.IsPlacingServer())
106 action_data.m_Player.PlacingCancelServer();
107
108 ClearInventoryReservationEx(action_data);
109
110 if (g_Game.IsServer() && g_Game.IsMultiplayer())
111 {
112 action_data.m_Player.ServerDropEntity(action_data.m_Player.GetItemInHands()); // multiplayer server side
113 }
114 else
115 {
116 PhysicalDropItem(action_data); // single player or multiplayer client side
117 }
118 }
119
120 void PhysicalDropItem(ActionData action_data)
121 {
122 action_data.m_Player.PhysicalPredictiveDropItem(action_data.m_Player.GetItemInHands());
123 }
124}
string m_Text
Определения ActionBase.c:57
bool ActionConditionContinue(ActionData action_data)
Определения ActionBase.c:436
bool HasTarget()
Определения ActionBase.c:259
bool UseAcknowledgment()
Определения ActionBase.c:1255
void CreateConditionComponents()
Определения ActionBase.c:245
GetInputType()
Определения ActionBase.c:230
ref CCIBase m_ConditionItem
Определения ActionBase.c:63
ref CCTBase m_ConditionTarget
Определения ActionBase.c:64
void ClearInventoryReservationEx(ActionData action_data)
Определения ActionBase.c:1120
bool CanBeUsedThrowing()
Определения ActionBase.c:391
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionBase.c:441
bool HasProneException()
Определения ActionBase.c:768
bool CanBePerformedWhileChangingStance()
Condition used in PlayerBase::CanChangeStance to check if stance can be changed while action is perfo...
Определения ActionBase.c:346
DetachActionData m_ItemName
override void OnExecuteServer(ActionData action_data)
Определения ActionDigOutStash.c:57
void PhysicalDropItem(ActionData action_data)
Определения ActionDropItem.c:120
void ActionDropItem()
Определения ActionDropItem.c:34
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
Определения ActionTargets.c:125
DayZGame g_Game
Определения DayZGame.c:4074
void SetCommand(int command_uid)
Определения AnimatedActionBase.c:56
ActionData m_ActionData
Определения AnimatedActionBase.c:3
PlayerBase m_Player
Определения ActionBase.c:40
Определения ActionBase.c:22
override void EndActionComponent()
Определения ActionDropItem.c:9
override void CreateActionComponent()
Определения ActionDropItem.c:3
bool CancelCondition()
Определения ActionDropItem.c:15
Определения ActionDropItem.c:2
Определения CCINone.c:2
Определения CCTNone.c:2
Определения ActionInput.c:675
proto native bool IsStandingFromBack()
return true if prone on back is chaning to crounch/stand
proto native bool IsChangingStance()
returns true if character is changing stance
Определения human.c:454
proto native bool IsThrowingModeChange()
returns true if change of throwing mode has been requested
proto native bool IsStanceChange()
stance change button was pressed
Определения human.c:18
int m_CommandTypeId
Определения human.c:1182
bool IsRaised()
Определения human.c:1190
Определения human.c:1181
Определения PlayerBaseClient.c:2
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
const int UA_FINISHED
Определения 3_Game/DayZ/constants.c:498
proto native void EnableCancelCondition(bool pEnable)