use Is_box

While inspecting some code, I noticed that detect.c wasn't using Is_box in
some places it should have been.
This commit is contained in:
cohrs
2003-05-25 02:35:16 +00:00
parent 9a39064b8f
commit dce0e0cb33
2 changed files with 3 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ prayer/unicorn-horn won't fix blindness while still engulfed in a dust
being confused and reading cursed scroll of charging drains your energy
class genocide recognizes species name as an example of the class to
genocide (Martin Snyder)
internals: use Is_box rather than explicitly checking what it checks
Platform- and/or Interface-Specific Fixes

View File

@@ -672,7 +672,7 @@ register struct obj *sobj;
else found = TRUE;
}
for (obj = fobj; obj; obj = obj->nobj) {
if ((obj->otyp==LARGE_BOX || obj->otyp==CHEST) && obj->otrapped) {
if (Is_box(obj) && obj->otrapped) {
if (obj->ox != u.ux || obj->oy != u.uy)
goto outtrapmap;
else found = TRUE;
@@ -703,7 +703,7 @@ outtrapmap:
sense_trap(ttmp, 0, 0, sobj && sobj->cursed);
for (obj = fobj; obj; obj = obj->nobj)
if ((obj->otyp==LARGE_BOX || obj->otyp==CHEST) && obj->otrapped)
if (Is_box(obj) && obj->otrapped)
sense_trap((struct trap *)0, obj->ox, obj->oy, sobj && sobj->cursed);
for (door = 0; door < doorindex; door++) {