Use enums and defines for directions
This commit is contained in:
@@ -1013,14 +1013,13 @@ findtravelpath(int mode)
|
||||
int dir;
|
||||
int x = travelstepx[set][i];
|
||||
int y = travelstepy[set][i];
|
||||
static int ordered[] = { 0, 2, 4, 6, 1, 3, 5, 7 };
|
||||
/* no diagonal movement for grid bugs */
|
||||
int dirmax = NODIAG(u.umonnum) ? 4 : 8;
|
||||
int dirmax = NODIAG(u.umonnum) ? 4 : N_DIRS;
|
||||
boolean alreadyrepeated = FALSE;
|
||||
|
||||
for (dir = 0; dir < dirmax; ++dir) {
|
||||
int nx = x + xdir[ordered[dir]];
|
||||
int ny = y + ydir[ordered[dir]];
|
||||
int nx = x + xdir[dirs_ord[dir]];
|
||||
int ny = y + ydir[dirs_ord[dir]];
|
||||
|
||||
/*
|
||||
* When guessing and trying to travel as close as possible
|
||||
|
||||
Reference in New Issue
Block a user