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_ScriptedCharacterInputContext.c
Go to the documentation of this file.
1
class
SCR_ScriptedCharacterInputContext
2
{
3
int
m_iLoiteringType = -1;
4
bool
m_bLoiteringShouldHolsterWeapon;
5
bool
m_bLoiteringShouldAlignCharacter;
6
bool
m_bLoiteringRootMotion;
7
bool
m_bLoiteringDisablePlayerInput;
8
vector
m_mLoiteringPosition[4];
9
IEntity
m_loiterEntity;
10
RplId
m_loiterEntityRplId =
RplId
.Invalid();
11
ref
SCR_LoiterCustomAnimData
m_CustomAnimData;
12
13
//------------------------------------------------------------------------
14
15
IEntity
GetLoiterEntity()
16
{
17
if
(m_loiterEntity)
18
return
m_loiterEntity;
19
20
return
SCR_EntityHelper
.
RplIdToEntity
(m_loiterEntityRplId);
21
}
22
23
//------------------------------------------------------------------------
24
void
SetLoiteringEntity(
IEntity
ent)
25
{
26
m_loiterEntity = ent;
27
m_loiterEntityRplId =
SCR_EntityHelper
.
EntityToRplId
(m_loiterEntity);
28
}
29
30
//------------------------------------------------------------------------
31
void
SetLoiteringEntityId(
RplId
id
)
32
{
33
m_loiterEntityRplId =
id
;
34
m_loiterEntity =
SCR_EntityHelper
.
RplIdToEntity
(
id
);
35
}
36
37
//------------------------------------------------------------------------
38
void
OnRplLoad(
ScriptBitReader
r)
39
{
40
r.ReadInt(m_iLoiteringType);
41
r.ReadBool(m_bLoiteringShouldHolsterWeapon);
42
r.ReadBool(m_bLoiteringShouldAlignCharacter);
43
r.ReadBool(m_bLoiteringRootMotion);
44
r.ReadBool(m_bLoiteringDisablePlayerInput);
45
46
vector
position
;
47
r.ReadVector(
position
);
48
49
vector
angles
;
50
r.ReadVector(
angles
);
51
52
vector
rotation
[3];
53
Math3D
.AnglesToMatrix(
angles
,
rotation
);
54
m_mLoiteringPosition[3] =
position
;
55
m_mLoiteringPosition[0] =
rotation
[0];
56
m_mLoiteringPosition[1] =
rotation
[1];
57
m_mLoiteringPosition[2] =
rotation
[2];
58
59
RplId
rplId;
60
r.ReadRplId(rplId);
61
62
SetLoiteringEntityId(rplId);
63
64
bool
hasCustomData;
65
r.ReadBool(hasCustomData);
66
if
(hasCustomData)
67
{
68
m_CustomAnimData =
new
SCR_LoiterCustomAnimData
();
69
m_CustomAnimData.OnRplLoad(r);
70
}
71
else
72
{
73
m_CustomAnimData =
SCR_LoiterCustomAnimData
.Default;
74
}
75
}
76
//------------------------------------------------------------------------
77
78
void
OnRplSave(ScriptBitWriter w)
79
{
80
w.WriteInt(m_iLoiteringType);
81
w.WriteBool(m_bLoiteringShouldHolsterWeapon);
82
w.WriteBool(m_bLoiteringShouldAlignCharacter);
83
w.WriteBool(m_bLoiteringRootMotion);
84
w.WriteBool(m_bLoiteringDisablePlayerInput);
85
w.WriteVector(m_mLoiteringPosition[3]);
86
w.WriteVector(
Math3D
.MatrixToAngles(m_mLoiteringPosition));
87
w.WriteRplId(
SCR_EntityHelper
.
EntityToRplId
(m_loiterEntity));
88
89
if
(m_CustomAnimData && !m_CustomAnimData.IsDefault())
90
{
91
w.WriteBool(
true
);
92
m_CustomAnimData.OnRplSave(w);
93
}
94
else
95
{
96
w.WriteBool(
false
);
97
}
98
99
}
100
}
id
AddonBuildInfoTool id
angles
ref array< string > angles
Definition
PrefabImporter.c:22
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
IEntity
Definition
IEntity.c:13
Math3D
Definition
Math3D.c:13
RplId
Replication item identifier.
Definition
RplId.c:14
SCR_EntityHelper
Definition
SCR_EntityHelper.c:2
SCR_EntityHelper::RplIdToEntity
static IEntity RplIdToEntity(RplId id)
Definition
SCR_EntityHelper.c:521
SCR_EntityHelper::EntityToRplId
static RplId EntityToRplId(IEntity ent)
Definition
SCR_EntityHelper.c:507
SCR_LoiterCustomAnimData
Definition
SCR_CharacterCommandLoiter.c:202
SCR_ScriptedCharacterInputContext
Definition
SCR_ScriptedCharacterInputContext.c:2
ScriptBitReader
Definition
EnNetwork.c:199
vector
Definition
vector.c:13
rotation
RespawnSystemComponentClass GameComponentClass vector vector rotation
Definition
RespawnSystemComponent.c:23
scripts
Game
Character
SCR_ScriptedCharacterInputContext.c
Generated by
1.17.0