Fix punishment iron ball yanking hero on top of a monster

When attached iron ball was in a pit (or a pool) with a monster,
and your levitation ended, you were put on top of the monster.

Add a sanity check for hero over monster.
This commit is contained in:
Pasi Kallinen
2023-02-03 08:23:31 +02:00
parent cae29f1dfd
commit 0722a5c2dd
3 changed files with 10 additions and 1 deletions

View File

@@ -3560,7 +3560,7 @@ float_down(
return 1;
}
if (Punished && !carried(uball)
if (Punished && !carried(uball) && !m_at(uball->ox, uball->oy)
&& (is_pool(uball->ox, uball->oy)
|| ((trap = t_at(uball->ox, uball->oy))
&& (is_pit(trap->ttyp) || is_hole(trap->ttyp))))) {