Hit and wake sleeping monster makes it growl
Unless you kill the monster with one hit, it'll wake up cranky and make noise - waking up other sleeping monsters. This was a bit tricky with all the message sequencing; I tested all the hit/throw/fire/zap combos I could think of, and it took a while to get things looking right.
This commit is contained in:
11
src/mon.c
11
src/mon.c
@@ -3789,6 +3789,8 @@ wake_msg(struct monst *mtmp, boolean interesting)
|
||||
void
|
||||
wakeup(struct monst* mtmp, boolean via_attack)
|
||||
{
|
||||
boolean was_sleeping = mtmp->msleeping;
|
||||
|
||||
wake_msg(mtmp, via_attack);
|
||||
mtmp->msleeping = 0;
|
||||
if (M_AP_TYPE(mtmp) != M_AP_NOTHING) {
|
||||
@@ -3802,8 +3804,15 @@ wakeup(struct monst* mtmp, boolean via_attack)
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
}
|
||||
finish_meating(mtmp);
|
||||
if (via_attack)
|
||||
if (via_attack) {
|
||||
if (was_sleeping)
|
||||
growl(mtmp);
|
||||
setmangry(mtmp, TRUE);
|
||||
if (mtmp->ispriest && *in_rooms(mtmp->mx, mtmp->my, TEMPLE))
|
||||
ghod_hitsu(mtmp);
|
||||
if (mtmp->isshk && !*u.ushops)
|
||||
hot_pursuit(mtmp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wake up nearby monsters without angering them. */
|
||||
|
||||
Reference in New Issue
Block a user