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

Method Update

src/game_player.cpp:364–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364void 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
403bool Game_Player::CheckActionEvent() {
404 if (IsFlying()) {

Callers

nothing calls this directly

Calls 5

GetMoveSpeedMethod · 0.80
SyncWithRiderMethod · 0.80
GetAllowMenuMethod · 0.80
IsRunningMethod · 0.80
UpdateFunction · 0.70

Tested by

no test coverage detected