diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 863bd0798..8f01b89a3 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -463,6 +463,7 @@ when poly'd into a giant and moving onto a boulder's spot, you could get "you improve #adjust command's handling of the '$' and '#' inventory slots prevent #adjust from allowing anything to be moved into the special '-' slot sometimes rings dropped into sinks can be found in the pipes +doors in special levels were always generated in vertical orientation Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/include/rm.h b/include/rm.h index 18b33050b..9a0ce5343 100644 --- a/include/rm.h +++ b/include/rm.h @@ -85,7 +85,8 @@ enum levl_typ_types { #define IS_STWALL(typ) ((typ) <= DBWALL) /* STONE <= (typ) <= DBWALL */ #define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */ #define IS_DOOR(typ) ((typ) == DOOR) -#define IS_TREE(typ) \ +#define IS_DOORJOIN(typ) (IS_ROCK(typ) || (typ) == IRONBARS) +#define IS_TREE(typ) \ ((typ) == TREE || (level.flags.arboreal && (typ) == STONE)) #define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */ #define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM, STAIRS, furniture.. */ diff --git a/src/sp_lev.c b/src/sp_lev.c index badbab319..fc1dcf9e1 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -4191,6 +4191,13 @@ genericptr_t arg; if (typ < D_CLOSED) typ = D_CLOSED; } + + if (((isok(x-1,y) && IS_DOORJOIN(levl[x-1][y].typ)) || !isok(x-1,y)) + || (isok(x+1,y) && IS_DOORJOIN(levl[x+1][y].typ)) || !isok(x+1,y)) + levl[x][y].horizontal = 1; + else + levl[x][y].horizontal = 0; + levl[x][y].doormask = typ; SpLev_Map[x][y] = 1; }