]> granicus.if.org Git - nethack/commitdiff
final attributes say riding when you die while dismounting
authorcohrs <cohrs>
Sun, 30 Jun 2002 07:11:26 +0000 (07:11 +0000)
committercohrs <cohrs>
Sun, 30 Jun 2002 07:11:26 +0000 (07:11 +0000)
Reported to the mailing list on 5/23.  To fix this, u.usteed cannot simply
be unset earlier, so I put a check for this special case into enlightenment().

doc/fixes34.1
src/cmd.c

index 58cf0222a2be3667e7396955a09a207ec6952738..14fa5185f78a7b0e88945b266593a8f90f7fbd8d 100644 (file)
@@ -129,6 +129,7 @@ don't call DEBUG impossible in rn2 when a level 0 monster tries to cast a spell
 GOLDOBJ: don't call money2mon with 0 zero when killed by shopkeeper
 headstone writing was using the adjective "weird" when engraving with a wand 
        of digging.
+don't report "you were riding" if you die as a result of dismounting
 
 
 Platform- and/or Interface-Specific Fixes
index d303a04da7a37024599e3e2d38be8bb7a72e60ff..65984ea3327aa6148b06a48a9521248956b4db5d 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -916,7 +916,10 @@ int final; /* 0 => still in progress; 1 => over, survived; 2 => dead */
        else if (Amphibious) you_can("breathe water");
        if (Passes_walls) you_can("walk through walls");
 #ifdef STEED
-       if (u.usteed) {
+       /* If you die while dismounting, u.usteed is still set.  Since several
+        * places in the done() sequence depend on u.usteed, just detect this
+        * special case. */
+       if (u.usteed && (final < 2 || strcmp(killer, "riding accident"))) {
            Sprintf(buf, "riding %s", y_monnam(u.usteed));
            you_are(buf);
        }