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

Go to the source code of this file.

Data Structures

class  SCR_SpawnLockComponentClass
 

Functions

protected override void OnPostInit (IEntity owner)
 Editable Mine. More...
 
void Lock (Managed source, bool auth)
 
void Unlock (Managed source, bool auth)
 
bool IsLocked (bool auth)
 
bool TryLock (Managed source, bool auth)
 

Variables

SCR_SpawnLockComponentClass m_RequestLocks = new set<Managed>()
 
protected ref set< Managed > m_AuthorityLocks = new set<Managed>()
 

Function Documentation

◆ IsLocked()

bool IsLocked ( bool  auth)

Is this lock engaged? The lock is engaged if any instance has engaged it. (using Lock) The lock is lifted once all instances that have previously engaged it disengage it. (using Unlock)

Parameters
[in]auth
Returns

Definition at line 81 of file SCR_SpawnLockComponent.c.

◆ Lock()

void Lock ( Managed  source,
bool  auth 
)

Locks the component with the provided instance.

Parameters
[in]sourceLock instigator.
[in]auth

Definition at line 35 of file SCR_SpawnLockComponent.c.

◆ TryLock()

bool TryLock ( Managed  source,
bool  auth 
)

Try to engage lock, return true on success; false otherwise.

Parameters
[in]source
[in]auth
Returns

Definition at line 94 of file SCR_SpawnLockComponent.c.

◆ Unlock()

void Unlock ( Managed  source,
bool  auth 
)

Unlocks the component with the provided instance.

Parameters
[in]sourceUnlock instigator.
[in]auth

Definition at line 51 of file SCR_SpawnLockComponent.c.

Variable Documentation

◆ m_AuthorityLocks

protected ref set<Managed> m_AuthorityLocks = new set<Managed>()

Set of all instances that issued a lock on this component. Each instance should make sure to properly engage and disengage the lock. Disclaimer: This set is never relevant to a proxy.

Definition at line 21 of file SCR_SpawnLockComponent.c.

◆ m_RequestLocks

SCR_SpawnLockComponentClass m_RequestLocks = new set<Managed>()

This components allows to lock SCR_SpawnRequestComponent(s) from issuing any more requests until the issued one has been processed by the authority and a response has been received. The expected hierarchy is: PlayerController

  • ...
  • SCR_SpawnLockComponent
  • ... Set of all instances that issued a lock on this component. Each instance should make sure to properly engage and disengage the lock.