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
committerAndrei Karas <akaras@inbox.ru>2011-03-11 02:53:52 +0200
commit0c6bf93ee13f0b3344079ebf4e60c5ec8323f0bd (patch)
tree321aebd02acd37ff3cf20bfab6ccf2b34b7d6181 /src/map.h
parente9364e8946f49cc7cd750185dd3f10f3857048a2 (diff)
downloadmv-0c6bf93ee13f0b3344079ebf4e60c5ec8323f0bd.tar.gz
mv-0c6bf93ee13f0b3344079ebf4e60c5ec8323f0bd.tar.bz2
mv-0c6bf93ee13f0b3344079ebf4e60c5ec8323f0bd.tar.xz
mv-0c6bf93ee13f0b3344079ebf4e60c5ec8323f0bd.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 79ab8e8fa..5cc25cf01 100644
--- a/src/map.h
+++ b/src/map.h
@@ -69,7 +69,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 */
@@ -463,7 +463,7 @@ class Map : public Properties, public ConfigListener
/**
* Blockmasks for different entities
*/
- int *mOccupation[NB_BLOCKTYPES];
+ unsigned *mOccupation[NB_BLOCKTYPES];
int mWidth, mHeight;
int mTileWidth, mTileHeight;
@@ -478,7 +478,7 @@ class Map : public Properties, public ConfigListener
int mDebugFlags;
// Pathfinding members
- int mOnClosedList, mOnOpenList;
+ unsigned mOnClosedList, mOnOpenList;
// Overlay data
std::list<AmbientLayer*> mBackgrounds;