From 986c8e7ff4208505e68d1752bb1a3019fcac5acf Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Mon, 4 Dec 2023 14:48:27 -0500 Subject: [PATCH] Check whether steed will slip on ice if mounted If riding over ice, check whether the steed, rather than the hero, is cold-resistant or floating to determine whether it should slip, since it is the monster which would actually be in contact with the ice. --- src/hack.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hack.c b/src/hack.c index 4b9bc0c6c..92914e172 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2142,12 +2142,13 @@ static void slippery_ice_fumbling(void) { boolean on_ice = !Levitation && is_ice(u.ux, u.uy); + struct monst *iceskater = u.usteed ? u.usteed : &gy.youmonst; if (on_ice) { if ((uarmf && objdescr_is(uarmf, "snow boots")) - || resists_cold(&gy.youmonst) || Flying - || is_floater(gy.youmonst.data) || is_clinger(gy.youmonst.data) - || is_whirly(gy.youmonst.data)) { + || resists_cold(iceskater) || Flying + || is_floater(iceskater->data) || is_clinger(iceskater->data) + || is_whirly(iceskater->data)) { on_ice = FALSE; } else if (!rn2(Cold_resistance ? 3 : 2)) { HFumbling |= FROMOUTSIDE;