Fix door orientation in des-files
Doors in des-files were always generated vertically. This wasn't visible unless you had separate symbols for closed vertical and horizontal doors, or used tiles.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.. */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user