Arma Reforger Script API
|
This class is a state machine which estimates if entity is currently moving or is stopped. More...
Public Member Functions | |
void | SCR_AIMovementDetector (IEntity myEntity) |
bool | GetMoving () |
Returns current state, and updates it in lazy manner, not more often than once per UPDATE_INTERVAL_S. | |
Protected Member Functions | |
void | Update (WorldTimestamp worldTime) |
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 |
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.
void SCR_AIMovementDetector.SCR_AIMovementDetector | ( | IEntity | myEntity | ) |
bool SCR_AIMovementDetector.GetMoving | ( | ) |
Returns current state, and updates it in lazy manner, not more often than once per UPDATE_INTERVAL_S.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |