This might fix the following buglist entry
|Teleporting while using tiles may place you one tile beyond the edge of
|the display screen, and place the crosshair on empty space.
Various bits of code, including teleport, are assigning directly to
u.ux,u.uy instead of calling u_on_newpos(). It wouldn't be an issue for
small tiles where the whole map fits on the screen, but it probably is for
bigger ones where clipping is in operation. Using u_on_newpos() adjusts
the clipped map right away but changing u.ux,u.uy directly won't do so
until control returns to moveloop() and it eventually calls cliparound().
Usually the hero's position only changes by one column and/or row, hence
stays within the clipping margin, but that's not the case for teleport
nor for hurtling (throwing recoil while levitating, &c).
Perhaps all the places that assign u.ux,uy should call u_on_newpos()
instead? Most--all?--of them aren't updating u.usteed->mx,my, but I
guess that monster's coordinates don't matter since it isn't placed on
the map.
unix/Qt: saved games were not found if nethack was built with prefixes in use
FreeBSD: compilation problems on FreeBSD 6.1
linux: compile support for TIOCGWINSZ by default
+#if CLIPPING: during teleport or hurtle, re-clip the map immediately instead
+ of waiting until hero's next move
General New Features
ox = u.ux;
oy = u.uy;
- u.ux = x;
- u.uy = y;
+ u_on_newpos(x, y); /* set u.<ux,uy>, u.usteed-><mx,my>; cliparound(); */
newsym(ox, oy); /* update old position */
vision_recalc(1); /* update for new position */
flush_screen(1);
}
/* must set u.ux, u.uy after drag_ball(), which may need to know
the old position if allow_drag is true... */
- u.ux = nux;
- u.uy = nuy;
+ u_on_newpos(nux, nuy); /* set u.<x,y>, usteed-><mx,my>; cliparound() */
fill_pit(u.ux0, u.uy0);
if (ball_active) {
if (!ball_still_in_range && !allow_drag)
}
initrack(); /* teleports mess up tracking monsters without this */
update_player_regions();
-#ifdef STEED
- /* Move your steed, too */
- if (u.usteed) {
- u.usteed->mx = nux;
- u.usteed->my = nuy;
- }
-#endif
/*
* Make sure the hero disappears from the old location. This will
* not happen if she is teleported within sight of her previous