From cfe60aed8d933a5c6d2b604a55c734e0d2915517 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 17 Apr 2023 18:47:01 +0300 Subject: [PATCH] Dismounting a trapped steed Riding a steed into a trap and dismounting also untrapped the steed. Try to keep the steed in the trap. --- src/steed.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/steed.c b/src/steed.c index 4235a5e8e..4947ddeac 100644 --- a/src/steed.c +++ b/src/steed.c @@ -634,6 +634,13 @@ dismount_steed( /* Release the steed and saddle */ u.usteed = 0; u.ugallop = 0L; + + if (u.utraptype == TT_BEARTRAP + || u.utraptype == TT_PIT + || u.utraptype == TT_WEB) { + mtmp->mtrapped = 1; + } + /* * rloc(), rloc_to(), and monkilled()->mondead()->m_detach() all * expect mtmp to be on the map or else have mtmp->mx be 0, but