🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Don Kneller%Langridge Sun, 08 Sep 1985 00:52
Missing dog bug in HACK 1.02, 1.03
#1027
Author: Don Kneller%Langridge
Date: Sun, 08 Sep 1985 00:52
45 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads