Skip to content

Commit

Permalink
Fix flickering in Yume2kki on map 3D Underworld (ID 1884).
Browse files Browse the repository at this point in the history
The map uses a MoveRoute with a jump and SetVehicleLocation for party movement in a tight loop which causes heavy flickering in our Player.

This fix does not appear to be completely correct as RPG_RT does not reset the jump flag here but the "damage" is reduced because SetVehicleLocation -1 cannot happen without patching the game.

Fix #3254

Co-Authored-By: Viet Dinh <[email protected]>
  • Loading branch information
Ghabry and Desdaemon committed Aug 28, 2024
1 parent a4b18ca commit a27661c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2329,6 +2329,14 @@ bool Game_Interpreter::CommandSetVehicleLocation(lcf::rpg::EventCommand const& c
vehicle->MoveTo(map_id, x, y);
}
Main_Data::game_player->MoveTo(map_id, x, y);
if (vehicle_id == 0) {
// This fixes a bug in Yume2kki on map 3D Underworld (ID 1884)
// The map uses a MoveRoute with a jump and SetVehicleLocation for party movement in a tight loop which
// causes heavy flickering in our Player.
// TODO: This fix does not appear to be completely correct as RPG_RT does not reset the jump flag here
// but the "damage" is reduced because SetVehicleLocation -1 cannot happen without patching the game.
Main_Data::game_player->SetJumping(false);
}
return true;
};

Expand Down

0 comments on commit a27661c

Please sign in to comment.