Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PlayersRestrictionZoneManagerComponent.c File Reference

Go to the source code of this file.

Classes

class  SCR_PlayersRestrictionZoneManagerComponentClass
class  SCR_PlayerRestrictionZoneData

Functions

void AddRestrictionZone (SCR_EditorRestrictionZoneEntity zone)
void RemoveRestrictionZone (SCR_EditorRestrictionZoneEntity zone)
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 (notnull SCR_InstigatorContextData instigatorContextData)
override void EOnInit (IEntity owner)
void DelayedInit ()
override void OnPostInit (IEntity owner)
 Editable Mine.
override void OnDelete (IEntity owner)

Variables

SCR_PlayersRestrictionZoneManagerComponentClass 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
const int ZONE_CHECK_PLAYER_BATCH_AMOUNT = 10
 The amount of players the manager checks each update. The leftovers will be done next update etc.
const int ZONE_CHECK_FREQUENCY = 50

Function Documentation

◆ AddRestrictionZone()

void AddRestrictionZone ( SCR_EditorRestrictionZoneEntity zone)
protected

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()

void DelayedInit ( )
protected

◆ KillPlayerOutOfZone()

void KillPlayerOutOfZone ( int playerID,
IEntity playerEntity )
protected

◆ OnDelete()

override void OnDelete ( IEntity owner)
protected

◆ OnEntityTransformChanged()

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

◆ OnPlayerDisconnect()

void OnPlayerDisconnect ( int playerID)
protected

◆ OnPlayerKilled()

void OnPlayerKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Called after a player gets killed.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Definition at line 382 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ RemoveRestrictionZone()

void RemoveRestrictionZone ( SCR_EditorRestrictionZoneEntity zone)
protected

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()

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

◆ ShowWarningUI()

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

◆ ZoneCheckUpdate()

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

Definition at line 60 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ ZoneMovedOrDeleted()

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

Variable Documentation

◆ m_aRestrictionZones

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

Definition at line 12 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ m_iPlayerCheckIndex

int m_iPlayerCheckIndex = 0
protected

Definition at line 18 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ m_PlayerManager

◆ m_PlayerRestrictionZoneData

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

Definition at line 15 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ ZONE_CHECK_FREQUENCY

const int ZONE_CHECK_FREQUENCY = 50
protected

Definition at line 21 of file SCR_PlayersRestrictionZoneManagerComponent.c.

◆ ZONE_CHECK_PLAYER_BATCH_AMOUNT

const int ZONE_CHECK_PLAYER_BATCH_AMOUNT = 10
protected

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.