3 const float DISTANCE_SENSITIVITY_SQR =
Math.SqrFloat(0.05);
4 const int TICK_FREQUENCY = 15;
5 const int IDLE_COUNT_THRESHOLD = 40;
20 override bool ActivateCondition(
PlayerBase player)
25 override bool DeactivateCondition(
PlayerBase player)
30 override void OnTick(
PlayerBase player,
float deltaT)
32 float dist_sqr =
vector.DistanceSq(player.GetPosition(), m_PrevPosition);
33 if( dist_sqr < DISTANCE_SENSITIVITY_SQR)
39 if(m_IdleCount >= IDLE_COUNT_THRESHOLD)
42 player.SetSynchDirty();
47 m_PrevPosition = player.GetPosition();
49 if( m_IdleCount == IDLE_COUNT_THRESHOLD)
52 player.SetSynchDirty();
67 player.SetSynchDirty();