Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MapMarkerManagerComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_MapMarkerManagerComponentClass
 

Functions

SCR_MapMarkerManagerComponentClass SCR_BaseGameModeComponentClass Attribute ("{720E8E61D7692172}Configs/Map/MapMarkerConfig.conf", UIWidgets.ResourceNamePicker)] protected ResourceName m_sMarkerCfgPath
 
SCR_MapMarkerConfig GetMarkerConfig ()
 
array< ref SCR_MapMarkerBaseGetStaticMarkers ()
 
array< ref SCR_MapMarkerBaseGetDisabledMarkers ()
 
array< SCR_MapMarkerEntityGetDynamicMarkers ()
 
SCR_MapMarkerBase GetMarkerByWidget (Widget w)
 
SCR_MapMarkerBase GetStaticMarkerByID (int markerID)
 
SCR_MapMarkerEntity GetDynamicMarkerByTarget (SCR_EMapMarkerType type, IEntity target)
 
void InsertStaticMarkerByType (SCR_EMapMarkerType type, int worldX, int worldY, bool isLocal, int configId=-1, int factionFlags=0, bool isServerMarker=false)
 SPAWN/REMOVE API. More...
 
void InsertStaticMarker (SCR_MapMarkerBase marker, bool isLocal, bool isServerMarker=false)
 
SCR_MapMarkerBase PrepareMilitaryMarker (EMilitarySymbolIdentity faction, EMilitarySymbolDimension dimension, EMilitarySymbolIcon typeFlags)
 
SCR_MapMarkerEntity InsertDynamicMarker (SCR_EMapMarkerType type, IEntity entity, int configId=-1)
 
void RemoveStaticMarker (SCR_MapMarkerBase marker)
 
void RemoveDynamicMarker (notnull SCR_MapMarkerEntity ent)
 
void AssignMarkerUID (SCR_MapMarkerBase marker)
 
protected void HandleStreamOut (SCR_MapMarkerEntity marker, PlayerController pController, bool state)
 
void SetMarkerStreamRules (notnull SCR_MapMarkerEntity marker)
 
void SetStreamRulesForPlayer (int playerID)
 
void EnableUpdate (bool state)
 
protected bool FindMarkerSyncComponent ()
 
void SetStaticMarkerDisabled (notnull SCR_MapMarkerBase marker, bool state)
 
void RegisterDynamicMarker (SCR_MapMarkerEntity markerEnt)
 
void UnregisterDynamicMarker (SCR_MapMarkerEntity markerEnt)
 
protected void ConnectToMarkerManagerSystem ()
 
protected void DisconnectFromMarkerManagerSystem ()
 
void Update (float timeSlice)
 
void OnAddSynchedMarker (SCR_MapMarkerBase marker)
 
void OnRemoveSynchedMarker (int markerID)
 
void OnAskAddStaticMarker (SCR_MapMarkerBase markerData)
 
void OnAskRemoveStaticMarker (int markerID)
 
protected void RPC_DoAddStaticMarker (SCR_MapMarkerBase markerData)
 
protected void RPC_DoRemoveStaticMarker (int markerID)
 
void OnPlayerFactionChanged_S (int playerID, SCR_PlayerFactionAffiliationComponent playerComponent, Faction faction)
 
protected void OnMapPanEnd (float x, float y)
 
override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 
override event protected bool RplSave (ScriptBitWriter writer)
 
override event protected bool RplLoad (ScriptBitReader reader)
 
override protected void EOnInit (IEntity owner)
 Initialise this component with data from FactionsManager. More...
 
override void OnPostInit (IEntity owner)
 Editable Mine. More...
 
void ~SCR_MapMarkerManagerComponent ()
 

Variables

protected ref array< ref SCR_MapMarkerBasem_aStaticMarkers = {}
 
protected ref array< ref SCR_MapMarkerBasem_aDisabledMarkers = {}
 
protected ref array< SCR_MapMarkerEntitym_aDynamicMarkers = {}
 
protected int m_iID
 
protected vector m_vVisibleFrameMin
 
