Article View: comp.sources.bugs
Article #850More nethack fixes
From: Paul Polderman
Date: Fri, 31 Jul 1987 14:29
Date: Fri, 31 Jul 1987 14:29
61 lines
2218 bytes
2218 bytes
Sender:
Below are fixes for two bugs in `nethack'.
bug #1)
When nethack asks you what kind of character
you want to be, you can also type 'q' and exit.
While exitting, nethack forgets to reset your terminal
to original state and to remove the lock-files.
bug #2)
In `pray.c', the author made a mistake and used boolean-OR (||)
instead of bitwise-OR (|).
---------------------
In `u_init.c' change:
203: if (index("qQ", exper)) exit(0);
into:
203: if (index("qQ", exper)) {
clearlocks();
settty((char *) 0);
exit(0);
}
---------------------
In `pray.c' change:
line 120: if (!(HTelepat & INTRINSIC)) {
-> HTelepat = Htelepat || INTRINSIC;
pline ("Telepathy,");
} else if (!(Fast & INTRINSIC)) {
-> Fast = Fast || INTRINSIC;
pline ("Speed,");
} else if (!(Stealth & INTRINSIC)) {
-> Stealth = Stealth || INTRINSIC;
pline ("Stealth,");
} else {
if (!(Protection & INTRINSIC)) {
-> Protection = Protection || INTRINSIC;
if (!u.ublessed) u.ublessed = rnd(3) + 1;
} else u.ublessed++;
pline ("our protection,");
}
into:
line 120: if (!(HTelepat & INTRINSIC)) {
-> HTelepat |= INTRINSIC;
pline ("Telepathy,");
} else if (!(Fast & INTRINSIC)) {
-> Fast |= INTRINSIC;
pline ("Speed,");
} else if (!(Stealth & INTRINSIC)) {
-> Stealth |= INTRINSIC;
pline ("Stealth,");
} else {
if (!(Protection & INTRINSIC)) {
-> Protection |= INTRINSIC;
if (!u.ublessed) u.ublessed = rnd(3) + 1;
} else u.ublessed++;
pline ("our protection,");
}
------------------
Paul Polderman (polder@cs.vu.nl)
Technical Details
Message-ID:
<1066@ark.cs.vu.nl>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!botter!ark!polderShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!botter!ark!polder From: polder@cs.vu.nl (Paul Polderman) Newsgroups: comp.sources.bugs Subject: More nethack fixes Message-ID: <1066@ark.cs.vu.nl> Date: Fri, 31-Jul-87 10:29:22 EDT Article-I.D.: ark.1066 Posted: Fri Jul 31 10:29:22 1987 Date-Received: Tue, 4-Aug-87 01:40:39 EDT Reply-To: polder@cs.vu.nl (Paul Polderman) Distribution: world Organization: VU Informatica, Amsterdam Lines: 58 Keywords: nethack bugs