summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-10 18:28:49 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-10 18:28:49 +0100
commita7d52dd2d59049e9bf097694c8e708bc1ad6fec2 (patch)
tree899176e3be491d111cec198673a52134816f92b5 /src/map.h
parent369c88d1b24e17afa4dee418e01eae187d3a4169 (diff)
downloadmana-a7d52dd2d59049e9bf097694c8e708bc1ad6fec2.tar.gz
mana-a7d52dd2d59049e9bf097694c8e708bc1ad6fec2.tar.bz2
mana-a7d52dd2d59049e9bf097694c8e708bc1ad6fec2.tar.xz
mana-a7d52dd2d59049e9bf097694c8e708bc1ad6fec2.zip
Wrap the open and closed list members in path finding.
This prevent some weird things happening in path finding when playing for a very long time. Reviewed-by: Thorbjorn.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map.h b/src/map.h
index 160cb7f7..22ca68c4 100644
--- a/src/map.h
+++ b/src/map.h
@@ -56,7 +56,7 @@ struct MetaTile
int Fcost; /**< Estimation of total path cost */
int Gcost; /**< Cost from start to this location */
int Hcost; /**< Estimated cost to goal */
- int whichList; /**< No list, open list or closed list */
+ unsigned whichList; /**< No list, open list or closed list */
int parentX; /**< X coordinate of parent tile */
int parentY; /**< Y coordinate of parent tile */
unsigned char blockmask; /**< Blocking properties of this tile */
@@ -363,7 +363,7 @@ class Map : public Properties
/**
* Blockmasks for different entities
*/
- int *mOccupation[NB_BLOCKTYPES];
+ unsigned *mOccupation[NB_BLOCKTYPES];
int mWidth, mHeight;
int mTileWidth, mTileHeight;
@@ -377,7 +377,7 @@ class Map : public Properties
int mDebugFlags;
// Pathfinding members
- int mOnClosedList, mOnOpenList;
+ unsigned mOnClosedList, mOnOpenList;
// Overlay data
std::list<AmbientLayer*> mBackgrounds;