]> granicus.if.org Git - nethack/commitdiff
C343-3 creation of the Ranger quest start level
authorcohrs <cohrs>
Sun, 12 Feb 2006 01:45:54 +0000 (01:45 +0000)
committercohrs <cohrs>
Sun, 12 Feb 2006 01:45:54 +0000 (01:45 +0000)
Normal maze levels are initialized from x == 3 thru COLNO-1.  However,
levels that use the INIT_MAP spec go thru mkmap, which initializes the level
starting at x == 1.  This usually makes no difference, but does in the case
of levels that also use GEOMETRY:left.  This was the case with the Ranger
start level and caused the leftmost 2 locations to be room locations but
unreachable.  The Juiblex level actually had the same behavior, but this
was harmless because the MAP in that case was smaller.

Fix is to set the xstart=1 for levels with INIT_MAP and GEOMETRY:left.
The rest of sp_lev works just with this (when INIT_MAP was used, that is).

doc/fixes34.4
src/sp_lev.c

index d198e358597c47772730d2da414140c180369b42..8e11c37929b01eeed353bcf6861ba4acccf257dd 100644 (file)
@@ -190,6 +190,7 @@ Orion, Norn, Cyclops and Lord Surtur should be able to tear webs
 ensure monsters cannot teleport to or be created outside nonpassable bounds
        of special levels
 candles should not be fireproof
+monsters could end up off the left side of the Ranger quest start level
 
 
 Platform- and/or Interface-Specific Fixes
index 6b5898f9615d6dff97168df3b6ba755fd2472f27..b9add6cac59937dead3dfdf830a5701aa97f1851 100644 (file)
@@ -2155,7 +2155,8 @@ dlb *fd;
        Fread((genericptr_t) &ysize, 1, sizeof(ysize), fd);
                                        /* size in Y */
        switch((int) halign) {
-           case LEFT:      xstart = 3;                                 break;
+           /* mkmap always creates levels starting at x==1 */
+           case LEFT:      xstart = init_lev.init_present ? 1 : 3;     break;
            case H_LEFT:    xstart = 2+((x_maze_max-2-xsize)/4);        break;
            case CENTER:    xstart = 2+((x_maze_max-2-xsize)/2);        break;
            case H_RIGHT:   xstart = 2+((x_maze_max-2-xsize)*3/4);      break;