MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / UpdateValues

Method UpdateValues

ogsr_engine/xrGame/PHDisabling.cpp:106–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 m_stateL2.enable = !disable;
105}
106void 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}
121void CPHDisablingBase::UpdateL2()
122{
123 m_stateL2.Reset();

Callers

nothing calls this directly

Calls 2

UpdatePreviousMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected