[net.games.hack] A few minor bug fixes and enhancements

aeb@mcvax.UUCP (Andries Brouwer) (05/10/85)

As hpscdi!jon remarked, two lines of code have been inadvertently
dropped from hack.dog.c, making it more difficult to train your dog.

Fix in hack.dog.c
145a146,148	(this was an old fix)
> 	/* maybe we tamed him while being swallowed --jgm */
> 	if(!udist) return(0);
> 
152a156,157
> 			edog->dropdist = udist;		/* hpscdi!jon */
> 			edog->droptime = moves;

He also remarked a typo in hack.tty.c. Another player with '@' as kill
character complained about not being able to genocide all @'s. Yes, what
a pity!

Fix in hack.tty.c:
122,127c201,203
< 		} else if(c == kill_char || c == '\177') { /* Robert Viduya */
< 			while(bufp != obufp) {
< 				bufp--;
< 				putstr("\b \b");
< 			}
< 		} else if(isprint(c)) {
---
> 		} else if(' ' <= c && c < '\177') {
> 				/* avoid isprint() - some people don't have it
> 				   ' ' is not always a printing char */
132a209,214
> 		} else if(c == kill_char || c == '\177') { /* Robert Viduya */
> 				/* this test last - @ might be the kill_char */
> 			while(bufp != obufp) {
> 				bufp--;
> 				putstr("\b \b");
> 			}
196c278
< 		multi += 10*multi+foo-'0';
---
> 		multi = 10*multi+foo-'0';

Finally, there was a typo in the routine lookaround() in hack.c that
would cause you to walk into known traps with commands like "fh" or '^H'.
Also, people want to continue eating/digging/counting_their_money even
when a sleeping Leprechaun is nearby. Well, now they can.

Fix in hack.c:
519c515		(in lookaround())
< 			if(x == u.ux+u.dx && y == u.uy+u.dx) goto stop;
---
> 			if(x == u.ux+u.dx && y == u.uy+u.dy) goto stop;
571a568		(in monster_nearby())
> 			!mtmp->mfroz && !mtmp->msleep &&  /* aplvax!jcn */