| 74 | state.enabled = CPHObject::is_active(); //!!dBodyIsEnabled(m_body); |
| 75 | } |
| 76 | void CPHCharacter::set_State(const SPHNetState& state) |
| 77 | { |
| 78 | m_body_interpolation.SetPosition(state.previous_position, 0); |
| 79 | m_body_interpolation.SetPosition(state.position, 1); |
| 80 | SetPosition(state.position); |
| 81 | SetVelocity(state.linear_vel); |
| 82 | setForce(state.force); |
| 83 | |
| 84 | // SetAcceleration(state.accel); |
| 85 | // SetMaximumVelocity(state.max_velocity); |
| 86 | |
| 87 | if (!b_exist) |
| 88 | return; |
| 89 | if (state.enabled) |
| 90 | { |
| 91 | Enable(); |
| 92 | }; |
| 93 | if (!state.enabled) |
| 94 | { |
| 95 | Disable(); |
| 96 | }; |
| 97 | VERIFY2(dBodyStateValide(m_body), "WRONG BODYSTATE WAS SET"); |
| 98 | } |
| 99 | |
| 100 | void CPHCharacter::Disable() |
| 101 | { |
no test coverage detected