X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame.c;fp=src%2Fgame.c;h=756bd63d2db921c21af53ad662247ea28376f3e0;hp=aa7d824db483a850f1f49d0a34dc058289e8ff60;hb=6da339c01258cd7edee0c181260578a1795bf8ed;hpb=e89a21e95b3cb84d1515c0fb3378ce902a48c1c8 diff --git a/src/game.c b/src/game.c index aa7d824d..756bd63d 100644 --- a/src/game.c +++ b/src/game.c @@ -7680,25 +7680,19 @@ static void TurnRoundExt(int x, int y) } else if (move_pattern & MV_MAZE_RUNNER_STYLE) { - static int test_xy[7][2] = + static int test_xy[4][2] = { { 0, -1 }, { -1, 0 }, { +1, 0 }, - { 0, +1 }, - { 0, -1 }, - { -1, 0 }, - { +1, 0 }, + { 0, +1 } }; - static int test_dir[7] = + static int test_dir[4] = { MV_UP, MV_LEFT, MV_RIGHT, - MV_DOWN, - MV_UP, - MV_LEFT, - MV_RIGHT, + MV_DOWN }; boolean hunter_mode = (move_pattern == MV_MAZE_HUNTER); int move_preference = -1000000; // start with very low preference @@ -7708,11 +7702,12 @@ static void TurnRoundExt(int x, int y) for (i = 0; i < NUM_DIRECTIONS; i++) { - int move_dir = test_dir[start_test + i]; + int j = (start_test + i) % 4; + int move_dir = test_dir[j]; int move_dir_preference; - xx = x + test_xy[start_test + i][0]; - yy = y + test_xy[start_test + i][1]; + xx = x + test_xy[j][0]; + yy = y + test_xy[j][1]; if (hunter_mode && IN_LEV_FIELD(xx, yy) && (IS_PLAYER(xx, yy) || Tile[xx][yy] == EL_PLAYER_IS_LEAVING))