| 62 | m_stateL2.Reset(); |
| 63 | } |
| 64 | void CBaseDisableData::Disabling() |
| 65 | { |
| 66 | dBodyID body = get_body(); |
| 67 | m_count--; |
| 68 | |
| 69 | UpdateL1(); |
| 70 | |
| 71 | CheckState(m_stateL1); |
| 72 | |
| 73 | if (m_count == 0) // ph_world->disable_count==dis_frames//m_count==m_frames |
| 74 | { |
| 75 | UpdateL2(); |
| 76 | CheckState(m_stateL2); |
| 77 | m_count = m_frames; |
| 78 | } |
| 79 | const dReal* force = dBodyGetForce(body); |
| 80 | const dReal* torqu = dBodyGetTorque(body); |
| 81 | if (dDOT(force, force) > 0.f || dDOT(torqu, torqu) > 0.f) |
| 82 | m_disabled = false; |
| 83 | if (dBodyIsEnabled(body)) |
| 84 | { |
| 85 | ReEnable(); |
| 86 | if (!m_disabled && (ph_world->disable_count != m_count % worldDisablingParams.objects_params.L2frames)) |
| 87 | { |
| 88 | m_count = m_frames + ph_world->disable_count; |
| 89 | } |
| 90 | } |
| 91 | if (m_disabled) |
| 92 | Disable(); // dBodyDisable(body); |
| 93 | } |
| 94 | |
| 95 | void CPHDisablingBase::Reinit() |
| 96 | { |
nothing calls this directly
no test coverage detected