| 398 | } |
| 399 | |
| 400 | void Game_Event::UpdateNextMovementAction() { |
| 401 | if (!page) { |
| 402 | return; |
| 403 | } |
| 404 | |
| 405 | UpdateMoveRoute(data()->move_route_index, data()->move_route, true); |
| 406 | |
| 407 | CheckEventAutostart(); |
| 408 | |
| 409 | if (!IsStopping()) { |
| 410 | return; |
| 411 | } |
| 412 | |
| 413 | CheckEventCollision(); |
| 414 | |
| 415 | if (!page |
| 416 | || IsPaused() |
| 417 | || IsMoveRouteOverwritten() |
| 418 | || IsStopCountActive() |
| 419 | || (!Main_Data::game_system->GetMessageContinueEvents() && Game_Map::GetInterpreter().IsRunning())) |
| 420 | { |
| 421 | return; |
| 422 | } |
| 423 | |
| 424 | switch (page->move_type) { |
| 425 | case lcf::rpg::EventPage::MoveType_stationary: |
| 426 | break; |
| 427 | case lcf::rpg::EventPage::MoveType_random: |
| 428 | MoveTypeRandom(); |
| 429 | break; |
| 430 | case lcf::rpg::EventPage::MoveType_vertical: |
| 431 | MoveTypeCycleUpDown(); |
| 432 | break; |
| 433 | case lcf::rpg::EventPage::MoveType_horizontal: |
| 434 | MoveTypeCycleLeftRight(); |
| 435 | break; |
| 436 | case lcf::rpg::EventPage::MoveType_toward: |
| 437 | MoveTypeTowardsPlayer(); |
| 438 | break; |
| 439 | case lcf::rpg::EventPage::MoveType_away: |
| 440 | MoveTypeAwayFromPlayer(); |
| 441 | break; |
| 442 | case lcf::rpg::EventPage::MoveType_custom: |
| 443 | UpdateMoveRoute(data()->original_move_route_index, page->move_route, false); |
| 444 | break; |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | void Game_Event::SetMaxStopCountForRandom() { |
| 449 | auto st = GetMaxStopCountForStep(GetMoveFrequency()); |
no test coverage detected