missing altar drop messages

Most callers of dropx did not check for altars, but should have.  Rather
than add such checks, I moved the check from drop to dropx.  I also found
several callers of dropx that could generate out-of-order messages for some
cases (not new) and fixed them. FYI - callers of dropy don't seem to want
altar checks or already do them.
This commit is contained in:
cohrs
2002-12-17 03:36:42 +00:00
parent 137bd330e4
commit bcf47b7663
4 changed files with 11 additions and 8 deletions

View File

@@ -492,10 +492,8 @@ register struct obj *obj;
hitfloor(obj);
return(1);
}
if (IS_ALTAR(levl[u.ux][u.uy].typ)) {
doaltarobj(obj); /* set bknown */
} else
if(flags.verbose) You("drop %s.", doname(obj));
if (!IS_ALTAR(levl[u.ux][u.uy].typ) && flags.verbose)
You("drop %s.", doname(obj));
}
dropx(obj);
return(1);
@@ -514,7 +512,11 @@ register struct obj *obj;
if (obj->oclass == COIN_CLASS) flags.botl = 1;
freeinv(obj);
#endif
if (!u.uswallow && ship_object(obj, u.ux, u.uy, FALSE)) return;
if (!u.uswallow) {
if (ship_object(obj, u.ux, u.uy, FALSE)) return;
if (IS_ALTAR(levl[u.ux][u.uy].typ))
doaltarobj(obj); /* set bknown */
}
dropy(obj);
}