| 104 | m_stateL2.enable = !disable; |
| 105 | } |
| 106 | void CPHDisablingBase::UpdateValues(const Fvector& new_pos, const Fvector& new_vel) |
| 107 | { |
| 108 | if (m_count < m_frames) |
| 109 | { |
| 110 | float velocity_param = m_mean_velocity.Update(new_pos); |
| 111 | float acceleration_param = m_mean_acceleration.Update(new_vel); |
| 112 | CheckState(m_stateL1, velocity_param * m_frames, acceleration_param * m_frames); |
| 113 | } |
| 114 | else |
| 115 | { |
| 116 | float velocity_param = m_mean_velocity.UpdatePrevious(new_pos); |
| 117 | float acceleration_param = m_mean_acceleration.UpdatePrevious(new_vel); |
| 118 | CheckState(m_stateL1, velocity_param * m_frames, acceleration_param * m_frames); |
| 119 | } |
| 120 | } |
| 121 | void CPHDisablingBase::UpdateL2() |
| 122 | { |
| 123 | m_stateL2.Reset(); |
nothing calls this directly
no test coverage detected