protected vector m_vVisibleFrameMax
 
protected SCR_MapEntity m_MapEntity
 
protected SCR_MapMarkerSyncComponent m_MarkerSyncComp
 
protected ref SCR_MapMarkerConfig m_MarkerCfg
 

Function Documentation

◆ AssignMarkerUID()

void AssignMarkerUID ( SCR_MapMarkerBase  marker)

Definition at line 274 of file SCR_MapMarkerManagerComponent.c.

◆ Attribute()

SCR_MapMarkerManagerComponentClass SCR_BaseGameModeComponentClass Attribute ( "{720E8E61D7692172}Configs/Map/MapMarkerConfig.conf ,
UIWidgets.  ResourceNamePicker 
)

Map marker manager, keeps array of markers and takes care of synchronization Attached to GameMode entity

◆ ConnectToMarkerManagerSystem()

protected void ConnectToMarkerManagerSystem ( )

Definition at line 410 of file SCR_MapMarkerManagerComponent.c.

◆ DisconnectFromMarkerManagerSystem()

protected void DisconnectFromMarkerManagerSystem ( )

Definition at line 421 of file SCR_MapMarkerManagerComponent.c.

◆ EnableUpdate()

void EnableUpdate ( bool  state)

Set manager to run UI updates for markers

Parameters
[in]state

Definition at line 348 of file SCR_MapMarkerManagerComponent.c.

◆ FindMarkerSyncComponent()

protected bool FindMarkerSyncComponent ( )

Definition at line 357 of file SCR_MapMarkerManagerComponent.c.

◆ GetDisabledMarkers()

array<ref SCR_MapMarkerBase> GetDisabledMarkers ( )
Returns

Definition at line 53 of file SCR_MapMarkerManagerComponent.c.

◆ GetDynamicMarkerByTarget()

SCR_MapMarkerEntity GetDynamicMarkerByTarget ( SCR_EMapMarkerType  type,
IEntity  target 
)
Parameters
[in]type
[in]target
Returns

Definition at line 97 of file SCR_MapMarkerManagerComponent.c.

◆ GetDynamicMarkers()

array<SCR_MapMarkerEntity> GetDynamicMarkers ( )
Returns

Definition at line 60 of file SCR_MapMarkerManagerComponent.c.

◆ GetMarkerByWidget()

SCR_MapMarkerBase GetMarkerByWidget ( Widget  w)
Parameters
[in]w
Returns

Definition at line 68 of file SCR_MapMarkerManagerComponent.c.

◆ GetMarkerConfig()

SCR_MapMarkerConfig GetMarkerConfig ( )
Returns

Definition at line 39 of file SCR_MapMarkerManagerComponent.c.

◆ GetStaticMarkerByID()

SCR_MapMarkerBase GetStaticMarkerByID ( int  markerID)
Parameters
[in]markerID
Returns

Definition at line 82 of file SCR_MapMarkerManagerComponent.c.

◆ GetStaticMarkers()

array<ref SCR_MapMarkerBase> GetStaticMarkers ( )
Returns

Definition at line 46 of file SCR_MapMarkerManagerComponent.c.

◆ HandleStreamOut()

protected void HandleStreamOut ( SCR_MapMarkerEntity  marker,
PlayerController  pController,
bool  state 
)

Enable stream out of specific marker for target identity

Parameters
[in]markeris the subject marker
[in]pControllerPlayerController is the subject player's controller
[in]statesets target state of stream out -> enabled if true, meaning that replication will stream out the subject

Definition at line 292 of file SCR_MapMarkerManagerComponent.c.

◆ InsertDynamicMarker()

SCR_MapMarkerEntity InsertDynamicMarker ( SCR_EMapMarkerType  type,
IEntity  entity,
int  configId = -1 
)

Authority only

Parameters
[in]type
[in]entity
[in]configId
Returns

Definition at line 208 of file SCR_MapMarkerManagerComponent.c.

◆ InsertStaticMarker()

void InsertStaticMarker ( SCR_MapMarkerBase  marker,
bool  isLocal,
bool  isServerMarker = false 
)

