| 362 | } |
| 363 | |
| 364 | void Game_Player::Update() { |
| 365 | Game_Character::Update(); |
| 366 | |
| 367 | if (IsStopping()) { |
| 368 | if (data()->boarding) { |
| 369 | // Boarding completed |
| 370 | data()->aboard = true; |
| 371 | data()->boarding = false; |
| 372 | // Note: RPG_RT ignores the lock_facing flag here! |
| 373 | SetFacing(Left); |
| 374 | |
| 375 | auto* vehicle = GetVehicle(); |
| 376 | SetMoveSpeed(vehicle->GetMoveSpeed()); |
| 377 | } |
| 378 | if (data()->unboarding) { |
| 379 | // Unboarding completed |
| 380 | data()->unboarding = false; |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | auto* vehicle = GetVehicle(); |
| 385 | |
| 386 | if (IsAboard() && vehicle) { |
| 387 | vehicle->SyncWithRider(this); |
| 388 | } |
| 389 | |
| 390 | UpdatePan(); |
| 391 | |
| 392 | // ESC-Menu calling |
| 393 | if (Main_Data::game_system->GetAllowMenu() |
| 394 | && !Game_Message::IsMessageActive() |
| 395 | && !Game_Map::GetInterpreter().IsRunning()) |
| 396 | { |
| 397 | if (Input::IsTriggered(Input::CANCEL)) { |
| 398 | SetMenuCalling(true); |
| 399 | } |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | bool Game_Player::CheckActionEvent() { |
| 404 | if (IsFlying()) { |
nothing calls this directly
no test coverage detected