Use is_hole macro to check for trapdoors and holes

This commit is contained in:
Pasi Kallinen
2018-09-15 17:57:57 +03:00
parent adf070eb04
commit e031800880
14 changed files with 23 additions and 34 deletions
+1 -2
View File
@@ -3373,8 +3373,7 @@ struct obj **pobj; /* object tossed/used, set to NULL
The(distant_name(obj, xname))); /* lame */
range = 0;
} else if (Sokoban && (t = t_at(x, y)) != 0
&& (is_pit(t->ttyp)
|| t->ttyp == HOLE || t->ttyp == TRAPDOOR)) {
&& (is_pit(t->ttyp) || is_hole(t->ttyp))) {
/* hero falls into the trap, so ball stops */
range = 0;
}