- Don't put staircases on top of water.

This commit is contained in:
Rob Pearce 2016-05-31 10:03:58 +10:00
parent e91fc82f99
commit 095ede84fb
1 changed files with 2 additions and 2 deletions

4
map.c
View File

@ -1480,11 +1480,11 @@ int cellmeetscondition(cell_t *c, enum CELLCONDITION cond, int arg, int value) {
vok = B_TRUE;
}
if (value == B_TRUE) {
if (vok && cellwalkable(NULL, c, NULL) && !hasenterableobject(c) && !hasobwithflag(c->obpile, F_DOOR) ) {
if (vok && cellwalkable(NULL, c, NULL) && !hasenterableobject(c) && !hasobwithflag(c->obpile, F_DOOR) && !hasobwithflag(c->obpile, F_DEEPWATER) ) {
ok = B_TRUE;
}
} else {
if (!vok || !cellwalkable(NULL, c, NULL) || hasenterableobject(c) || hasobwithflag(c->obpile, F_DOOR)) {
if (!vok || !cellwalkable(NULL, c, NULL) || hasenterableobject(c) || hasobwithflag(c->obpile, F_DOOR) || hasobwithflag(c->obpile, F_DEEPWATER)) {
ok = B_TRUE;
}
}