MCPcopy Create free account
hub / github.com/EasyRPG/Player / UpdateNextMovementAction

Method UpdateNextMovementAction

src/game_player.cpp:267–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void Game_Player::UpdateNextMovementAction() {
268 if (UpdateAirship()) {
269 return;
270 }
271
272 UpdateMoveRoute(data()->move_route_index, data()->move_route, true);
273
274 if (Game_Map::GetInterpreter().IsRunning()) {
275 SetMenuCalling(false);
276 return;
277 }
278
279 if(IsPaused() || IsMoveRouteOverwritten() || Game_Message::IsMessageActive()) {
280 return;
281 }
282
283 if (IsEncounterCalling()) {
284 SetMenuCalling(false);
285 SetEncounterCalling(false);
286
287 BattleArgs args;
288 if (Game_Map::PrepareEncounter(args)) {
289 Scene::instance->SetRequestedScene(Scene_Battle::Create(std::move(args)));
290 return;
291 }
292 }
293
294 if (IsMenuCalling()) {
295 SetMenuCalling(false);
296
297 ResetAnimation();
298 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision));
299 Game_Map::GetInterpreter().RequestMainMenuScene();
300 return;
301 }
302
303 CheckEventTriggerHere({ lcf::rpg::EventPage::Trigger_collision }, false);
304
305 if (Game_Map::IsAnyEventStarting()) {
306 return;
307 }
308
309 int move_dir = -1;
310 switch (Input::dir4) {
311 case 2:
312 move_dir = Down;
313 break;
314 case 4:
315 move_dir = Left;
316 break;
317 case 6:
318 move_dir = Right;
319 break;
320 case 8:
321 move_dir = Up;
322 break;
323 }
324 if (move_dir >= 0) {

Callers

nothing calls this directly

Calls 7

IsRunningMethod · 0.80
SetRequestedSceneMethod · 0.80
SePlayMethod · 0.80
RequestMainMenuSceneMethod · 0.80
IncStepsMethod · 0.80
ApplyStateDamageMethod · 0.80
FlashMapStepDamageMethod · 0.80

Tested by

no test coverage detected