myers@uwmacc.UUCP (Jeff Myers) (05/22/85)
When you've been punished with a ball and chain, there's a small bug which
appears when you do a , pickup command in the space where the chain is:
you are asked whether or not you want to pick it up. The fix involves
checking to see if the current object is the chain just a bit earlier.
The context diff follows, which includes some previous bug fixes to hack.c.
*** hack.c.old Sun May 12 14:23:52 1985
--- hack.c Wed May 22 03:47:57 1985
***************
*** 369,374
if(obj->ox == u.ux && obj->oy == u.uy) {
if(flags.run) nomul(0);
if(!all) {
char c;
--- 369,378 -----
if(obj->ox == u.ux && obj->oy == u.uy) {
if(flags.run) nomul(0);
+ /* do not pick up uchain */
+ if(Punished && obj == uchain)
+ continue;
+
if(!all) {
char c;
***************
*** 400,409
}
}
- /* do not pick up uchain */
- if(Punished && obj == uchain)
- continue;
-
wt = inv_weight() + obj->owt;
if(wt > 0) {
if(obj->quan > 1) {
--- 404,409 -----
}
}
wt = inv_weight() + obj->owt;
if(wt > 0) {
if(obj->quan > 1) {
***************
*** 516,522
break;
case '^':
if(flags.run == 1) goto corr; /* if you must */
! if(x == u.ux+u.dx && y == u.uy+u.dx) goto stop;
break;
default: /* e.g. objects or trap or stairs */
if(flags.run == 1) goto corr;
--- 516,522 -----
break;
case '^':
if(flags.run == 1) goto corr; /* if you must */
! if(x == u.ux+u.dx && y == u.uy+u.dy) goto stop;
break;
default: /* e.g. objects or trap or stairs */
if(flags.run == 1) goto corr;
***************
*** 569,574
if(x == u.ux && y == u.uy) continue;
if((mtmp = m_at(x,y)) && !mtmp->mimic && !mtmp->mtame &&
!mtmp->mpeaceful && !index("Ea", mtmp->data->mlet) &&
(!mtmp->minvis || See_invisible))
return(1);
}
--- 569,575 -----
if(x == u.ux && y == u.uy) continue;
if((mtmp = m_at(x,y)) && !mtmp->mimic && !mtmp->mtame &&
!mtmp->mpeaceful && !index("Ea", mtmp->data->mlet) &&
+ !mtmp->mfroz && !mtmp->msleep && /* aplvax!jcn */
(!mtmp->minvis || See_invisible))
return(1);
}