[Scummvm-cvs-logs] SF.net SVN: scummvm:[55281] scummvm/trunk/engines/parallaction/walk.cpp
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Tue Jan 18 01:22:47 CET 2011
Revision: 55281
http://scummvm.svn.sourceforge.net/scummvm/?rev=55281&view=rev
Author: tdhs
Date: 2011-01-18 00:22:47 +0000 (Tue, 18 Jan 2011)
Log Message:
-----------
PARALLACTION: Fix Big Red Adventure Walking To Stop On Path Build Failure.
Walking now works correctly, with no valgrind issues, lockups or assertions.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/walk.cpp
Modified: scummvm/trunk/engines/parallaction/walk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/walk.cpp 2011-01-17 23:12:59 UTC (rev 55280)
+++ scummvm/trunk/engines/parallaction/walk.cpp 2011-01-18 00:22:47 UTC (rev 55281)
@@ -367,7 +367,6 @@
}
bool PathWalker_BR::directPathExists(const Common::Point &from, const Common::Point &to) {
-
Common::Point copy(from);
Common::Point p(copy);
@@ -450,7 +449,7 @@
if (z1->u._pathLists[id].empty()) {
s._walkPath.clear();
debugC(3, kDebugWalk, "buildPath: no path found");
- // If no path, trigger finalise and stop of walking...
+ // If no path, trigger finalize and stop of walking...
s._stillWalkingTowardsNode = false;
return;
}
@@ -578,7 +577,8 @@
}
if (!s._stillWalkingTowardsNode) {
- s._walkPath.erase(s._walkPath.begin());
+ if (!s._walkPath.empty())
+ s._walkPath.erase(s._walkPath.begin());
if (s._walkPath.empty()) {
finalizeWalk(s);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list