]> granicus.if.org Git - nethack/commitdiff
sitting in lava and other utraptype sit messages
authorcohrs <cohrs>
Thu, 22 May 2003 01:43:21 +0000 (01:43 +0000)
committercohrs <cohrs>
Thu, 22 May 2003 01:43:21 +0000 (01:43 +0000)
Several cases in the trap block of code in dosit() were caused by utraptype
being set to values not corresponding to an actual trap.  <Someone>
reported back in 12/02 that the "sitting in lava" killer message could not
occur, but the special-case sit messages for TT_INFLOOR and TT_BURIEDBALL
couldn't occur either.

doc/fixes34.2
src/sit.c

index fb1e794320349221bd0acd6a71c7a0be588c0b62..351f8e11dea74c0efd488b3de52f555ef7cbe8ca 100644 (file)
@@ -74,6 +74,7 @@ add more calls to update_inventory as the inventory changes
 don't charge for items picked up from monster's interior while swallowed
 choking while eating non-food always called the food "quick snack"
 short swords are not throwing weapons
+several sit-in-trap cases were unreachable
 
 
 Platform- and/or Interface-Specific Fixes
index 0770340c1d7c8969418117a7db1b16fd525661d2..deb1c110c8c6738e566a08d29e33e9f67f87440a 100644 (file)
--- a/src/sit.c
+++ b/src/sit.c
@@ -68,7 +68,8 @@ dosit()
            if (!(Is_box(obj) || objects[obj->otyp].oc_material == CLOTH))
                pline("It's not very comfortable...");
 
-       } else if ((trap = t_at(u.ux, u.uy)) != 0) {
+       } else if ((trap = t_at(u.ux, u.uy)) != 0 ||
+                  (u.utrap && (u.utraptype >= TT_LAVA))) {
 
            if (u.utrap) {
                exercise(A_WIS, FALSE); /* you're getting stuck longer */