mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 17:03:05 +00:00
PARALLACTION: Fix Big Red Adventure Walking To Stop On Path Build Failure.
Walking now works correctly, with no valgrind issues, lockups or assertions. svn-id: r55281
This commit is contained in:
parent
c6750a7a65
commit
f042e398ea
@ -367,7 +367,6 @@ PathWalker_NS::PathWalker_NS() : _direction(WALK_DOWN), _step(0) {
|
||||
}
|
||||
|
||||
bool PathWalker_BR::directPathExists(const Common::Point &from, const Common::Point &to) {
|
||||
|
||||
Common::Point copy(from);
|
||||
Common::Point p(copy);
|
||||
|
||||
@ -450,7 +449,7 @@ void PathWalker_BR::buildPath(State &s, uint16 x, uint16 y) {
|
||||
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 @@ void PathWalker_BR::doWalk(State &s) {
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user