Insert customized static marker

Parameters
[in]markeris the subject
[in]isLocaldetermines whether the marker is synchronised to other players or local
[in]isServerMarkerdetermines whether the marker is spawned by server and should not count towards marker limits (different from server-client spawning his own markers)

Definition at line 142 of file SCR_MapMarkerManagerComponent.c.

◆ InsertStaticMarkerByType()

void InsertStaticMarkerByType ( SCR_EMapMarkerType  type,
int  worldX,
int  worldY,
bool  isLocal,
int  configId = -1,
int  factionFlags = 0,
bool  isServerMarker = false 
)

SPAWN/REMOVE API.

Insert predefined type of static marker

Parameters
[in]typeis primary marker type
[in]worldXis x world poosition
[in]worldYis y world poosition
[in]isLocaldetermiens whether the marker will be created client side only or synchronized to other eligible players
[in]configIdis secondary marker ID used to select a predefined subtype
[in]factionFLagsdetermine which factions are able to see the marker, 0 for everyone

Definition at line 120 of file SCR_MapMarkerManagerComponent.c.

◆ OnAddSynchedMarker()

void OnAddSynchedMarker ( SCR_MapMarkerBase  marker)

RPC result of marker add broadcast Is an event and should NOT be called directly, it is only public since server needs to call it from SCR_MapMarkerSyncComponent

Parameters
[in]marker

Definition at line 484 of file SCR_MapMarkerManagerComponent.c.

◆ OnAskAddStaticMarker()

void OnAskAddStaticMarker ( SCR_MapMarkerBase  markerData)

Server side call from sync component for RPC marker add broadcast

Parameters
[in]markerData

Definition at line 530 of file SCR_MapMarkerManagerComponent.c.

◆ OnAskRemoveStaticMarker()

void OnAskRemoveStaticMarker ( int  markerID)

Server side call from sync component for RPC marker remove broadcast

Parameters
[in]markerID

Definition at line 538 of file SCR_MapMarkerManagerComponent.c.

◆ OnMapPanEnd()

protected void OnMapPanEnd ( float  x,
float  y 
)

Definition at line 568 of file SCR_MapMarkerManagerComponent.c.

◆ OnPlayerFactionChanged_S()

void OnPlayerFactionChanged_S ( int  playerID,
SCR_PlayerFactionAffiliationComponent  playerComponent,
Faction  faction 
)

Faction manager event -> server only

Parameters
[in]playerID
[in]playerComponent
[in]faction

Definition at line 562 of file SCR_MapMarkerManagerComponent.c.

◆ OnRemoveSynchedMarker()

void OnRemoveSynchedMarker ( int  markerID)

RPC result of marker remove broadcast Is an event and should NOT be called directly, it is only public since server needs to call it from SCR_MapMaprkerSyncComponent

Parameters
[in]markerID

Definition at line 518 of file SCR_MapMarkerManagerComponent.c.

◆ PrepareMilitaryMarker()

SCR_MapMarkerBase PrepareMilitaryMarker ( EMilitarySymbolIdentity  faction,
EMilitarySymbolDimension  dimension,
EMilitarySymbolIcon  typeFlags 
)

Prepare military marker based on existing configure attributes within marker config

Parameters
[in]faction
[in]dimension
[in]typeFlags
Returns
military marker with set symbol parameters for network synchronisation

Definition at line 179 of file SCR_MapMarkerManagerComponent.c.

◆ RegisterDynamicMarker()

void RegisterDynamicMarker ( SCR_MapMarkerEntity  markerEnt)

Registers the marker within manager, called by the marker entity

Parameters
[in]markerEnt

Definition at line 394 of file SCR_MapMarkerManagerComponent.c.

◆ RemoveDynamicMarker()

void RemoveDynamicMarker ( notnull SCR_MapMarkerEntity  ent)

Authority only

Parameters
[in]ent

Definition at line 265 of file SCR_MapMarkerManagerComponent.c.

◆ RemoveStaticMarker()

