static boolean e_missed(struct entity *, boolean);
static boolean e_jumps(struct entity *);
static void do_entity(struct entity *);
+static void nokiller(void);
boolean
is_waterwall(coordxy x, coordxy y)
etmp->edata = &mons[PM_LONG_WORM_TAIL];
else
etmp->edata = mtmp->data;
- } else
+ } else {
etmp->edata = (struct permonst *) 0;
+ etmp->ex = etmp->ey = 0;
+ }
}
static void
}
static void
-set_entity(coordxy x, coordxy y, struct entity *etmp)
+set_entity(
+ coordxy x, coordxy y, /* location of span or portcullis */
+ struct entity *etmp) /* pointer to occupants[0] or occupants[1] */
{
- struct monst *mtmp;
-
if (u_at(x, y))
u_to_e(etmp);
- else if ((mtmp = m_at(x, y)) != 0 && !DEADMONSTER(mtmp))
- m_to_e(mtmp, x, y, etmp);
- else
- etmp->edata = (struct permonst *) 0;
+ else /* m_at() might yield Null; that's ok */
+ m_to_e(m_at(x, y), x, y, etmp);
}
#define is_u(etmp) (etmp->emon == &gy.youmonst)
}
}
-/* clear stale reason for death before returning */
-#define nokiller() (gk.killer.name[0] = '\0', gk.killer.format = 0)
+/* clear stale reason for death and both 'entities' before returning */
+static void
+nokiller(void)
+{
+ gk.killer.name[0] = '\0';
+ gk.killer.format = 0;
+ m_to_e((struct monst *) 0, 0, 0, &go.occupants[0]);
+ m_to_e((struct monst *) 0, 0, 0, &go.occupants[1]);
+}
/*
* Close the drawbridge located at x,y
struct obj *otmp2;
boolean lava = (lev1->drawbridgemask & DB_UNDER) == DB_LAVA;
- if (!Deaf)
- Soundeffect(se_loud_splash, 100);
+ Soundeffect(se_loud_splash, 100); /* Deaf-aware */
if (lev1->typ == DRAWBRIDGE_UP) {
if (cansee(x2, y2) || u_at(x2, y2))
pline_The("portcullis of the drawbridge falls into the %s!",
}
} else {
/* no moat beneath */
- if (!Deaf)
- Soundeffect(se_lound_crash, 100);
+ Soundeffect(se_lound_crash, 100); /* Deaf-aware */
if (cansee(x, y) || u_at(x, y))
pline_The("drawbridge disintegrates!");
else