Make travel consider traps like closed doors
Test case: U-shaped corridor, with a known trap in it. Before this change, travel would try to move straight at the target, bumping the wall or walking into a dead-end. After this, travel will go along the corridor and then stop right before the trap. Original patch via AceHack by Alex Smith.
This commit is contained in:
@@ -277,6 +277,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
||||
#define DO_MOVE 0 /* really doing the move */
|
||||
#define TEST_MOVE 1 /* test a normal move (move there next) */
|
||||
#define TEST_TRAV 2 /* test a future travel location */
|
||||
#define TEST_TRAP 3 /* check if a future travel loc is a trap */
|
||||
|
||||
/*** some utility macros ***/
|
||||
#define yn(query) yn_function(query, ynchars, 'n')
|
||||
|
||||
Reference in New Issue
Block a user