void RemoveStaticMarker ( SCR_MapMarkerBase  marker)

Remove a static marker

Parameters
[in]marker

Definition at line 232 of file SCR_MapMarkerManagerComponent.c.

◆ RPC_DoAddStaticMarker()

protected void RPC_DoAddStaticMarker ( SCR_MapMarkerBase  markerData)

Definition at line 545 of file SCR_MapMarkerManagerComponent.c.

◆ RPC_DoRemoveStaticMarker()

protected void RPC_DoRemoveStaticMarker ( int  markerID)

Definition at line 552 of file SCR_MapMarkerManagerComponent.c.

◆ RplLoad()

override event protected bool RplLoad ( ScriptBitReader  reader)

Definition at line 647 of file SCR_MapMarkerManagerComponent.c.

◆ RplSave()

override event protected bool RplSave ( ScriptBitWriter  writer)

Definition at line 601 of file SCR_MapMarkerManagerComponent.c.

◆ SetMarkerStreamRules()

void SetMarkerStreamRules ( notnull SCR_MapMarkerEntity  marker)

Network streaming rules for the marker Authority only -> Called when marker faction is assigned

Parameters
[in]marker

Definition at line 312 of file SCR_MapMarkerManagerComponent.c.

◆ SetStaticMarkerDisabled()

void SetStaticMarkerDisabled ( notnull SCR_MapMarkerBase  marker,
bool  state 
)

Enable/disable static marker

Parameters
[in]marker
[in]state

Definition at line 374 of file SCR_MapMarkerManagerComponent.c.

◆ SetStreamRulesForPlayer()

void SetStreamRulesForPlayer ( int  playerID)

Network streaming rules of all markers of player Authority only -> Set when player is spawned

Parameters
[in]playerID

Definition at line 332 of file SCR_MapMarkerManagerComponent.c.

◆ UnregisterDynamicMarker()

void UnregisterDynamicMarker ( SCR_MapMarkerEntity  markerEnt)

Unregisters the marker within manager, called by the marker entity

Parameters
[in]markerEnt

Definition at line 403 of file SCR_MapMarkerManagerComponent.c.

◆ Update()

void Update ( float  timeSlice)
Parameters
[in]timeSlice

Definition at line 432 of file SCR_MapMarkerManagerComponent.c.

◆ ~SCR_MapMarkerManagerComponent()

void ~SCR_MapMarkerManagerComponent ( )

Definition at line 735 of file SCR_MapMarkerManagerComponent.c.

Variable Documentation

◆ m_aDisabledMarkers

protected ref array<ref SCR_MapMarkerBase> m_aDisabledMarkers = {}

Definition at line 16 of file SCR_MapMarkerManagerComponent.c.

◆ m_aDynamicMarkers

protected ref array<SCR_MapMarkerEntity> m_aDynamicMarkers = {}

Definition at line 17 of file SCR_MapMarkerManagerComponent.c.

◆ m_aStaticMarkers

protected ref array<ref SCR_MapMarkerBase> m_aStaticMarkers = {}

Definition at line 15 of file SCR_MapMarkerManagerComponent.c.

◆ m_iID

protected int m_iID

Definition at line 19 of file SCR_MapMarkerManagerComponent.c.

◆ m_MapEntity

protected SCR_MapEntity m_MapEntity

Definition at line 22 of file SCR_MapMarkerManagerComponent.c.

◆ m_MarkerCfg

protected ref SCR_MapMarkerConfig m_MarkerCfg

Definition at line 24 of file SCR_MapMarkerManagerComponent.c.

◆ m_MarkerSyncComp

protected SCR_MapMarkerSyncComponent m_MarkerSyncComp

Definition at line 23 of file SCR_MapMarkerManagerComponent.c.

◆ m_vVisibleFrameMax

protected vector m_vVisibleFrameMax

Definition at line 21 of file SCR_MapMarkerManagerComponent.c.

◆ m_vVisibleFrameMin

protected vector m_vVisibleFrameMin

Definition at line 20 of file SCR_MapMarkerManagerComponent.c.