Fix ceiling hiders on pools
While fuzzing, I saw a sanity checking error complaining about a ceiling hider being on top of a pool; the rock piercer was teleported on top of the pool while it was hiding in the ceiling. Try to be a bit more consistent when a monster is hiding in ceiling, and if it's valid for it to be on a pool.
This commit is contained in:
@@ -133,7 +133,7 @@ goodpos(
|
||||
return (is_swimmer(mdat)
|
||||
|| (!Is_waterlevel(&u.uz)
|
||||
&& !is_waterwall(x, y)
|
||||
&& !grounded(mdat)));
|
||||
&& m_in_air(mtmp)));
|
||||
} else if (mdat->mlet == S_EEL && rn2(13) && !ignorewater) {
|
||||
return FALSE;
|
||||
} else if (is_lava(x, y) && !ignorelava) {
|
||||
@@ -147,8 +147,7 @@ goodpos(
|
||||
&& uarmf->oerodeproof)
|
||||
|| (Upolyd && likes_lava(gy.youmonst.data)));
|
||||
else
|
||||
return (is_floater(mdat) || is_flyer(mdat)
|
||||
|| likes_lava(mdat));
|
||||
return (m_in_air(mtmp) || likes_lava(mdat));
|
||||
}
|
||||
if (passes_walls(mdat) && may_passwall(x, y))
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user