sitting in lava and other utraptype sit messages

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.
This commit is contained in:
cohrs
2003-05-22 01:43:21 +00:00
parent ac3746d055
commit 82cef26512
2 changed files with 3 additions and 1 deletions

View File

@@ -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 */