[rec.games.hack] Another Nethack bug solved

maartenj@cs.vu.nl (Maarten Jan Huisjes) (10/21/87)

I found it , I found it !!!

Sometimes your dog or a monster is taking the same space as you or it standing
in solid rock or in a wall, etc. This bug can be fixed as follows:
(No context diffs because I don't have any original sources any more)

In the file makemon.c:
the last 5 lines of the function enexto(cc, xx,yy) are as follows:

! foofull:
- 	cc->x = foo[rn2(tfoo-foo)].x;
- 	cc->y = foo[rn2(tfoo-foo)].y;
! 	return(0);
! }

The bug is that for the x and the y a different random is taken instead of the
same.

change them into :

! foofull:
+	*cc = foo[rn2(tfoo-foo)];
! 	return(0);
! }

-- 

			Maarten Jan  Huisjes.  (maartenj@cs.vu.nl)
			{seismo|decvax|philabs}!mcvax!vu44!maartenj