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:
Pasi Kallinen
2017-10-26 21:56:43 +03:00
parent 0bdbfaa580
commit bf0223fd9f
3 changed files with 10 additions and 1 deletions

View File

@@ -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;
}