DayZ
1.24
Loading...
Searching...
No Matches
CAContinuousLoadMagazine.c
Go to the documentation of this file.
1
class
CAContinuousLoadMagazine
:
CAContinuousRepeat
2
{
3
protected
float
m_TargetUnits
;
4
protected
float
m_SpentQuantity
;
5
protected
float
m_ItemQuantity
;
6
protected
float
m_ItemMaxQuantity
;
7
protected
float
m_SourceQuantity
;
8
protected
float
m_QuantityFilledPerSecond
;
9
//protected ref Param1<float> m_SpentUnits;
10
11
void
CAContinuousLoadMagazine
(
float
time_to_complete_action
)
12
{
13
m_DefaultTimeToComplete
=
time_to_complete_action
;
14
}
15
16
override
void
Setup
(
ActionData
action_data
)
17
{
18
super
.Setup(
action_data
);
19
m_SpentQuantity
= 0;
20
if
(!
m_SpentUnits
)
21
m_SpentUnits
=
new
Param1<float>
(0);
22
else
23
m_SpentUnits
.param1 = 0;
24
25
Magazine
itm
;
26
Class
.
CastTo
(
itm
,
action_data
.m_MainItem);
27
m_ItemQuantity
=
itm
.GetAmmoCount();
28
m_ItemMaxQuantity
=
itm
.GetAmmoMax();
29
Magazine
trg
;
30
Class
.
CastTo
(
trg
,
action_data
.m_Target.GetObject());
31
m_SourceQuantity
=
trg
.GetAmmoCount();
32
m_TargetUnits
=
itm
.GetAmmoMax();
33
}
34
};
ActionData
Definition
ActionBase.c:21
CAContinuousLoadMagazine
Definition
CAContinuousLoadMagazine.c:2
CAContinuousLoadMagazine::m_SourceQuantity
float m_SourceQuantity
Definition
CAContinuousLoadMagazine.c:7
CAContinuousLoadMagazine::m_QuantityFilledPerSecond
float m_QuantityFilledPerSecond
Definition
CAContinuousLoadMagazine.c:8
CAContinuousLoadMagazine::CAContinuousLoadMagazine
void CAContinuousLoadMagazine(float time_to_complete_action)
Definition
CAContinuousLoadMagazine.c:11
CAContinuousLoadMagazine::m_TargetUnits
float m_TargetUnits
Definition
CAContinuousLoadMagazine.c:3
CAContinuousLoadMagazine::m_ItemQuantity
float m_ItemQuantity
Definition
CAContinuousLoadMagazine.c:5
CAContinuousLoadMagazine::m_ItemMaxQuantity
float m_ItemMaxQuantity
Definition
CAContinuousLoadMagazine.c:6
CAContinuousLoadMagazine::m_SpentQuantity
float m_SpentQuantity
Definition
CAContinuousLoadMagazine.c:4
CAContinuousLoadMagazine::Setup
override void Setup(ActionData action_data)
Definition
CAContinuousLoadMagazine.c:16
CAContinuousRepeat
Definition
CAContinuousRepeat.c:2
CAContinuousRepeat::m_DefaultTimeToComplete
float m_DefaultTimeToComplete
Definition
CAContinuousRepeat.c:6
CAContinuousRepeat::m_SpentUnits
ref Param1< float > m_SpentUnits
Definition
CAContinuousRepeat.c:7
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
Param3
Definition
EntityAI.c:95
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
scripts
4_World
Classes
UserActionsComponent
ActionComponents
CAContinuousLoadMagazine.c
Generated by
1.10.0