Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskRadioMsg.c
Go to the documentation of this file.
2{
6 protected int m_iBaseCallsign = SCR_MilitaryBaseComponent.INVALID_BASE_CALLSIGN;
7 protected int m_iCallerGroupId;
8 protected int m_iCalledGroupId;
9 protected int m_iGrid;
10 protected int m_iCallerPlayerId;
11 protected int m_iFactionId;
14
15 //------------------------------------------------------------------------------------------------
23
24 //------------------------------------------------------------------------------------------------
30
31 //------------------------------------------------------------------------------------------------
33 void SetBaseCallsign(int callsign)
34 {
35 m_iBaseCallsign = callsign;
36 }
37
38 //------------------------------------------------------------------------------------------------
40 void SetCallerGroupId(int groupId)
41 {
42 m_iCallerGroupId = groupId;
43 }
44
45 //------------------------------------------------------------------------------------------------
47 void SetCalledGroupId(int groupId)
48 {
49 m_iCalledGroupId = groupId;
50 }
51
52 //------------------------------------------------------------------------------------------------
54 void SetGrid(int grid)
55 {
56 m_iGrid = grid;
57 }
58
59 //------------------------------------------------------------------------------------------------
61 void SetCallerPlayerId(int callerPlayerId)
62 {
63 m_iCallerPlayerId = callerPlayerId;
64 }
65
66 //------------------------------------------------------------------------------------------------
68 void SetFactionId(int factionId)
69 {
70 m_iFactionId = factionId;
71 }
72
73 //------------------------------------------------------------------------------------------------
75 void SetFaction(SCR_Faction faction)
76 {
77 m_Faction = faction;
78 }
79
80 //------------------------------------------------------------------------------------------------
82 void SetTaskPosition(vector taskPosition)
83 {
84 m_vTaskPosition = taskPosition;
85 }
86
87 //------------------------------------------------------------------------------------------------
88 override void OnDelivery(BaseTransceiver receiver, int freq, float quality)
89 {
90 IEntity owner = receiver.GetRadio().GetOwner();
91 ChimeraCharacter player;
92
93 while (!player)
94 {
95 player = ChimeraCharacter.Cast(owner);
96 if (player)
97 break;
98
99 owner = owner.GetParent();
100 if (!owner)
101 return;
102 }
103
104 if (player)
105 {
106 int playerID = GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(owner);
107
108 // skips caller player, He should not receive messages sent by himself. I think this check was not needed in the past, maybe there is a bug somewhere.
109 if (playerID == m_iCallerPlayerId)
110 return;
111
112 if (!m_Data || !m_Data.CanSendToPlayer(m_Faction, playerID, m_vTaskPosition))
113 return;
114
115 PlayerController playerController = GetGame().GetPlayerManager().GetPlayerController(playerID);
116 if (!playerController)
117 return;
118
119 SCR_CampaignNetworkComponent networkComponent = SCR_CampaignNetworkComponent.Cast(playerController.FindComponent(SCR_CampaignNetworkComponent));
120 if (networkComponent)
122 }
123 }
124};
ArmaReforgerScripted GetGame()
Definition game.c:1398
EDamageType type
SCR_ETaskNotification
Objective and request notifications types.
SCR_ETaskNotificationMsg
Various types of task notifications for different events and states.
Get all prefabs that have the spawner data
proto external IEntity GetParent()
Takes care of Campaign-specific server <> client communication and requests.
void PlayTaskNotificationMsg(SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg msg, int factionId, int baseCallsign, int callerGroupId, int calledGroupId, int grid, float quality, int playerID)
void SetFaction(SCR_Faction faction)
void SetTaskPosition(vector taskPosition)
void SetFactionId(int factionId)
void SetTaskNotificationData(SCR_BaseTaskNotificationData data)
SCR_ETaskNotification m_eTaskNotificationType
void SetTaskNotification(SCR_ETaskNotification type, SCR_ETaskNotificationMsg msg)
SCR_Faction m_Faction
void SetBaseCallsign(int callsign)
void SetCalledGroupId(int groupId)
void SetGrid(int grid)
SCR_ETaskNotificationMsg m_eTaskNotificationMsg
override void OnDelivery(BaseTransceiver receiver, int freq, float quality)
SCR_BaseTaskNotificationData m_Data
void SetCallerPlayerId(int callerPlayerId)
void SetCallerGroupId(int groupId)