U453 and buglist item - travel command updates
I wrote to the devteam early last week: > Given my understanding of travel, it's supposed to be somewhat intelligent, > and "convenient", and should, therefore avoid walking into water, lava, > traps, or other things that distant movement would avoid, even if you're > right next it. Unless... the travel destination is the "bad" location > next to you when the travel starts. To that end... - add a context (iflags in 3.4.3 to maintain savefile compat) flag to differenciate the first travel step from later steps, to allow the detection of the final sentence, above. - several changes to set/reset the travel1 flag as needed - add code to findtravelpath to treat the first step specially if it's the only step, allowing forced travel into a "bad" location - correct the "don't travel over traps" code, which was getting confused because hero's starting location was being avoided - add code to avoid traveling into water and lava, duplicating checks used for non-travel running - fix some strange "guess" travel behavior: avoid zigzag paths when there's a more direct path (even though the number of moves is the same) - trunk change adds a new DISP_ALL tmp_at type, and uses it in some debug code for travel, debug changes not added to the 3.4.3 branch
This commit is contained in:
@@ -77,6 +77,7 @@ struct context_info {
|
||||
long stethoscope_move;
|
||||
short stethoscope_movement;
|
||||
boolean travel; /* find way automatically to u.tx,u.ty */
|
||||
boolean travel1; /* first travel step */
|
||||
boolean forcefight;
|
||||
boolean nopick; /* do not pickup objects (as when running) */
|
||||
boolean made_amulet;
|
||||
|
||||
@@ -175,11 +175,12 @@
|
||||
* tmp_at() control calls.
|
||||
*/
|
||||
#define DISP_BEAM (-1) /* Keep all glyphs showing & clean up at end. */
|
||||
#define DISP_FLASH (-2) /* Clean up each glyph before displaying new one. */
|
||||
#define DISP_ALWAYS (-3) /* Like flash, but still displayed if not visible. */
|
||||
#define DISP_CHANGE (-4) /* Change glyph. */
|
||||
#define DISP_END (-5) /* Clean up. */
|
||||
#define DISP_FREEMEM (-6) /* Free all memory during exit only. */
|
||||
#define DISP_ALL (-2) /* Like beam, but still displayed if not visible. */
|
||||
#define DISP_FLASH (-3) /* Clean up each glyph before displaying new one. */
|
||||
#define DISP_ALWAYS (-4) /* Like flash, but still displayed if not visible. */
|
||||
#define DISP_CHANGE (-5) /* Change glyph. */
|
||||
#define DISP_END (-6) /* Clean up. */
|
||||
#define DISP_FREEMEM (-7) /* Free all memory during exit only. */
|
||||
|
||||
|
||||
/* Total number of cmap indices in the sheild_static[] array. */
|
||||
|
||||
Reference in New Issue
Block a user