Article View: net.games.hack
Article #1027Missing dog bug in HACK 1.02, 1.03
From: Don Kneller%Langridge
Date: Sun, 08 Sep 1985 00:52
Date: Sun, 08 Sep 1985 00:52
45 lines
2058 bytes
2058 bytes
Did you ever have a game where it seems like you didn't start with a
dog? There is a bug in hack.main.c which results in the dog not being
created if mklev() created a monster on the level 1 stairway (which is
also where you are standing when you start a game). A subsequent call
to makedog() fails because it calls makemon() to create a dog on the
same spot the monster is already on. Makemon() returns 0 and makedog()
interprets the 0 to mean dogs have been genocided.
Anyway, the context diff follows.
*** hack.main.old Sat Sep 7 16:09:00 1985
--- hack.main.c Sat Sep 7 17:06:29 1985
***************
*** 261,268 ****
--- 261,278 ----
---------------
u.uy = yupstair;
(void) inshop();
setsee();
flags.botlx = 1;
+> {
+> register struct monst *mtmp;
+>
+> /* Move the monster from under you or else
+> * makedog() will fail when it calls makemon().
+> * - ucsfcgl!kneller
+> */
+> if (mtmp = m_at(u.ux, u.uy))
+> mnexto(mtmp);
+> }
makedog();
{ register struct monst *mtmp;
if(mtmp = m_at(u.ux, u.uy)) mnexto(mtmp); /* riv05!a3 */
}
By the way, the code following the line
makedog();
now does nothing since the dog is created beside you.
Since it is the same code as I have put in above makedog()
to fix this bug, perhaps makedog() was accidentally moved in
the author's sources.
Don Kneller
UUCP: ...ucbvax!ucsfcgl!kneller
ARPA: ucsfcgl!kneller@Berkeley.ARPA
Technical Details
Message-ID:
<630@ucsfcgl.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!ucbvax!ucsfcgl!knellerShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucsfcgl.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!ucbvax!ucsfcgl!kneller From: kneller@ucsfcgl.UUCP (Don Kneller%Langridge) Newsgroups: net.games.hack,net.sources.games Subject: Missing dog bug in HACK 1.02, 1.03 Message-ID: <630@ucsfcgl.UUCP> Date: Sat, 7-Sep-85 20:52:36 EDT Article-I.D.: ucsfcgl.630 Posted: Sat Sep 7 20:52:36 1985 Date-Received: Mon, 9-Sep-85 02:47:30 EDT Reply-To: kneller@ucsfcgl.UUCP () Organization: UCSF Computer Graphics Lab Lines: 45