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_CharacterCameraHandlerComponentSerializer.c
Go to the documentation of this file.
1
class
SCR_CharacterCameraHandlerComponentSerializer
:
ScriptedComponentSerializer
2
{
3
//------------------------------------------------------------------------------------------------
4
override
static
typename
GetTargetType
()
5
{
6
return
SCR_CharacterCameraHandlerComponent;
7
}
8
9
//------------------------------------------------------------------------------------------------
10
override
protected
ESerializeResult
Serialize
(notnull
IEntity
owner, notnull
GenericComponent
component, notnull
SaveContext
context)
11
{
12
const
SCR_CharacterCameraHandlerComponent cameraHandler = SCR_CharacterCameraHandlerComponent.Cast(component);
13
const
bool
isSingleplayer =
RplSession
.Mode() ==
RplMode
.None;
14
if
(isSingleplayer && cameraHandler.Is3rdPersonView())
15
{
16
context.WriteValue(
"version"
, 1);
17
context.WriteValue(
"is3rdPerson"
,
true
);
18
return
ESerializeResult
.OK;
19
}
20
21
return
ESerializeResult
.DEFAULT;
22
}
23
24
//------------------------------------------------------------------------------------------------
25
override
protected
bool
Deserialize
(notnull
IEntity
owner, notnull
GenericComponent
component, notnull
LoadContext
context)
26
{
27
auto
cameraHandler = SCR_CharacterCameraHandlerComponent.Cast(component);
28
29
int
version;
30
context.Read(version);
31
32
bool
is3rdPerson =
false
;
33
context.ReadValue(
"is3rdPerson"
, is3rdPerson);
34
if
(is3rdPerson)
35
cameraHandler.SetThirdPerson(
true
);
36
37
return
true
;
38
}
39
}
GetTargetType
class SCR_PersistentThreatSector GetTargetType()
Definition
AIControlComponentSerializer.c:12
RplMode
RplMode
Mode of replication.
Definition
RplMode.c:9
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
LoadContext
Definition
LoadContext.c:17
RplSession
Definition
RplSession.c:8
SCR_CharacterCameraHandlerComponentSerializer
Definition
SCR_CharacterCameraHandlerComponentSerializer.c:2
SCR_CharacterCameraHandlerComponentSerializer::Deserialize
bool Deserialize(notnull IEntity owner, notnull GenericComponent component, notnull LoadContext context)
Definition
SCR_CharacterCameraHandlerComponentSerializer.c:25
SCR_CharacterCameraHandlerComponentSerializer::Serialize
ESerializeResult Serialize(notnull IEntity owner, notnull GenericComponent component, notnull SaveContext context)
Definition
SCR_CharacterCameraHandlerComponentSerializer.c:10
SaveContext
Definition
SaveContext.c:17
ScriptedComponentSerializer
Definition
ScriptedComponentSerializer.c:13
ESerializeResult
ESerializeResult
Definition
ESerializeResult.c:13
scripts
Game
Plugins
Persistence
System
Serializers
Components
Character
SCR_CharacterCameraHandlerComponentSerializer.c
Generated by
1.17.0