Pet titan killed itself with a boulder

A pet titan dropped a boulder over a pool, and the code killed
the titan, because the code was considering the titan to be in
the water.

If a flyer or a floater is over the pool, don't kill them off
if a boulder is dropped in there.  Also make the pet movement
code handle the case where the pet might've died while dropping
items.
This commit is contained in:
Pasi Kallinen
2024-05-28 17:56:47 +03:00
parent 6b750cb551
commit 5fe872bf98
2 changed files with 4 additions and 3 deletions

View File

@@ -1010,8 +1010,8 @@ dog_move(
if (edog) {
j = dog_invent(mtmp, edog, udist);
if (j == 2)
return MMOVE_DIED; /* died */
if (j == 2 || mon_offmap(mtmp))
return DEADMONSTER(mtmp) ? MMOVE_DIED : MMOVE_DONE;
else if (j == 1)
goto newdogpos; /* eating something */