DayZ 1.24
Loading...
Searching...
No Matches
PluginDiagMenuServer.c
Go to the documentation of this file.
1// For modding, see PluginDiagMenuModding.c
2// !!! MODDING DISCLAIMER: These are debug functionality files, if you are thinking about modding the vanilla ones, do so at your own risk
3// These files will not be maintained with the thought of "what if a modder modded this" (Excluding the modding functionality of course)
4// Which is why the modding functionality was developed with the thought of the modded ones having their own isolated safe space
5
7{
8#ifdef DIAG_DEVELOPER
10
11 // A bit of a hack, because SP creates both Client and Server Plugins
12 override private void RegisterDiags()
13 {
14 if (GetGame().IsMultiplayer())
15 super.RegisterDiags();
16 }
17
18 //---------------------------------------------
20 {
21 super.OnRPC(player, rpc_type, ctx);
22
23 switch (rpc_type)
24 {
25 case ERPCs.DEV_DIAGMENU_SUBSCRIBE:
26 {
28 {
31
32 if (newMask != currentMask)
33 {
34 if (newMask == 0)
35 m_Subscribers.Remove(player);
36 else
38 }
39 }
40 break;
41 }
42 }
43 }
44
45 //---------------------------------------------
47 {
48 for (int i = 0; i < m_Subscribers.Count(); ++i)
49 {
50 Man man = m_Subscribers.GetKey(i);
51 if (man)
52 {
55 GetGame().RPCSingleParam(target, rpc_type, data, guaranteed, man.GetIdentity());
56 }
57 else
58 {
59 m_Subscribers.RemoveElement(i);
60 i--;
61 }
62 }
63 }
64#endif
65}
ERPCs
Definition ERPCs.c:2
static ref Param1< int > PARAM1_INT
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
proto native CGame GetGame()