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_CleanSweepNetworkComponent.c
Go to the documentation of this file.
1
[
EntityEditorProps
(
category
:
"GameScripted/CleanSweep"
, description:
"A character clean sweep component for comunication from client to server."
, color:
"0 0 255 255"
)]
2
class
SCR_CleanSweepNetworkComponentClass
:
ScriptComponentClass
3
{
4
}
5
6
class
SCR_CleanSweepNetworkComponent
:
ScriptComponent
7
{
8
9
//------------------------------------------------------------------------------------------------
11
void
CommitSuicide
()
12
{
13
Rpc
(
RPC_CommitSuicide
);
14
}
15
16
//------------------------------------------------------------------------------------------------
18
void
ShowAreaSelectionScreen
()
19
{
20
Rpc
(
RPC_ShowAreaSelectionScreen
);
21
}
22
23
//------------------------------------------------------------------------------------------------
27
void
ChooseArea
(
int
areaID,
bool
swapSides)
28
{
29
Rpc
(
RPC_ChooseArea
, areaID, swapSides);
30
}
31
32
//------------------------------------------------------------------------------------------------
34
void
SetControlledEntityOrigin
(
vector
origin)
35
{
36
Rpc
(
RPC_SetControlledEntityOrigin
, origin);
37
}
38
39
//------------------------------------------------------------------------------------------------
40
[
RplRpc
(
RplChannel
.Reliable,
RplRcver
.Owner)]
41
protected
void
RPC_CommitSuicide
()
42
{
43
SCR_PlayerController
playerController =
SCR_PlayerController
.Cast(
GetGame
().
GetPlayerController
());
44
if
(!playerController)
45
return
;
46
47
GenericEntity
controlledEntity =
GenericEntity
.Cast(playerController.
GetMainEntity
());
48
if
(!controlledEntity)
49
return
;
50
51
CharacterControllerComponent controllerComponent = CharacterControllerComponent.Cast(controlledEntity.
FindComponent
(CharacterControllerComponent));
52
if
(!controllerComponent)
53
return
;
54
55
controllerComponent.ForceDeath();
56
}
57
58
//------------------------------------------------------------------------------------------------
59
[
RplRpc
(
RplChannel
.Reliable,
RplRcver
.Owner)]
60
protected
void
RPC_SetControlledEntityOrigin
(
vector
origin)
61
{
62
IEntity
controlledEntity =
SCR_PlayerController
.
GetLocalControlledEntity
();
63
if
(!controlledEntity)
64
return
;
65
66
controlledEntity.
SetOrigin
(origin);
67
}
68
69
//------------------------------------------------------------------------------------------------
70
[
RplRpc
(
RplChannel
.Reliable,
RplRcver
.Owner)]
71
protected
void
RPC_ShowAreaSelectionScreen
()
72
{
73
SCR_GameModeCleanSweep cleanSweep = SCR_GameModeCleanSweep.Cast(
GetGame
().
GetGameMode
());
74
if
(!cleanSweep)
75
return
;
76
77
cleanSweep.ShowAreaSelectionUI();
78
}
79
80
//------------------------------------------------------------------------------------------------
81
[
RplRpc
(
RplChannel
.Reliable,
RplRcver
.Server)]
82
protected
void
RPC_ChooseArea
(
int
areaID,
bool
swapSides)
83
{
84
SCR_GameModeCleanSweep cleanSweep = SCR_GameModeCleanSweep.Cast(
GetGame
().
GetGameMode
());
85
if
(!cleanSweep)
86
return
;
87
88
cleanSweep.SetSwapSides(swapSides);
89
cleanSweep.SetArea(areaID);
90
}
91
92
//------------------------------------------------------------------------------------------------
93
// constructor
97
void
SCR_CleanSweepNetworkComponent
(
IEntityComponentSource
src,
IEntity
ent,
IEntity
parent)
98
{
99
}
100
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition
SCR_BaseGameModeComponent.c:15
ChooseArea
void ChooseArea(int areaID, bool swapSides)
Definition
SCR_CleanSweepNetworkComponent.c:27
RPC_CommitSuicide
void RPC_CommitSuicide()
Definition
SCR_CleanSweepNetworkComponent.c:41
SetControlledEntityOrigin
void SetControlledEntityOrigin(vector origin)
Definition
SCR_CleanSweepNetworkComponent.c:34
SCR_CleanSweepNetworkComponent
void SCR_CleanSweepNetworkComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_CleanSweepNetworkComponent.c:97
RPC_SetControlledEntityOrigin
void RPC_SetControlledEntityOrigin(vector origin)
Definition
SCR_CleanSweepNetworkComponent.c:60
ShowAreaSelectionScreen
void ShowAreaSelectionScreen()
Definition
SCR_CleanSweepNetworkComponent.c:18
CommitSuicide
SCR_CleanSweepNetworkComponentClass ScriptComponentClass CommitSuicide()
Definition
SCR_CleanSweepNetworkComponent.c:11
RPC_ShowAreaSelectionScreen
void RPC_ShowAreaSelectionScreen()
Definition
SCR_CleanSweepNetworkComponent.c:71
RPC_ChooseArea
void RPC_ChooseArea(int areaID, bool swapSides)
Definition
SCR_CleanSweepNetworkComponent.c:82
EntityEditorProps
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Definition
SCR_CompassComponent.c:10
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
GenericComponent::Rpc
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
GenericEntity
Definition
GenericEntity.c:16
IEntityComponentSource
Definition
IEntityComponentSource.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::SetOrigin
proto external void SetOrigin(vector orig)
SCR_CleanSweepNetworkComponentClass
Definition
SCR_CleanSweepNetworkComponent.c:3
SCR_PlayerController
Definition
SCR_PlayerController.c:31
SCR_PlayerController::GetLocalControlledEntity
static IEntity GetLocalControlledEntity()
Definition
SCR_PlayerController.c:495
SCR_PlayerController::GetMainEntity
IEntity GetMainEntity()
Definition
SCR_PlayerController.c:446
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
vector
Definition
vector.c:13
GetPlayerController
proto external PlayerController GetPlayerController()
Definition
SCR_PlayerDeployMenuHandlerComponent.c:307
RplRpc
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition
EnNetwork.c:95
RplRcver
RplRcver
Definition
RplRcver.c:59
RplChannel
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition
RplChannel.c:14
scripts
Game
Components
CleanSweep
SCR_CleanSweepNetworkComponent.c
Generated by
1.17.0