Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIMovementDetector Class Reference

Protected Member Functions

void SCR_AIMovementDetector (IEntity myEntity)
void Update (WorldTimestamp worldTime)
bool GetMoving ()
 Returns current state, and updates it in lazy manner, not more often than once per UPDATE_INTERVAL_S.

Protected Attributes

vector m_vPrevPos
vector m_vPosStopped
IEntity m_OwnerEntity
WorldTimestamp m_TimeLastStopped
WorldTimestamp m_TimeLastMoved
WorldTimestamp m_TimeLastUpdate
bool m_bMoving

Static Protected Attributes

static const float STOPPED_RADIUS = 6
static const float STOPPED_RADIUS_SQ = STOPPED_RADIUS * STOPPED_RADIUS
static const float TIME_STOPPED_S = 0.7
static const float TIME_MOVING_S = 0.17
static const float UPDATE_INTERVAL_S = 0.2

Detailed Description

This class is a state machine which estimates if entity is currently moving or is stopped. Main goal is to determine if player, as infantry group leader, intends to move, or intends to stay around same place. But it is used for AI squad leaders same way.

Definition at line 8 of file SCR_AIMovementDetector.c.

Constructor & Destructor Documentation

◆ SCR_AIMovementDetector()

void SCR_AIMovementDetector::SCR_AIMovementDetector ( IEntity myEntity)
inlineprotected

Definition at line 33 of file SCR_AIMovementDetector.c.

Member Function Documentation

◆ GetMoving()

bool SCR_AIMovementDetector::GetMoving ( )
inlineprotected

Returns current state, and updates it in lazy manner, not more often than once per UPDATE_INTERVAL_S.

Definition at line 90 of file SCR_AIMovementDetector.c.

◆ Update()

void SCR_AIMovementDetector::Update ( WorldTimestamp worldTime)
inlineprotected

Definition at line 39 of file SCR_AIMovementDetector.c.

Member Data Documentation

◆ m_bMoving

bool SCR_AIMovementDetector::m_bMoving
protected

Definition at line 16 of file SCR_AIMovementDetector.c.

◆ m_OwnerEntity

IEntity SCR_AIMovementDetector::m_OwnerEntity
protected

Definition at line 12 of file SCR_AIMovementDetector.c.

◆ m_TimeLastMoved

WorldTimestamp SCR_AIMovementDetector::m_TimeLastMoved
protected

Definition at line 14 of file SCR_AIMovementDetector.c.

◆ m_TimeLastStopped

WorldTimestamp SCR_AIMovementDetector::m_TimeLastStopped
protected

Definition at line 13 of file SCR_AIMovementDetector.c.

◆ m_TimeLastUpdate

WorldTimestamp SCR_AIMovementDetector::m_TimeLastUpdate
protected

Definition at line 15 of file SCR_AIMovementDetector.c.

◆ m_vPosStopped

vector SCR_AIMovementDetector::m_vPosStopped
protected

Definition at line 11 of file SCR_AIMovementDetector.c.

◆ m_vPrevPos

vector SCR_AIMovementDetector::m_vPrevPos
protected

Definition at line 10 of file SCR_AIMovementDetector.c.

◆ STOPPED_RADIUS

const float SCR_AIMovementDetector::STOPPED_RADIUS = 6
staticprotected

Definition at line 24 of file SCR_AIMovementDetector.c.

◆ STOPPED_RADIUS_SQ

const float SCR_AIMovementDetector::STOPPED_RADIUS_SQ = STOPPED_RADIUS * STOPPED_RADIUS
staticprotected

Definition at line 25 of file SCR_AIMovementDetector.c.

◆ TIME_MOVING_S

const float SCR_AIMovementDetector::TIME_MOVING_S = 0.17
staticprotected

Definition at line 28 of file SCR_AIMovementDetector.c.

◆ TIME_STOPPED_S

const float SCR_AIMovementDetector::TIME_STOPPED_S = 0.7
staticprotected

Definition at line 27 of file SCR_AIMovementDetector.c.

◆ UPDATE_INTERVAL_S

const float SCR_AIMovementDetector::UPDATE_INTERVAL_S = 0.2
staticprotected

Definition at line 30 of file SCR_AIMovementDetector.c.


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