Add 'mdistu' macro
Short for distu(mtmp->mx, mtmp->my) (i.e. the distance between the hero and the specified monster), which is a very common use of distu(). The idea is that this would be a convenient shorthand for it; I actually thought it (or something very similar) existed already, but couldn't find it when I tried to use it earlier. Based on the number of uses of fully-spelled-out 'distu(mtmp->mx, mtmp->my)' replaced in this commit I'm guessing I just imagined it.
This commit is contained in:
@@ -826,7 +826,7 @@ spitmm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
struct obj *otmp;
|
||||
|
||||
if (mtmp->mcan) {
|
||||
if (!Deaf && distu(mtmp->mx, mtmp->my) < BOLT_LIM * BOLT_LIM) {
|
||||
if (!Deaf && mdistu(mtmp) < BOLT_LIM * BOLT_LIM) {
|
||||
if (canspotmon(mtmp)) {
|
||||
pline("A dry rattle comes from %s throat.",
|
||||
s_suffix(mon_nam(mtmp)));
|
||||
|
||||
Reference in New Issue
Block a user