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

Go to the source code of this file.

Data Structures

class  SCR_PlayersRestrictionZoneManagerComponentClass
 
class  SCR_PlayerRestrictionZoneData
 

Functions

void AddRestrictionZone (SCR_EditorRestrictionZoneEntity zone)
 
void RemoveRestrictionZone (SCR_EditorRestrictionZoneEntity zone)
 
protected void ZoneCheckUpdate (bool updateAll, SCR_EditorRestrictionZoneEntity removedZone=null, array< int > playerIDZoneMoved=null)
 
protected void SetPlayerZoneData (int playerID, IEntity playerEntity, bool inZone, bool inWarningZone, ERestrictionZoneWarningType warningType, vector zoneCenter=vector.Zero, float warningRadiusSq=-1, float zoneRadiusSq=-1)
 
protected void ShowWarningUI (int playerID, bool show, ERestrictionZoneWarningType warningIndex, bool centerChanged, vector zoneCenter, float warningRadiusSq, float zoneRadiusSq)
 
protected void KillPlayerOutOfZone (int playerID, IEntity playerEntity)
 
protected void ZoneMovedOrDeleted (SCR_EditorRestrictionZoneEntity zone, array< int > playerIDZoneMoved=null)
 
protected void OnEntityTransformChanged (SCR_EditableEntityComponent editableEntity, vector prevTransfom[4])
 
protected void OnPlayerDisconnect (int playerID)
 
protected void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
override void EOnInit (IEntity owner)
 Initialise this component with data from FactionsManager. More...
 
protected void DelayedInit ()
 
override void OnPostInit (IEntity owner)
 Editable Mine. More...
 
override void OnDelete (IEntity owner)
 

Variables

SCR_PlayersRestrictionZoneManagerComponentClass m_PlayerManager
 
protected ref set< SCR_EditorRestrictionZoneEntitym_aRestrictionZones = new set<SCR_EditorRestrictionZoneEntity>()
 
protected ref map< int, ref SCR_PlayerRestrictionZoneDatam_PlayerRestrictionZoneData = new map<int, ref SCR_PlayerRestrictionZoneData>()
 
protected int m_iPlayerCheckIndex = 0
 
const protected int ZONE_CHECK_PLAYER_BATCH_AMOUNT = 10
 The amount of players the manager checks each update. The leftovers will be done next update etc. More...
 
const protected int ZONE_CHECK_FREQUENCY = 50
 

Function Documentation

◆ AddRestrictionZone()

void AddRestrictionZone ( SCR_EditorRestrictionZoneEntity  zone)

Add restriction zone so it can be checked if a player is in/leaves a zone. Server only

Parameters
[in]zonethe zone to add

Definition at line 28 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ DelayedInit()

protected void DelayedInit ( )

◆ KillPlayerOutOfZone()

protected void KillPlayerOutOfZone ( int  playerID,
IEntity  playerEntity 
)

◆ OnEntityTransformChanged()

protected void OnEntityTransformChanged ( SCR_EditableEntityComponent  editableEntity,
vector  prevTransfom[4] 
)

◆ OnPlayerDisconnect()

protected void OnPlayerDisconnect ( int  playerID)

◆ RemoveRestrictionZone()

void RemoveRestrictionZone ( SCR_EditorRestrictionZoneEntity  zone)

Remove restriction zone so it no longer checks if a player is in/leaves a zone. Server only

Parameters
[in]zonethe zone to remove

Definition at line 42 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ SetPlayerZoneData()

protected void SetPlayerZoneData ( int  playerID,
IEntity  playerEntity,
bool  inZone,
bool  inWarningZone,
ERestrictionZoneWarningType  warningType,
vector  zoneCenter = vector.Zero,
float  warningRadiusSq = -1,
float  zoneRadiusSq = -1 
)

◆ ShowWarningUI()

protected void ShowWarningUI ( int  playerID,
bool  show,
ERestrictionZoneWarningType  warningIndex,
bool  centerChanged,
vector  zoneCenter,
float  warningRadiusSq,
float  zoneRadiusSq 
)

◆ ZoneCheckUpdate()

protected void ZoneCheckUpdate ( bool  updateAll,
SCR_EditorRestrictionZoneEntity  removedZone = null,
array< int playerIDZoneMoved = null 
)

Definition at line 60 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ ZoneMovedOrDeleted()

protected void ZoneMovedOrDeleted ( SCR_EditorRestrictionZoneEntity  zone,
array< int playerIDZoneMoved = null 
)

Variable Documentation

◆ m_aRestrictionZones

protected ref set<SCR_EditorRestrictionZoneEntity> m_aRestrictionZones = new set<SCR_EditorRestrictionZoneEntity>()

Definition at line 12 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ m_iPlayerCheckIndex

protected int m_iPlayerCheckIndex = 0

Definition at line 18 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ m_PlayerManager

◆ m_PlayerRestrictionZoneData

protected ref map<int, ref SCR_PlayerRestrictionZoneData> m_PlayerRestrictionZoneData = new map<int, ref SCR_PlayerRestrictionZoneData>()

Definition at line 15 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ ZONE_CHECK_FREQUENCY

const protected int ZONE_CHECK_FREQUENCY = 50

Definition at line 21 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ ZONE_CHECK_PLAYER_BATCH_AMOUNT

const protected int ZONE_CHECK_PLAYER_BATCH_AMOUNT = 10

The amount of players the manager checks each update. The leftovers will be done next update etc.

Definition at line 19 of file SCR_PlayersRestrictionZoneManagerComponent.c.