DayZ 1.24
Loading...
Searching...
No Matches
FirearmActionMechanicManipulate.c
Go to the documentation of this file.
2{
6
7 override bool HasTarget()
8 {
9 return false;
10 }
11
12 override typename GetInputType()
13 {
15 }
16
18 {
21 }
22
23 override bool HasProgress()
24 {
25 return false;
26 }
27
28
29 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item) //condition for action
30 {
31 if (!super.ActionCondition(player, target, item))
32 return false;
33
34 bool result = false;
36 if (player.GetWeaponManager().CanEjectBullet(wpn))
37 {
38 if (GetGame().IsServer() && GetGame().IsMultiplayer())
39 result = true;
40 else
41 {
42 if (player.GetWeaponManager().CanEjectBulletVerified())
43 result = true;
44 player.GetWeaponManager().SetEjectBulletTryTimestamp();
45 }
46 }
47 return result;
48 }
49
51 {
52 super.Start(action_data);
53
54 action_data.m_Player.GetWeaponManager().EjectBulletVerified(this);
55 }
56};
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void Start(ActionData action_data)
proto native CGame GetGame()