| 839 | } // namespace oob_state |
| 840 | |
| 841 | U8 oob_state::update(xScene& scene, F32 dt) |
| 842 | { |
| 843 | if ((shared.flags & 0x3) != 0x3) |
| 844 | { |
| 845 | return FALSE; |
| 846 | } |
| 847 | |
| 848 | if (zSaveLoadGetPreAutoSave()) |
| 849 | { |
| 850 | return FALSE; |
| 851 | } |
| 852 | |
| 853 | if (oob_player_teleported) |
| 854 | { |
| 855 | shared.flags &= ~0x8; |
| 856 | } |
| 857 | |
| 858 | if ((shared.flags & 0x8) && !(globals.player.ControlOff & 0x8000)) |
| 859 | { |
| 860 | force_start(); |
| 861 | } |
| 862 | |
| 863 | while (true) |
| 864 | { |
| 865 | state_enum newtype = shared.state->update(scene, dt); |
| 866 | if (newtype == shared.state->type) |
| 867 | { |
| 868 | break; |
| 869 | } |
| 870 | |
| 871 | shared.state->stop(); |
| 872 | shared.state = shared.states[newtype]; |
| 873 | shared.state->start(); |
| 874 | } |
| 875 | |
| 876 | |
| 877 | return shared.control; |
| 878 | } |
| 879 | |
| 880 | bool oob_state::IsPlayerInControl() |
| 881 | { |
nothing calls this directly
no test coverage detected