From 57c3fa60b7857508ee21cba0ef844f6a299d2cb5 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 12 Feb 2006 01:45:54 +0000 Subject: [PATCH] C343-3 creation of the Ranger quest start level 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 | 1 + src/sp_lev.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index d198e3585..8e11c3792 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/sp_lev.c b/src/sp_lev.c index 6b5898f96..b9add6cac 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -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; -- 2.40.0