Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_PlayersRestrictionZoneManagerComponent Interface Reference
Inheritance diagram for SCR_PlayersRestrictionZoneManagerComponent:
[legend]

Public Member Functions

void AddRestrictionZone (SCR_EditorRestrictionZoneEntity zone)
 Add restriction zone so it can be checked if a player is in/leaves a zone.
 
void RemoveRestrictionZone (SCR_EditorRestrictionZoneEntity zone)
 Remove restriction zone so it no longer checks if a player is in/leaves a zone.
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 

Protected Member Functions

void ZoneCheckUpdate (bool updateAll, SCR_EditorRestrictionZoneEntity removedZone=null, array< int > playerIDZoneMoved=null)
 
void SetPlayerZoneData (int playerID, IEntity playerEntity, bool inZone, bool inWarningZone, ERestrictionZoneWarningType warningType, vector zoneCenter=vector.Zero, float warningRadiusSq=-1, float zoneRadiusSq=-1)
 
void ShowWarningUI (int playerID, bool show, ERestrictionZoneWarningType warningIndex, bool centerChanged, vector zoneCenter, float warningRadiusSq, float zoneRadiusSq)
 
void KillPlayerOutOfZone (int playerID, IEntity playerEntity)
 
void ZoneMovedOrDeleted (SCR_EditorRestrictionZoneEntity zone, array< int > playerIDZoneMoved=null)
 
void OnEntityTransformChanged (SCR_EditableEntityComponent editableEntity, vector prevTransfom[4])
 
void OnPlayerDisconnect (int playerID)
 
void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
void DelayedInit ()
 

Protected Attributes

PlayerManager m_PlayerManager
 
ref set< SCR_EditorRestrictionZoneEntitym_aRestrictionZones = new set<SCR_EditorRestrictionZoneEntity>()
 
ref map< int, ref SCR_PlayerRestrictionZoneDatam_PlayerRestrictionZoneData = new map<int, ref SCR_PlayerRestrictionZoneData>()
 
int m_iPlayerCheckIndex = 0
 

Static Protected Attributes

const int ZONE_CHECK_PLAYER_BATCH_AMOUNT = 10
 The amount of players the manager checks each update.
 
const int ZONE_CHECK_FREQUENCY = 50
 

Member Function Documentation

◆ AddRestrictionZone()

void SCR_PlayersRestrictionZoneManagerComponent.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

◆ DelayedInit()

void SCR_PlayersRestrictionZoneManagerComponent.DelayedInit ( )
protected

◆ EOnInit()

override void SCR_PlayersRestrictionZoneManagerComponent.EOnInit ( IEntity  owner)

◆ KillPlayerOutOfZone()

void SCR_PlayersRestrictionZoneManagerComponent.KillPlayerOutOfZone ( int  playerID,
IEntity  playerEntity 
)
protected

◆ OnDelete()

override void SCR_PlayersRestrictionZoneManagerComponent.OnDelete ( IEntity  owner)

◆ OnEntityTransformChanged()

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

◆ OnPlayerDisconnect()

void SCR_PlayersRestrictionZoneManagerComponent.OnPlayerDisconnect ( int  playerID)
protected

◆ OnPlayerKilled()

void SCR_PlayersRestrictionZoneManagerComponent.OnPlayerKilled ( int  playerId,
IEntity  playerEntity,
IEntity  killerEntity,
notnull Instigator  killer 
)
protected

◆ OnPostInit()

override void SCR_PlayersRestrictionZoneManagerComponent.OnPostInit ( IEntity  owner)

◆ RemoveRestrictionZone()

void SCR_PlayersRestrictionZoneManagerComponent.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

◆ SetPlayerZoneData()

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

◆ ShowWarningUI()

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

◆ ZoneCheckUpdate()

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

◆ ZoneMovedOrDeleted()

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

Member Data Documentation

◆ m_aRestrictionZones

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

◆ m_iPlayerCheckIndex

int SCR_PlayersRestrictionZoneManagerComponent.m_iPlayerCheckIndex = 0
protected

◆ m_PlayerManager

PlayerManager SCR_PlayersRestrictionZoneManagerComponent.m_PlayerManager
protected

◆ m_PlayerRestrictionZoneData

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

◆ ZONE_CHECK_FREQUENCY

const int SCR_PlayersRestrictionZoneManagerComponent.ZONE_CHECK_FREQUENCY = 50
staticprotected

◆ ZONE_CHECK_PLAYER_BATCH_AMOUNT

const int SCR_PlayersRestrictionZoneManagerComponent.ZONE_CHECK_PLAYER_BATCH_AMOUNT = 10
staticprotected

The amount of players the manager checks each update.

The leftovers will be done next update etc


The documentation for this interface was generated from the following file: