fix github issue #164 - lack of steed-in-pit mesg

Fixes #164

No message was shown when riding a steed into a pit or spiked pit.
Setup for the message was done, but post-3.4.3 insertion of else-if
into the previous if/else/endif cut off its delivery.
This commit is contained in:
PatR
2018-11-29 10:24:50 -08:00
parent c318841363
commit 4ab1c12f03
2 changed files with 5 additions and 2 deletions

View File

@@ -228,6 +228,7 @@ for configurations with 'long int' larger than 'int', lev_comp wrote some
stinking cloud placed near water could kill underwater creatures
applying--rather than wielding--a cursed polearm or weapon-tool didn't report
that it had become welded to hero's hand(s)
the message when riding a steed into a pit was composed but not shown
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1543100476 2018/11/24 23:01:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ */
/* NetHack 3.6 trap.c $NHDT-Date: 1543515862 2018/11/29 18:24:22 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.312 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1185,6 +1185,7 @@ unsigned trflags;
if (!Sokoban) {
char verbbuf[BUFSZ];
*verbbuf = '\0';
if (u.usteed) {
if ((trflags & RECURSIVETRAP) != 0)
Sprintf(verbbuf, "and %s fall",
@@ -1202,8 +1203,9 @@ unsigned trflags;
} else {
Strcpy(verbbuf,
!plunged ? "fall" : (Flying ? "dive" : "plunge"));
You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
}
if (*verbbuf)
You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
}
/* wumpus reference */
if (Role_if(PM_RANGER) && !trap->madeby_u && !trap->once