Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_SpawnLockComponent Interface Reference

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. More...

Inheritance diagram for SCR_SpawnLockComponent:
[legend]

Public Member Functions

void Lock (Managed source, bool auth)
 Locks the component with the provided instance.
 
void Unlock (Managed source, bool auth)
 Unlocks the component with the provided instance.
 
bool IsLocked (bool auth)
 Is this lock engaged? The lock is engaged if any instance has engaged it.
 
bool TryLock (Managed source, bool auth)
 Try to engage lock, return true on success; false otherwise.
 

Protected Member Functions

override void OnPostInit (IEntity owner)
 

Protected Attributes

ref set< Managed > m_RequestLocks = new set<Managed>()
 Set of all instances that issued a lock on this component.
 
ref set< Managed > m_AuthorityLocks = new set<Managed>()
 Set of all instances that issued a lock on this component.
 

Detailed Description

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

Member Function Documentation

◆ IsLocked()

bool SCR_SpawnLockComponent.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

◆ Lock()

void SCR_SpawnLockComponent.Lock ( Managed  source,
bool  auth 
)

Locks the component with the provided instance.

Parameters
[in]sourceLock instigator.
[in]auth

◆ OnPostInit()

override void SCR_SpawnLockComponent.OnPostInit ( IEntity  owner)
protected

◆ TryLock()

bool SCR_SpawnLockComponent.TryLock ( Managed  source,
bool  auth 
)

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

Parameters
[in]source
[in]auth
Returns

◆ Unlock()

void SCR_SpawnLockComponent.Unlock ( Managed  source,
bool  auth 
)

Unlocks the component with the provided instance.

Parameters
[in]sourceUnlock instigator.
[in]auth

Member Data Documentation

◆ m_AuthorityLocks

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

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.

◆ m_RequestLocks

ref set<Managed> SCR_SpawnLockComponent.m_RequestLocks = new set<Managed>()
protected

Set of all instances that issued a lock on this component.

Each instance should make sure to properly engage and disengage the lock.


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