diff options
author | Johannes Schickel | 2011-04-11 00:34:16 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-04-11 00:34:16 +0200 |
commit | 93f591580a31b0a4553994be40a2eb0b227e3a56 (patch) | |
tree | 2ab315b30c029da182267fa12f0b0524234ec7e6 /engines/kyra/scene_v2.cpp | |
parent | 8fe9f8e73a0ac0a4f0a18a94db705f934f58ad34 (diff) | |
download | scummvm-rg350-93f591580a31b0a4553994be40a2eb0b227e3a56.tar.gz scummvm-rg350-93f591580a31b0a4553994be40a2eb0b227e3a56.tar.bz2 scummvm-rg350-93f591580a31b0a4553994be40a2eb0b227e3a56.zip |
KYRA: Get rid of non-const static variable in Kyra2 code.
Diffstat (limited to 'engines/kyra/scene_v2.cpp')
-rw-r--r-- | engines/kyra/scene_v2.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp index f0c26acd54..fdfbceb521 100644 --- a/engines/kyra/scene_v2.cpp +++ b/engines/kyra/scene_v2.cpp @@ -86,15 +86,16 @@ int KyraEngine_v2::findWay(int x, int y, int toX, int toY, int *moveTable, int m x &= ~3; toX &= ~3; y &= ~1; toY &= ~1; int size = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize); - static bool usePostProcess = false; - if (size && !usePostProcess) { - usePostProcess = true; + + if (size && !_smoothingPath) { + _smoothingPath = true; int temp = pathfinderInitPositionTable(moveTable); temp = pathfinderInitPositionIndexTable(temp, x, y); pathfinderFinializePath(moveTable, temp, x, y, moveTableSize); - usePostProcess = false; + _smoothingPath = false; } - return usePostProcess ? size : getMoveTableSize(moveTable); + + return _smoothingPath ? size : getMoveTableSize(moveTable); } bool KyraEngine_v2::directLinePassable(int x, int y, int toX, int toY) { |