Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MapMarkerManagerComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "")]
3 {
4 }
5 
8 class SCR_MapMarkerManagerComponent : SCR_BaseGameModeComponent
9 {
10  [Attribute("{720E8E61D7692172}Configs/Map/MapMarkerConfig.conf", UIWidgets.ResourceNamePicker )]
11  protected ResourceName m_sMarkerCfgPath;
12 
13  protected static SCR_MapMarkerManagerComponent s_Instance;
14 
15  protected ref array<ref SCR_MapMarkerBase> m_aStaticMarkers = {}; // local or replicated static markers, one time RPC call for sync
16  protected ref array<ref SCR_MapMarkerBase> m_aDisabledMarkers = {}; // disabled static markers
17  protected ref array<SCR_MapMarkerEntity> m_aDynamicMarkers = {}; // dynamically replicated markers
18 
19  protected int m_iID; // server side only, unique id created for markers
20  protected vector m_vVisibleFrameMin; // screen coords of the visible frame in map - min point
21  protected vector m_vVisibleFrameMax; // screen coords of the visible frame in map - max point
23  protected SCR_MapMarkerSyncComponent m_MarkerSyncComp;
24  protected ref SCR_MapMarkerConfig m_MarkerCfg;
25 
26  //------------------------------------------------------------------------------------------------
28  //------------------------------------------------------------------------------------------------
29 
30  //------------------------------------------------------------------------------------------------
32  static SCR_MapMarkerManagerComponent GetInstance()
33  {
34  return s_Instance;
35  }
36 
37  //------------------------------------------------------------------------------------------------
39  SCR_MapMarkerConfig GetMarkerConfig()
40  {
41  return m_MarkerCfg;
42  }
43 
44  //------------------------------------------------------------------------------------------------
46  array<ref SCR_MapMarkerBase> GetStaticMarkers()
47  {
48  return m_aStaticMarkers;
49  }
50 
51  //------------------------------------------------------------------------------------------------
53  array<ref SCR_MapMarkerBase> GetDisabledMarkers()
54  {
55  return m_aDisabledMarkers;
56  }
57 
58  //------------------------------------------------------------------------------------------------
60  array<SCR_MapMarkerEntity> GetDynamicMarkers()
61  {
62  return m_aDynamicMarkers;
63  }
64 
65  //------------------------------------------------------------------------------------------------
69  {
70  foreach ( SCR_MapMarkerBase marker : m_aStaticMarkers )
71  {
72  if (w == marker.GetRootWidget())
73  return marker;
74  }
75 
76  return null;
77  }
78 
79  //------------------------------------------------------------------------------------------------
83  {
84  foreach ( SCR_MapMarkerBase marker : m_aStaticMarkers )
85  {
86  if (markerID == marker.GetMarkerID())
87  return marker;
88  }
89 
90  return null;
91  }
92 
93  //------------------------------------------------------------------------------------------------
98  {
99  foreach (SCR_MapMarkerEntity marker : m_aDynamicMarkers)
100  {
101  if (type == marker.GetType() && target == marker.GetTarget())
102  return marker;
103  }
104 
105  return null;
106  }
107 
108  //------------------------------------------------------------------------------------------------
110  //------------------------------------------------------------------------------------------------
111 
112  //------------------------------------------------------------------------------------------------
120  void InsertStaticMarkerByType(SCR_EMapMarkerType type, int worldX, int worldY, bool isLocal, int configId = -1, int factionFlags = 0, bool isServerMarker = false)
121  {
122  if (!m_MarkerCfg)
123  return;
124 
125  SCR_MapMarkerBase marker = new SCR_MapMarkerBase();
126  marker.SetType(type);
127  marker.SetWorldPos(worldX, worldY);
128  marker.SetMarkerConfigID(configId);
129 
130  if (factionFlags != 0)
131  marker.SetMarkerFactionFlags(factionFlags);
132 
133  InsertStaticMarker(marker, isLocal, isServerMarker);
134  }
135 
136 
137  //------------------------------------------------------------------------------------------------
142  void InsertStaticMarker(SCR_MapMarkerBase marker, bool isLocal, bool isServerMarker = false)
143  {
144  if (isLocal) // local
145  {
146  marker.SetMarkerOwnerID(GetGame().GetPlayerController().GetPlayerId());
147  m_aStaticMarkers.Insert(marker);
148  marker.OnCreateMarker();
149  }
150  else
151  {
152  if (isServerMarker)
153  {
154  AssignMarkerUID(marker);
155  marker.SetMarkerOwnerID(-1);
156 
157  OnAddSynchedMarker(marker); // add server side
158  OnAskAddStaticMarker(marker);
159  }
160  else
161  {
162  if (!m_MarkerSyncComp)
163  {
165  return;
166  }
167 
168  m_MarkerSyncComp.AskAddStaticMarker(marker);
169  }
170  }
171  }
172 
173  //------------------------------------------------------------------------------------------------
180  {
181  if (!m_MarkerCfg)
182  return null;
183 
184  SCR_MapMarkerEntryMilitary militaryConfig = SCR_MapMarkerEntryMilitary.Cast(m_MarkerCfg.GetMarkerEntryConfigByType(SCR_EMapMarkerType.PLACED_MILITARY));
185  if (!militaryConfig)
186  return null;
187 
188  // check whether the provided parameters are defined within marker config
189  int factionID = militaryConfig.GetFactionEntryID(faction);
190  int dimensionID = militaryConfig.GetDimensionEntryID(dimension);
191  if (factionID == -1 || dimensionID == -1)
192  return null;
193 
194  SCR_MapMarkerBase marker = new SCR_MapMarkerBase();
195  marker.SetType(SCR_EMapMarkerType.PLACED_MILITARY);
196  marker.SetMarkerConfigID(dimensionID * 100 + factionID); // combination of faction and dimension id
197  marker.SetFlags(typeFlags);
198 
199  return marker;
200  }
201 
202  //------------------------------------------------------------------------------------------------
209  {
210  if (!m_pGameMode.IsMaster())
211  return null;
212 
213  SCR_MapMarkerEntryDynamic cfgEntry = SCR_MapMarkerEntryDynamic.Cast(m_MarkerCfg.GetMarkerEntryConfigByType(type));
214  if (!cfgEntry)
215  return null;
216 
217  Resource prefab = Resource.Load(cfgEntry.GetMarkerPrefab());
218 
219  SCR_MapMarkerEntity markerEnt = SCR_MapMarkerEntity.Cast(GetGame().SpawnEntityPrefab(prefab, GetGame().GetWorld()));
220  if (!markerEnt)
221  return null;
222 
223  markerEnt.SetType(type, configId);
224  markerEnt.SetTarget(entity);
225 
226  return markerEnt;
227  }
228 
229  //------------------------------------------------------------------------------------------------
233  {
234  if (marker.GetMarkerID() == -1) // local
235  {
236  marker.OnDelete();
237  m_aStaticMarkers.RemoveItem(marker);
238  }
239  else // synched
240  {
241  if (marker.GetMarkerOwnerID() == -1) // is server marker
242  {
243  if (!Replication.IsServer()) // cannot delete server makers from client
244  return;
245 
246  OnRemoveSynchedMarker(marker.GetMarkerID());
247  OnAskRemoveStaticMarker(marker.GetMarkerID());
248  }
249  else
250  {
251  if (!m_MarkerSyncComp)
252  {
254  return;
255  }
256 
257  m_MarkerSyncComp.AskRemoveStaticMarker(marker.GetMarkerID());
258  }
259  }
260  }
261 
262  //------------------------------------------------------------------------------------------------
266  {
267  if (!m_pGameMode.IsMaster())
268  return;
269 
270  RplComponent.DeleteRplEntity(ent, false);
271  }
272 
273  //------------------------------------------------------------------------------------------------
275  {
276  if (!Replication.IsServer())
277  return;
278 
279  if (m_iID == int.MAX)
280  m_iID == 0;
281  else
282  m_iID++;
283 
284  marker.SetMarkerID(m_iID);
285  }
286 
287  //------------------------------------------------------------------------------------------------
292  protected void HandleStreamOut(SCR_MapMarkerEntity marker, PlayerController pController, bool state)
293  {
294  RplComponent rplComponent = RplComponent.Cast(marker.FindComponent(RplComponent));
295  if (!rplComponent || !pController)
296  return;
297 
298  RplIdentity identity = pController.GetRplIdentity();
299  if (!identity.IsValid())
300  return;
301 
302  rplComponent.EnableStreamingConNode(identity, state);
303 
304  if (identity == RplIdentity.Local()) // if this is a hosted server, we cannot control visibilty through streaming, and so it has to be set manually
305  marker.SetLocalVisible(!state);
306  }
307 
308  //------------------------------------------------------------------------------------------------
313  {
314  array<int> players = {};
315  GetGame().GetPlayerManager().GetPlayers(players);
316 
317  foreach (int player : players)
318  {
319  Faction markerFaction = marker.GetFaction();
320 
321  if (!markerFaction || markerFaction == SCR_FactionManager.SGetPlayerFaction(player))
322  HandleStreamOut(marker, GetGame().GetPlayerManager().GetPlayerController(player), false);
323  else
324  HandleStreamOut(marker, GetGame().GetPlayerManager().GetPlayerController(player), true);
325  }
326  }
327 
328  //------------------------------------------------------------------------------------------------
332  void SetStreamRulesForPlayer(int playerID)
333  {
334  foreach (SCR_MapMarkerEntity dynamicMarker : m_aDynamicMarkers)
335  {
336  Faction markerFaction = dynamicMarker.GetFaction();
337 
338  if (!markerFaction || markerFaction == SCR_FactionManager.SGetPlayerFaction(playerID))
339  HandleStreamOut(dynamicMarker, GetGame().GetPlayerManager().GetPlayerController(playerID), false);
340  else
341  HandleStreamOut(dynamicMarker, GetGame().GetPlayerManager().GetPlayerController(playerID), true);
342  }
343  }
344 
345  //------------------------------------------------------------------------------------------------
348  void EnableUpdate(bool state)
349  {
350  if (state)
352  else
354  }
355 
356  //------------------------------------------------------------------------------------------------
357  protected bool FindMarkerSyncComponent()
358  {
359  PlayerController playerContr = GetGame().GetPlayerController();
360  if (!playerContr)
361  return false;
362 
363  m_MarkerSyncComp = SCR_MapMarkerSyncComponent.Cast(playerContr.FindComponent(SCR_MapMarkerSyncComponent));
364  if (m_MarkerSyncComp)
365  return true;
366 
367  return false;
368  }
369 
370  //------------------------------------------------------------------------------------------------
374  void SetStaticMarkerDisabled(notnull SCR_MapMarkerBase marker, bool state)
375  {
376  if (state)
377  {
378  m_aDisabledMarkers.Insert(marker);
379  m_aStaticMarkers.RemoveItem(marker);
380  }
381  else
382  {
383  m_aStaticMarkers.Insert(marker);
384  m_aDisabledMarkers.RemoveItem(marker);
385 
386  if (!marker.GetRootWidget()) // happens when map is closed and widget ref is lost
387  marker.OnCreateMarker();
388  }
389  }
390 
391  //------------------------------------------------------------------------------------------------
395  {
396  if (!m_aDynamicMarkers.Contains(markerEnt))
397  m_aDynamicMarkers.Insert(markerEnt);
398  }
399 
400  //------------------------------------------------------------------------------------------------
404  {
405  if (m_aDynamicMarkers.Contains(markerEnt))
406  m_aDynamicMarkers.RemoveItem(markerEnt);
407  }
408 
409  //------------------------------------------------------------------------------------------------
411  {
412  World world = GetOwner().GetWorld();
414  if (!markerSystem)
415  return;
416 
417  markerSystem.Register(this);
418  }
419 
420  //------------------------------------------------------------------------------------------------
422  {
423  World world = GetOwner().GetWorld();
425  if (!markerSystem)
426  return;
427 
428  markerSystem.Unregister(this);
429  }
430 
431  //------------------------------------------------------------------------------------------------
432  void Update(float timeSlice)
433  {
435 
436  int count = m_aStaticMarkers.Count();
437  for (int i = 0; i < count; i++)
438  {
440  {
442  i--;
443  count--;
444  }
445  }
446 
447  foreach (SCR_MapMarkerEntity markerEnt : m_aDynamicMarkers)
448  {
449  if (markerEnt)
450  markerEnt.OnUpdate();
451  }
452 
453  #ifdef MARKERS_DEBUG
454  UpdateDebug(timeSlice);
455  #endif
456  }
457 
458  #ifdef MARKERS_DEBUG
459  //------------------------------------------------------------------------------------------------
460  void UpdateDebug(float timeSlice)
461  {
462  DbgUI.Begin("Markers debug");
463  string dbg = "disabled: %1 | static: %2 | dynamic: %3 ";
464  DbgUI.Text( string.Format( dbg, m_aDisabledMarkers.Count(), m_aStaticMarkers.Count(), m_aDynamicMarkers.Count() ) );
465 
466  /*string line = "name: %1 | distance: %2 | opacity base: %3 | opacity fade: %4 | %5";
467  foreach ( SCR_NameTagData tag : m_aNameTags )
468  {
469  DbgUI.Text( string.Format( line, tag.m_sName, (int)tag.m_fDistance, tag.m_fVisibleOpacity, tag.m_fOpacityFade, tag.m_NameTagWidget.GetOpacity() ));
470  }*/
471 
472  DbgUI.End();
473  }
474  #endif
475 
476  //------------------------------------------------------------------------------------------------
477  // EVENTS
478  //------------------------------------------------------------------------------------------------
479 
480  //------------------------------------------------------------------------------------------------
485  {
486  m_aStaticMarkers.Insert(marker);
487  FactionManager factionManager = GetGame().GetFactionManager();
488 
489  if (System.IsConsoleApp())
490  {
491  marker.SetServerDisabled(true);
492  }
493  else if (marker.GetMarkerFactionFlags() != 0 && factionManager)
494  {
495  Faction localFaction = SCR_FactionManager.SGetLocalPlayerFaction();
496  bool isMyFaction = marker.IsFaction(factionManager.GetFactionIndex(localFaction));
497 
498  if (!localFaction || !isMyFaction)
499  {
500  if (Replication.IsServer()) // hosted server
501  marker.SetServerDisabled(true);
502  else
503  m_aStaticMarkers.RemoveItem(marker);
504 
505  return;
506  }
507  }
508 
509  SCR_MapEntity mapEnt = SCR_MapEntity.GetMapInstance();
510  if (mapEnt.IsOpen() && mapEnt.GetMapUIComponent(SCR_MapMarkersUI))
511  marker.OnCreateMarker();
512  }
513 
514  //------------------------------------------------------------------------------------------------
518  void OnRemoveSynchedMarker(int markerID)
519  {
520  SCR_MapMarkerBase marker = GetStaticMarkerByID(markerID);
521  if (marker)
522  marker.OnDelete();
523 
524  m_aStaticMarkers.RemoveItem(marker);
525  }
526 
527  //------------------------------------------------------------------------------------------------
531  {
532  Rpc(RPC_DoAddStaticMarker, markerData);
533  }
534 
535  //------------------------------------------------------------------------------------------------
538  void OnAskRemoveStaticMarker(int markerID)
539  {
540  Rpc(RPC_DoRemoveStaticMarker, markerID);
541  }
542 
543  //------------------------------------------------------------------------------------------------
544  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
545  protected void RPC_DoAddStaticMarker(SCR_MapMarkerBase markerData)
546  {
547  OnAddSynchedMarker(markerData);
548  }
549 
550  //------------------------------------------------------------------------------------------------
551  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
552  protected void RPC_DoRemoveStaticMarker(int markerID)
553  {
554  OnRemoveSynchedMarker(markerID);
555  }
556 
557  //------------------------------------------------------------------------------------------------
562  void OnPlayerFactionChanged_S(int playerID, SCR_PlayerFactionAffiliationComponent playerComponent, Faction faction)
563  {
564  SetStreamRulesForPlayer(playerID);
565  }
566 
567  //------------------------------------------------------------------------------------------------
568  protected void OnMapPanEnd(float x, float y)
569  {
571 
572  int count = m_aDisabledMarkers.Count();
573  for (int i = 0; i < count; i++)
574  {
575  if (m_aDisabledMarkers[i].TestVisibleFrame(m_vVisibleFrameMin, m_vVisibleFrameMax))
576  {
578  i--;
579  count--;
580  }
581  }
582  }
583 
584  //------------------------------------------------------------------------------------------------
585  // OVERRIDES
586  //------------------------------------------------------------------------------------------------
587 
588  //------------------------------------------------------------------------------------------------
589  override void OnPlayerDisconnected(int playerId, KickCauseCode cause, int timeout)
590  {
591  if (!m_pGameMode.IsMaster()) // server only
592  return;
593 
594  PlayerController playerController = GetGame().GetPlayerManager().GetPlayerController(playerId);
595  SCR_MapMarkerSyncComponent markerSyncComp = SCR_MapMarkerSyncComponent.Cast(playerController.FindComponent(SCR_MapMarkerSyncComponent));
596  if (markerSyncComp)
597  markerSyncComp.ClearOwnedMarkers();
598  }
599 
600  //------------------------------------------------------------------------------------------------
601  override event protected bool RplSave(ScriptBitWriter writer)
602  {
603  int count = 0;
604 
605  if (m_aStaticMarkers.IsEmpty())
606  {
607  writer.WriteInt(count);
608  return true;
609  }
610 
611  foreach (SCR_MapMarkerBase marker : m_aStaticMarkers)
612  {
613  if (marker.GetMarkerID() == -1)
614  continue;
615  else
616  count++;
617  }
618 
619  writer.WriteInt(count);
620 
621  foreach (SCR_MapMarkerBase marker : m_aStaticMarkers)
622  {
623  if (marker.GetMarkerID() == -1)
624  continue;
625 
626  int pos[2];
627  marker.GetWorldPos(pos);
628 
629  writer.WriteInt(pos[0]);
630  writer.WriteInt(pos[1]);
631  writer.WriteInt(marker.GetMarkerID());
632  writer.WriteInt(marker.GetMarkerOwnerID());
633  writer.WriteInt(marker.GetFlags());
634  writer.WriteInt(marker.GetMarkerConfigID());
635  writer.WriteInt(marker.GetMarkerFactionFlags());
636  writer.Write(marker.GetRotation(), 16); // 2 bytes are enough
637  writer.Write(marker.GetType(), 8); // 1 byte is enough, not expected to go over 256 types
638  writer.Write(marker.GetColorEntry(), 8); // 1 byte is enough, no expected over 256 colors
639  writer.Write(marker.GetIconEntry(), 16); // 1 byte should be enough, leaving the extra byte to not underestimate modders
640  writer.WriteString(marker.GetCustomText());
641  }
642 
643  return true;
644  }
645 
646  //------------------------------------------------------------------------------------------------
647  override event protected bool RplLoad(ScriptBitReader reader)
648  {
649  int count;
650  reader.ReadInt(count);
651  if (count == 0)
652  return true;
653 
654  int posX, posY, markerID, markerOwnerID, flags, markerConfigID, factionFlags, markerType, colorID, iconID, rotation;
655  string customText;
656  SCR_MapMarkerBase marker;
657 
658  for (int i; i < count; i++)
659  {
660 
661  reader.ReadInt(posX);
662  reader.ReadInt(posY);
663  reader.ReadInt(markerID);
664  reader.ReadInt(markerOwnerID);
665  reader.ReadInt(flags);
666  reader.ReadInt(markerConfigID);
667  reader.ReadInt(factionFlags);
668  reader.Read(rotation, 16);
669  reader.Read(markerType, 8);
670  reader.Read(colorID, 8);
671  reader.Read(iconID, 16);
672  reader.ReadString(customText);
673 
674  marker = new SCR_MapMarkerBase();
675  marker.SetType(markerType);
676  marker.SetWorldPos(posX, posY);
677  marker.SetMarkerID(markerID);
678  marker.SetMarkerOwnerID(markerOwnerID);
679  marker.SetFlags(flags);
680  marker.SetMarkerConfigID(markerConfigID);
681  marker.SetMarkerFactionFlags(factionFlags);
682  marker.SetRotation(rotation);
683  marker.SetColorEntry(colorID);
684  marker.SetIconEntry(iconID);
685  marker.SetCustomText(customText);
686 
687  m_aStaticMarkers.Insert(marker);
688  }
689 
690  return true;
691  }
692 
693  //------------------------------------------------------------------------------------------------
694  override protected void EOnInit(IEntity owner)
695  {
696  bool isMaster = m_pGameMode.IsMaster();
697 
698  array<ref SCR_MapMarkerEntryConfig> entryCfgs = m_MarkerCfg.GetMarkerEntryConfigs();
699  foreach ( SCR_MapMarkerEntryConfig cfg : entryCfgs )
700  {
701  SCR_MapMarkerEntryDynamic entryDynamic = SCR_MapMarkerEntryDynamic.Cast(cfg);
702  if (entryDynamic)
703  {
704  if (isMaster)
705  entryDynamic.InitServerLogic();
706 
707  entryDynamic.InitClientLogic();
708  }
709  }
710 
711  if (!isMaster) // init server logic below
712  return;
713 
714  SCR_FactionManager mgr = SCR_FactionManager.Cast(GetGame().GetFactionManager());
715  if (mgr)
716  mgr.GetOnPlayerFactionChanged_S().Insert(OnPlayerFactionChanged_S);
717  }
718 
719  //------------------------------------------------------------------------------------------------
720  override void OnPostInit(IEntity owner)
721  {
722  s_Instance = this;
723  m_MapEntity = SCR_MapEntity.GetMapInstance();
724  m_MapEntity.GetOnMapPanEnd().Insert(OnMapPanEnd);
725 
726  Resource container = BaseContainerTools.LoadContainer(m_sMarkerCfgPath);
727  if (container)
728  m_MarkerCfg = SCR_MapMarkerConfig.Cast(BaseContainerTools.CreateInstanceFromContainer(container.GetResource().ToBaseContainer()));
729 
730  SetEventMask(owner, EntityEvent.INIT);
731  }
732 
733  //------------------------------------------------------------------------------------------------
734  // destructor
736  {
737  s_Instance = null;
738  }
739 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
GetStaticMarkers
array< ref SCR_MapMarkerBase > GetStaticMarkers()
Definition: SCR_MapMarkerManagerComponent.c:46
RPC_DoAddStaticMarker
protected void RPC_DoAddStaticMarker(SCR_MapMarkerBase markerData)
Definition: SCR_MapMarkerManagerComponent.c:545
RegisterDynamicMarker
void RegisterDynamicMarker(SCR_MapMarkerEntity markerEnt)
Definition: SCR_MapMarkerManagerComponent.c:394
SetStreamRulesForPlayer
void SetStreamRulesForPlayer(int playerID)
Definition: SCR_MapMarkerManagerComponent.c:332
Update
void Update(float timeSlice)
Definition: SCR_MapMarkerManagerComponent.c:432
OnPlayerFactionChanged_S
void OnPlayerFactionChanged_S(int playerID, SCR_PlayerFactionAffiliationComponent playerComponent, Faction faction)
Definition: SCR_MapMarkerManagerComponent.c:562
m_MarkerCfg
protected ref SCR_MapMarkerConfig m_MarkerCfg
Definition: SCR_MapMarkerManagerComponent.c:24
SCR_MapMarkerBase
Definition: SCR_MapMarkerBase.c:3
AssignMarkerUID
void AssignMarkerUID(SCR_MapMarkerBase marker)
Definition: SCR_MapMarkerManagerComponent.c:274
GetInstance
SCR_TextsTaskManagerComponentClass ScriptComponentClass GetInstance()
Definition: SCR_TextsTaskManagerComponent.c:50
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
OnAskRemoveStaticMarker
void OnAskRemoveStaticMarker(int markerID)
Definition: SCR_MapMarkerManagerComponent.c:538
m_aDisabledMarkers
protected ref array< ref SCR_MapMarkerBase > m_aDisabledMarkers
Definition: SCR_MapMarkerManagerComponent.c:16
GetDisabledMarkers
array< ref SCR_MapMarkerBase > GetDisabledMarkers()
Definition: SCR_MapMarkerManagerComponent.c:53
GetMarkerConfig
SCR_MapMarkerConfig GetMarkerConfig()
Definition: SCR_MapMarkerManagerComponent.c:39
FindMarkerSyncComponent
protected bool FindMarkerSyncComponent()
Definition: SCR_MapMarkerManagerComponent.c:357
m_aDynamicMarkers
protected ref array< SCR_MapMarkerEntity > m_aDynamicMarkers
Definition: SCR_MapMarkerManagerComponent.c:17
GetDynamicMarkers
array< SCR_MapMarkerEntity > GetDynamicMarkers()
Definition: SCR_MapMarkerManagerComponent.c:60
~SCR_MapMarkerManagerComponent
void ~SCR_MapMarkerManagerComponent()
Definition: SCR_MapMarkerManagerComponent.c:735
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
SCR_MapMarkerEntryConfig
Base entry config.
Definition: SCR_MapMarkerConfig.c:50
SCR_MapMarkerManagerSystem
Definition: SCR_MapMarkerManagerSystem.c:2
SCR_MapMarkerEntryDynamic
Marker dynamic entry base.
Definition: SCR_MapMarkerEntryDynamic.c:4
OnUpdate
override void OnUpdate(BaseWorld world, float timeslice)
Definition: game.c:910
Attribute
SCR_MapMarkerManagerComponentClass SCR_BaseGameModeComponentClass Attribute("{720E8E61D7692172}Configs/Map/MapMarkerConfig.conf", UIWidgets.ResourceNamePicker)] protected ResourceName m_sMarkerCfgPath
KickCauseCode
KickCauseCode
Definition: KickCauseCode.c:19
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
GetStaticMarkerByID
SCR_MapMarkerBase GetStaticMarkerByID(int markerID)
Definition: SCR_MapMarkerManagerComponent.c:82
m_aStaticMarkers
protected ref array< ref SCR_MapMarkerBase > m_aStaticMarkers
Definition: SCR_MapMarkerManagerComponent.c:15
SCR_MapMarkerManagerComponentClass
Definition: SCR_MapMarkerManagerComponent.c:2
EMilitarySymbolIdentity
EMilitarySymbolIdentity
Definition: EMilitarySymbol.c:1
HandleStreamOut
protected void HandleStreamOut(SCR_MapMarkerEntity marker, PlayerController pController, bool state)
Definition: SCR_MapMarkerManagerComponent.c:292
m_vVisibleFrameMin
protected vector m_vVisibleFrameMin
Definition: SCR_MapMarkerManagerComponent.c:20
s_Instance
SCR_SpawnerSlotManagerClass s_Instance
Class used for managing changes and removals of slots present in world.
OnAskAddStaticMarker
void OnAskAddStaticMarker(SCR_MapMarkerBase markerData)
Definition: SCR_MapMarkerManagerComponent.c:530
SCR_MapMarkerEntity
Definition: SCR_MapMarkerEntity.c:10
SetStaticMarkerDisabled
void SetStaticMarkerDisabled(notnull SCR_MapMarkerBase marker, bool state)
Definition: SCR_MapMarkerManagerComponent.c:374
ConnectToMarkerManagerSystem
protected void ConnectToMarkerManagerSystem()
Definition: SCR_MapMarkerManagerComponent.c:410
InsertStaticMarkerByType
void InsertStaticMarkerByType(SCR_EMapMarkerType type, int worldX, int worldY, bool isLocal, int configId=-1, int factionFlags=0, bool isServerMarker=false)
SPAWN/REMOVE API.
Definition: SCR_MapMarkerManagerComponent.c:120
SCR_EMapMarkerType
SCR_EMapMarkerType
Definition: SCR_MapMarkerConfig.c:5
RemoveStaticMarker
void RemoveStaticMarker(SCR_MapMarkerBase marker)
Definition: SCR_MapMarkerManagerComponent.c:232
rotation
RespawnSystemComponentClass GameComponentClass vector vector rotation
Definition: RespawnSystemComponent.c:23
m_pGameMode
SCR_BaseGameModeComponentClass m_pGameMode
The game mode entity this component is attached to.
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_MapMarkerManagerComponent.c:720
GetMarkerByWidget
SCR_MapMarkerBase GetMarkerByWidget(Widget w)
Definition: SCR_MapMarkerManagerComponent.c:68
m_MarkerSyncComp
protected SCR_MapMarkerSyncComponent m_MarkerSyncComp
Definition: SCR_MapMarkerManagerComponent.c:23
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
UnregisterDynamicMarker
void UnregisterDynamicMarker(SCR_MapMarkerEntity markerEnt)
Definition: SCR_MapMarkerManagerComponent.c:403
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
GetDynamicMarkerByTarget
SCR_MapMarkerEntity GetDynamicMarkerByTarget(SCR_EMapMarkerType type, IEntity target)
Definition: SCR_MapMarkerManagerComponent.c:97
RplLoad
override event protected bool RplLoad(ScriptBitReader reader)
Definition: SCR_MapMarkerManagerComponent.c:647
SCR_MapMarkersUI
Markers UI map component.
Definition: SCR_MapMarkersUI.c:6
EOnInit
override protected void EOnInit(IEntity owner)
Initialise this component with data from FactionsManager.
Definition: SCR_MapMarkerManagerComponent.c:694
Faction
Definition: Faction.c:12
RemoveDynamicMarker
void RemoveDynamicMarker(notnull SCR_MapMarkerEntity ent)
Definition: SCR_MapMarkerManagerComponent.c:265
PrepareMilitaryMarker
SCR_MapMarkerBase PrepareMilitaryMarker(EMilitarySymbolIdentity faction, EMilitarySymbolDimension dimension, EMilitarySymbolIcon typeFlags)
Definition: SCR_MapMarkerManagerComponent.c:179
SCR_PlayerFactionAffiliationComponent
Definition: SCR_PlayerFactionAffiliationComponent.c:16
RPC_DoRemoveStaticMarker
protected void RPC_DoRemoveStaticMarker(int markerID)
Definition: SCR_MapMarkerManagerComponent.c:552
UpdateDebug
protected void UpdateDebug()
Definition: SCR_AISettingsComponent.c:79
DisconnectFromMarkerManagerSystem
protected void DisconnectFromMarkerManagerSystem()
Definition: SCR_MapMarkerManagerComponent.c:421
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
SCR_MapMarkerEntryMilitary
Marker military symbol entry.
Definition: SCR_MapMarkerEntryMilitary.c:4
RplSave
override event protected bool RplSave(ScriptBitWriter writer)
Definition: SCR_MapMarkerManagerComponent.c:601
m_iID
protected int m_iID
Definition: SCR_MapMarkerManagerComponent.c:19
EMilitarySymbolDimension
EMilitarySymbolDimension
Definition: EMilitarySymbol.c:14
m_MapEntity
protected SCR_MapEntity m_MapEntity
Definition: SCR_MapMarkerManagerComponent.c:22
OnMapPanEnd
protected void OnMapPanEnd(float x, float y)
Definition: SCR_MapMarkerManagerComponent.c:568
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition: SCR_FactionManager.c:461
SetMarkerStreamRules
void SetMarkerStreamRules(notnull SCR_MapMarkerEntity marker)
Definition: SCR_MapMarkerManagerComponent.c:312
m_vVisibleFrameMax
protected vector m_vVisibleFrameMax
Definition: SCR_MapMarkerManagerComponent.c:21
OnPlayerDisconnected
override void OnPlayerDisconnected(int playerId, KickCauseCode cause, int timeout)
Definition: SCR_MapMarkerManagerComponent.c:589
SCR_BaseGameModeComponentClass
Definition: SCR_BaseGameModeComponent.c:2
OnAddSynchedMarker
void OnAddSynchedMarker(SCR_MapMarkerBase marker)
Definition: SCR_MapMarkerManagerComponent.c:484
EMilitarySymbolIcon
EMilitarySymbolIcon
Definition: EMilitarySymbol.c:29
InsertStaticMarker
void InsertStaticMarker(SCR_MapMarkerBase marker, bool isLocal, bool isServerMarker=false)
Definition: SCR_MapMarkerManagerComponent.c:142
EnableUpdate
void EnableUpdate(bool state)
Definition: SCR_MapMarkerManagerComponent.c:348
GetPlayerId
proto external int GetPlayerId()
Definition: SCR_SpawnRequestComponent.c:39
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
OnRemoveSynchedMarker
void OnRemoveSynchedMarker(int markerID)
Definition: SCR_MapMarkerManagerComponent.c:518
SCR_BaseGameModeComponent
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_BaseGameModeComponent.c:199
InsertDynamicMarker
SCR_MapMarkerEntity InsertDynamicMarker(SCR_EMapMarkerType type, IEntity entity, int configId=-1)
Definition: SCR_MapMarkerManagerComponent.c:208