5 protected int m_iHours = -1;
6 protected int m_iMinutes = -1;
7 protected int m_iSeconds = -1;
8 protected vector m_vMHQLocationBLUFOR;
9 protected vector m_vMHQRotationBLUFOR;
10 protected vector m_vMHQLocationOPFOR;
11 protected vector m_vMHQRotationOPFOR;
12 protected ref array<ref SCR_CampaignBaseStruct> m_aBasesStructs = {};
13 protected ref array<ref SCR_CampaignRemnantInfoStruct> m_aRemnantsStructs = {};
14 protected ref array<ref SCR_CampaignPlayerStruct> m_aPlayerStructs = {};
15 protected int m_iTutorialStage = -1;
16 protected bool m_bMatchOver;
17 protected string m_sWeatherState;
18 protected int m_iCallsignOffset = SCR_MilitaryBaseComponent.INVALID_BASE_CALLSIGN;
39 vector GetMHQLocationBLUFOR()
41 return m_vMHQLocationBLUFOR;
45 vector GetMHQRotationBLUFOR()
47 return m_vMHQRotationBLUFOR;
51 vector GetMHQLocationOPFOR()
53 return m_vMHQLocationOPFOR;
57 vector GetMHQRotationOPFOR()
59 return m_vMHQRotationOPFOR;
63 array <ref SCR_CampaignBaseStruct>GetBasesStructs()
65 return m_aBasesStructs;
69 array <ref SCR_CampaignRemnantInfoStruct>GetRemnantsStructs()
71 return m_aRemnantsStructs;
75 array <ref SCR_CampaignPlayerStruct>GetPlayersStructs()
77 return m_aPlayerStructs;
81 int GetTutorialStage()
83 return m_iTutorialStage;
93 string GetWeatherState()
95 return m_sWeatherState;
99 int GetCallsignOffset()
105 override bool Serialize()
117 TimeAndWeatherManagerEntity timeManager = world.GetTimeAndWeatherManager();
124 if (transitionManager)
125 m_sWeatherState = transitionManager.GetCurrentState().GetStateName();
128 campaign.GetBaseManager().StoreBasesStates(m_aBasesStructs);
130 SCR_CampaignTutorialArlandComponent tutorial = SCR_CampaignTutorialArlandComponent.Cast(campaign.FindComponent(SCR_CampaignTutorialArlandComponent));
134 m_iTutorialStage = tutorial.GetStage();
138 campaign.StoreRemnantsStates(m_aRemnantsStructs);
144 if (factionBLUFOR && factionBLUFOR.GetMobileAssembly())
146 mobileHQ = factionBLUFOR.GetMobileAssembly().GetVehicle();
150 m_vMHQLocationBLUFOR = mobileHQ.GetOrigin();
151 m_vMHQRotationBLUFOR = mobileHQ.GetYawPitchRoll();
155 if (factionOPFOR && factionOPFOR.GetMobileAssembly())
157 mobileHQ = factionOPFOR.GetMobileAssembly().GetVehicle();
161 m_vMHQLocationOPFOR = mobileHQ.GetOrigin();
162 m_vMHQRotationOPFOR = mobileHQ.GetYawPitchRoll();
166 campaign.WriteAllClientsData();
167 array<ref SCR_CampaignClientData> clients = {};
168 campaign.GetClientsData(clients);
173 struct.SetID(
data.GetID());
174 struct.SetXP(
data.GetXP());
175 struct.SetFactionIndex(
data.GetFactionIndex());
177 m_aPlayerStructs.Insert(
struct);
193 campaign.StoreLoadedData(
this);
201 m_aBasesStructs.Clear();
202 m_aRemnantsStructs.Clear();
203 m_aPlayerStructs.Clear();
204 m_vMHQLocationBLUFOR = vector.Zero;
205 m_vMHQRotationBLUFOR = vector.Zero;
206 m_vMHQLocationOPFOR = vector.Zero;
207 m_vMHQRotationOPFOR = vector.Zero;
214 static string GetResourceId(
string resourceName)
216 int i = resourceName.IndexOf(
"}");
221 return resourceName.Substring(0, resourceName.IndexOf(
"}") + 1);
230 RegV(
"m_vMHQLocationBLUFOR");
231 RegV(
"m_vMHQRotationBLUFOR");
232 RegV(
"m_vMHQLocationOPFOR");
233 RegV(
"m_vMHQRotationOPFOR");
234 RegV(
"m_aBasesStructs");
235 RegV(
"m_aRemnantsStructs");
236 RegV(
"m_aPlayerStructs");
237 RegV(
"m_iTutorialStage");
238 RegV(
"m_bMatchOver");
239 RegV(
"m_sWeatherState");
240 RegV(
"m_iCallsignOffset");
248 protected bool m_bIsHQ;
249 protected int m_iCSI;
250 protected vector m_vPos;
285 int GetCallsignIndex()
377 void SetIsHQ(
bool hq)
383 void SetCallsignIndex(
int callsign)
395 void SetSupplies(
int supplies)
401 void SetOwningFaction(
int owningFaction)
403 m_iF = owningFaction;
512 override void OnExpand()
518 override void OnItemObject(
int index,
string name)
523 override void OnPack()
528 override void OnObject(
string name )
533 override void OnError(
int errorCode)
535 Print(
"OnError: " + errorCode);
539 override void OnSuccess(
int errorCode )
541 Print(
"OnSuccess: " + errorCode );
583 protected int m_iSize;
584 protected float m_fR;
593 int GetMembersAlive()
599 float GetRespawnTimer()
611 void SetMembersAlive(
int count)
617 void SetRespawnTimer(
float timer)
634 static const string LOCAL_PLAYER_IDENTITY_ID =
"identitySP";
636 protected string m_sID;
637 protected int m_iF = -1;
647 int GetFactionIndex()
659 void SetID(
string ID)
665 void SetFactionIndex(
int index)
677 static string GetPlayerIdentity(
int playerId)
682 if (RplSession.Mode() == RplMode.None)
683 return LOCAL_PLAYER_IDENTITY_ID;
685 BackendApi api =
GetGame().GetBackendApi();
690 return api.GetPlayerIdentityId(playerId);