autodig '>'
This fixes moving in direction '>' while wielding a pick-axe with the 'autodig' option On. Attempting to dig assumed size-to-side activity because u.dz wasn't being set, so the pick-axe was swung at thin air instead making a pit or turning an existing pit into a hole. dodown() and doup() should probably call set_move_cmd() instead of manipulating u.dz directly. But they would also need to suppress g.move_attempting or the game says "you can't get there from here..." after successfully digging or plunging into a pit.
This commit is contained in:
1
src/do.c
1
src/do.c
@@ -1070,6 +1070,7 @@ dodown(void)
|
||||
} else if (!trap || !is_hole(trap->ttyp)
|
||||
|| !Can_fall_thru(&u.uz) || !trap->tseen) {
|
||||
if (flags.autodig && !g.context.nopick && uwep && is_pick(uwep)) {
|
||||
u.dz = 1; /* the #down command doesn't call set_move_cmd() */
|
||||
return use_pick_axe2(uwep);
|
||||
} else {
|
||||
You_cant("go down here.");
|
||||
|
||||
Reference in New Issue
Block a user