Skip to content

Commit

Permalink
Only change the sprite direction for fixed event graphics, not the mo…
Browse files Browse the repository at this point in the history
…vement direction when the event page changes.

Otherwise this causes glitchy movement when an event page switches to an event with a fixed event graphic while a move is being executed.

Fix EasyRPG#1413
  • Loading branch information
Ghabry committed Sep 23, 2018
1 parent c0bcf7b commit dbc6867
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/game_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,13 @@ void Game_Event::Setup(const RPG::EventPage* new_page) {
bool same_direction_as_on_old_page = old_page && old_page->character_direction == new_page->character_direction;
animation_type = page->animation_type;

if (from_null || !(same_direction_as_on_old_page || IsMoving()) || IsDirectionFixed()) {
SetSpriteDirection(page->character_direction);
if (from_null || !(same_direction_as_on_old_page || IsMoving())) {
SetDirection(page->character_direction);
SetSpriteDirection(page->character_direction);
}

if (IsDirectionFixed()) {
SetSpriteDirection(page->character_direction);
}

SetOpacity(page->translucent ? 160 : 255);
Expand Down

0 comments on commit dbc6867

Please sign in to comment.