Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AdjustCollimatorElevationAction.c
Go to the documentation of this file.
1
class
SCR_AdjustCollimatorElevationAction
:
SCR_AdjustCollimatorAction
2
{
3
[
Attribute
(defvalue:
"1"
,
desc
:
""
)]
4
float
m_fAngleUnit;
5
6
//------------------------------------------------------------------------------------------------
7
override
void
OnActionStart(
IEntity
pUserEntity)
8
{
9
super.OnActionStart(pUserEntity);
10
11
if
(
m_SightsComponent
)
12
m_fTargetValue
=
m_SightsComponent
.GetVerticalAngularCorrection();
13
}
14
15
//------------------------------------------------------------------------------------------------
18
override
protected
bool
OnSaveActionData
(ScriptBitWriter writer)
19
{
20
if
(
float
.AlmostEqual(
m_fTargetValue
,
m_SightsComponent
.GetVerticalAngularCorrection()))
21
return
false
;
22
23
if
(
m_SightsComponent
)
24
m_SightsComponent
.SetVerticalAngularCorrection(
m_fTargetValue
* m_fAngleUnit);
25
26
return
super.OnSaveActionData(writer);
27
}
28
29
//------------------------------------------------------------------------------------------------
33
override
protected
bool
OnLoadActionData
(
ScriptBitReader
reader)
34
{
35
bool
loaded = super.OnLoadActionData(reader);
36
37
if
(
m_bIsAdjustedByPlayer
)
38
return
loaded;
39
40
if
(
m_SightsComponent
)
41
m_SightsComponent
.SetVerticalAngularCorrection(
m_fTargetValue
* m_fAngleUnit);
42
43
return
loaded;
44
}
45
}
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntity
Definition
IEntity.c:13
SCR_AdjustCollimatorAction
Definition
SCR_AdjustCollimatorAction.c:2
SCR_AdjustCollimatorAction::m_SightsComponent
SCR_CollimatorSightsComponent m_SightsComponent
Definition
SCR_AdjustCollimatorAction.c:3
SCR_AdjustCollimatorElevationAction
Definition
SCR_AdjustCollimatorElevationAction.c:2
SCR_AdjustCollimatorElevationAction::OnSaveActionData
bool OnSaveActionData(ScriptBitWriter writer)
Definition
SCR_AdjustCollimatorElevationAction.c:18
SCR_AdjustCollimatorElevationAction::OnLoadActionData
bool OnLoadActionData(ScriptBitReader reader)
Definition
SCR_AdjustCollimatorElevationAction.c:33
SCR_AdjustSignalAction::m_fTargetValue
float m_fTargetValue
Normalized current value.
Definition
SCR_AdjustSignalAction.c:48
SCR_AdjustSignalAction::m_bIsAdjustedByPlayer
bool m_bIsAdjustedByPlayer
Interacted with by main entity. Allows reading input actions.
Definition
SCR_AdjustSignalAction.c:51
ScriptBitReader
Definition
EnNetwork.c:199
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UserActions
SCR_AdjustCollimatorElevationAction.c
Generated by
1.17.0