Avoid repeating the god ray
My recent change to hit and wake monsters caused a recursive ghod_hitsu -> wakeup -> dobuzz -> buzz -> ghod_hitsu loop. Don't call the ghod_hitsu again if the priest is already angry.
This commit is contained in:
12
src/mon.c
12
src/mon.c
@@ -3819,13 +3819,17 @@ wakeup(struct monst* mtmp, boolean via_attack)
|
||||
}
|
||||
finish_meating(mtmp);
|
||||
if (via_attack) {
|
||||
boolean was_peaceful = mtmp->mpeaceful;
|
||||
|
||||
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);
|
||||
if (was_peaceful) {
|
||||
if (mtmp->ispriest && *in_rooms(mtmp->mx, mtmp->my, TEMPLE))
|
||||
ghod_hitsu(mtmp);
|
||||
if (mtmp->isshk && !*u.ushops)
|
||||
hot_pursuit(mtmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user