| 97 | const char* dbg_state[] = {"clbNone", "clbNearUp", "clbNearDown", "clbClimbingUp", "clbClimbingDown", "clbDepart", "clbNoLadder"}; |
| 98 | #endif |
| 99 | void CElevatorState::SwitchState(Estate new_state) |
| 100 | { |
| 101 | if (!StateSwitchInertion(new_state)) |
| 102 | return; |
| 103 | #ifdef DEBUG |
| 104 | if (ph_dbg_draw_mask.test(phDbgLadder)) |
| 105 | Msg("%s", dbg_state[new_state]); |
| 106 | #endif |
| 107 | VERIFY(m_character); |
| 108 | if ((m_state != clbClimbingUp && m_state != clbClimbingDown) && (new_state == clbClimbingUp || new_state == clbClimbingDown)) |
| 109 | dBodySetGravityMode(m_character->get_body(), 0); |
| 110 | |
| 111 | if ((new_state != clbClimbingUp && new_state != clbClimbingDown) && (m_state == clbClimbingUp || m_state == clbClimbingDown)) |
| 112 | dBodySetGravityMode(m_character->get_body(), 1); |
| 113 | |
| 114 | // if(new_state==clbDepart) InitDepart(); |
| 115 | NewState(); |
| 116 | m_state = new_state; |
| 117 | } |
| 118 | void CElevatorState::UpdateStNone() |
| 119 | { |
| 120 | VERIFY(m_ladder && m_character); |
nothing calls this directly
no test coverage detected