Skip to content

Commit

Permalink
Fix: Gehennom maze rooms placed incorrectly
Browse files Browse the repository at this point in the history
For mazewalk to work properly, random rooms in maze levels must be
placed so that the walls are on even coordinates (so that they line up
with the walls of the maze).  check_room was adjusting the positioning
and size of the rooms without adhering to those rules, leading to rooms
that were offset from where they should be.

This could also cause doors to show up in weird places, because door
placement in maze_add_rooms used the original lx,ly,hx,hy from before
the room size/position change by check_room.

I think this issue is related to copperwater#56; the leftmost room in the
screenshot has an invalid y-coordinate; that may be the cause of, or at
least a contributing factor to, the problem with mazewalk.
  • Loading branch information
entrez committed Nov 8, 2021
1 parent a3271e6 commit 3cb2bd2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sp_lev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,8 @@ check_room(xchar* lowx, xchar* ddx, xchar* lowy, xchar* ddy, boolean vault)
return FALSE;
if (g.in_mk_themerooms)
return FALSE;
if (g.level.flags.is_maze_lev)
return FALSE;
if (x < *lowx)
*lowx = x + xlim + 1;
else
Expand Down

0 comments on commit 3cb2bd2

Please sign in to comment.