Re-added the classic-mode-edge-behavior in a better way.

This way preserves checks for Classic difficulty within (where
auto-camera-centering is implemented) so that if the edge behavior
ever changes again, it won't have unintended side-effects.  The
conditional is also inverted to make it easier to read.
This commit is contained in:
Julie Marchant 2019-05-29 21:08:54 -04:00
parent 628ed07c8b
commit d8331ac14e
1 changed files with 6 additions and 8 deletions

View File

@ -1435,9 +1435,12 @@ static void game_doPlayer()
if (engine.done == 0) if (engine.done == 0)
{ {
if ((game.difficulty != DIFFICULTY_ORIGINAL) || if (game.difficulty == DIFFICULTY_ORIGINAL)
((game.area != MISN_ELLESH) && {
(game.area != MISN_MARS))) LIMIT(player.x, X_VIEW_BORDER, screen->w - X_VIEW_BORDER);
LIMIT(player.y, Y_VIEW_BORDER, screen->h - Y_VIEW_BORDER);
}
else
{ {
if (xmoved) if (xmoved)
{ {
@ -1499,11 +1502,6 @@ static void game_doPlayer()
} }
} }
} }
else
{
LIMIT(player.x, X_VIEW_BORDER, screen->w - X_VIEW_BORDER);
LIMIT(player.y, Y_VIEW_BORDER, screen->h - Y_VIEW_BORDER);
}
} }
if ((player.maxShield <= 1) || (player.shield > engine.lowShield)) if ((player.maxShield <= 1) || (player.shield > engine.lowShield))