diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-30 13:29:45 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-30 13:29:45 +0000 |
commit | ad3623ced5020c9c886cb85100ae05efa460f84a (patch) | |
tree | 2f01f33e4bf0f5e20f81a7d3f64cd6466381df95 /src/map.cpp | |
parent | 22799314e68a0535f65cc7aa56c490cdde7ca544 (diff) | |
download | mana-ad3623ced5020c9c886cb85100ae05efa460f84a.tar.gz mana-ad3623ced5020c9c886cb85100ae05efa460f84a.tar.bz2 mana-ad3623ced5020c9c886cb85100ae05efa460f84a.tar.xz mana-ad3623ced5020c9c886cb85100ae05efa460f84a.zip |
Some fixes to player control, also attempting to solve long walk path problem.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp index a658d8c6..c27a29d6 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -367,6 +367,13 @@ std::list<PATH_NODE> Map::findPath( // 14 for moving diagonal int Gcost = curr.tile->Gcost + ((dx == 0 || dy == 0) ? 10 : 14); + // Skip if Gcost becomes too much + // Warning: probably not entirely accurate + if (Gcost > 200) + { + continue; + } + if (newTile->whichList != onOpenList) { // Found a new tile (not on open nor on closed list) |