Article View: net.games.hack
Article #702minor bug fix for the look command
From: ab
Date: Fri, 24 May 1985 16:26
Date: Fri, 24 May 1985 16:26
79 lines
2999 bytes
2999 bytes
There is a minor bug in hack.pager.c: When you are blind and want to know
what is lying on the floor, you get the message:
"You try to feel what is lying here on the floor."
but if there is more than one item, the list of objects follows
immediately without a "--more--".
Here is the fix (add the starred lines):
--- hack.pager.c, line 220:
> /* --- now we really do it --- */
> if(mode == 2 && linect == 1) /* topline only */
> pline(texthead->line_text);
> else
> if(mode == 2) {
> register int curline, lth;
>
* if(flags.toplin == 1) more();
* remember_topl();
> lth = CO - maxlen - 2; /* Use full screen width */
> if (linect < LI && lth >= 10) { /* in a corner */
> home ();
> cl_end ();
> flags.toplin = 0;
> curline = 1;
---
Also if you are levitated and blind you shouldn't be able to
feel the things lying on the floor. The fix follows:
*** hack.invent.c.orig Mon Apr 15 15:11:48 1985
--- hack.invent.c Fri May 24 13:36:41 1985
***************
*** 625,630
char *verb = Blind ? "feel" : "see";
int ct = 0;
if(!u.uswallow) {
otmp0 = o_at(u.ux, u.uy);
gold = g_at(u.ux, u.uy);
--- 625,637 -----
char *verb = Blind ? "feel" : "see";
int ct = 0;
+ if(Blind) {
+ pline("You try to feel what is lying here on the floor.");
+ if(Levitation) {
+ pline("You cannot reach the floor!");
+ return(1);
+ }
+ }
if(!u.uswallow) {
otmp0 = o_at(u.ux, u.uy);
gold = g_at(u.ux, u.uy);
***************
*** 633,640
pline("You %s no objects here.", verb);
return(!!Blind);
}
-
- if(Blind) pline("You try to feel what is lying here on the floor.");
cornline(0, "Things that are here:");
for(otmp = otmp0; otmp; otmp = otmp->nobj) {
if(otmp->ox == u.ux && otmp->oy == u.uy) {
--- 640,645 -----
pline("You %s no objects here.", verb);
return(!!Blind);
}
cornline(0, "Things that are here:");
for(otmp = otmp0; otmp; otmp = otmp->nobj) {
if(otmp->ox == u.ux && otmp->oy == u.uy) {
--
Andreas Bormann ab@unido.UUCP
University of Dortmund N 51 29' 05" E 07 24' 42"
West Germany
Technical Details
Message-ID:
<nf38300011@unido.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!mcvax!unido!abShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesnews 0.1 (unido 12/05/84); site unido.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!mcvax!unido!ab From: ab@unido.UUCP Newsgroups: net.games.hack Subject: minor bug fix for the look command Message-ID: <nf38300011@unido.UUCP> Date: Fri, 24-May-85 12:26:00 EDT Article-I.D.: unido.nf38300011 Posted: Fri May 24 12:26:00 1985 Date-Received: Sat, 1-Jun-85 14:13:17 EDT Sender: notes@unido.UUCP Lines: 80 Nf-ID: #N:unido:38300011:000:2352 Nf-From: unido!ab May 24 14:26:00 1985