Skip to content

Commit

Permalink
Revert an unintended change
Browse files Browse the repository at this point in the history
  • Loading branch information
Keriew committed Jan 31, 2024
1 parent 65c27db commit 5e864ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/figure/movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ void figure_movement_init_roaming(figure *f)
if (b->figure_roam_direction > 6) {
b->figure_roam_direction = 0;
}
int x = b->road_access_x;
int y = b->road_access_y;
int x = b->x;
int y = b->y;
switch (roam_dir) {
case DIR_0_TOP: y -= 8; break;
case DIR_2_RIGHT: x += 8; break;
Expand Down
2 changes: 1 addition & 1 deletion src/figure/roamer_preview.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void figure_roamer_preview_create(building_type b_type, int x, int y)
if (map_grid_is_valid_offset(roamer.grid_offset)) {
data.travelled_tiles.items[roamer.grid_offset] = FIGURE_ROAMER_PREVIEW_EXIT_TILE;
}
init_roaming(&roamer, i * 2, road.x, road.y);
init_roaming(&roamer, i * 2, x, y);
while (++roamer.roam_length < roamer.max_roam_length) {
if (roamer.progress_on_tile == 0 && data.travelled_tiles.items[roamer.grid_offset] < FIGURE_ROAMER_PREVIEW_MAX_PASSAGES) {
data.travelled_tiles.items[roamer.grid_offset]++;
Expand Down

0 comments on commit 5e864ed

Please sign in to comment.