DayZ 1.24
Loading...
Searching...
No Matches
ActionCPR.c
Go to the documentation of this file.
10
12{
13 void ActionCPR()
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CPR;
17 m_FullBody = true;
18 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
20 m_Text = "#cpr";
21 }
22
23 override typename GetInputType()
24 {
26 }
27
29 {
30 action_data.m_Player.TryHideItemInHands(true);
31 }
32
34 {
35 action_data.m_Player.TryHideItemInHands(true);
36 }
37
43
44 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
45 {
46 PlayerBase other_player = PlayerBase.Cast(target.GetObject());
47 bool holds_heavy_item = item && item.IsHeavyBehaviour();
48 return other_player.IsUnconscious() && !holds_heavy_item;
49 }
50
51 /*override void OnFinishProgressClient(ActionData action_data)
52 {
53 action_data.m_Player.TryHideItemInHands(false);
54 }*/
55
57 {
58 PlayerBase other_player = PlayerBase.Cast(action_data.m_Target.GetObject());
59 other_player.GiveShock(5);
60 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
61 }
62
64 {
65
66 }
67
69 {
70 if (action_data.m_Player) action_data.m_Player.TryHideItemInHands(false);
71 }
72
74 {
75 if (action_data.m_Player) action_data.m_Player.TryHideItemInHands(false);
76 }
77
78};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
override void CreateActionComponent()
Definition ActionCPR.c:5
const float REPEAT_AFTER_SEC
Definition ActionCPR.c:3
override void OnStartServer(ActionData action_data)
Definition ActionCPR.c:33
override void OnEndServer(ActionData action_data)
Definition ActionCPR.c:68
void ActionCPR()
Definition ActionCPR.c:13
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionCPR.c:44
override void OnStartClient(ActionData action_data)
Definition ActionCPR.c:28
override void OnEndClient(ActionData action_data)
Definition ActionCPR.c:73
override GetInputType()
Definition ActionCPR.c:23
override void CreateConditionComponents()
Definition ActionCPR.c:38
override void OnFinishProgressServer(ActionData action_data)
Definition ActionCPR.c:56
override void OnExecuteServer(ActionData action_data)
Definition ActionCPR.c:63
ref CABase m_ActionComponent
Definition ActionBase.c:30
Definition CCTMan.c:2
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597