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:
@@ -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
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user