diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 0b92db1..ccec6ac 100644
a
|
b
|
void Parallaction_ns::updateWalkers() {
|
546 | 546 | |
547 | 547 | |
548 | 548 | void Parallaction_ns::scheduleWalk(int16 x, int16 y, bool fromUser) { |
| 549 | debugC(1, kDebugWalk, "Parallaction_ns::scheduleWalk(x:%d, y:%d, fromUser:%d)", x, y, fromUser); |
549 | 550 | AnimationPtr a = _char._ani; |
550 | 551 | |
551 | 552 | if ((a->_flags & kFlagsRemove) || (a->_flags & kFlagsActive) == 0) { |
552 | 553 | return; |
553 | 554 | } |
554 | 555 | |
555 | | _walker->buildPath(a, x, y); |
| 556 | debugC(1, kDebugWalk, "\tbuilding Path"); |
| 557 | _walker->buildPath(a, x, y, fromUser); |
556 | 558 | _engineFlags |= kEngineWalking; |
557 | 559 | } |
558 | 560 | |
diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp
index 53237db..31c3087 100644
a
|
b
|
uint32 PathWalker_NS::buildSubPath(const Common::Point& pos, const Common::Point
|
168 | 168 | } |
169 | 169 | |
170 | 170 | // x, y: mouse click (foot) coordinates |
171 | | void PathWalker_NS::buildPath(AnimationPtr a, uint16 x, uint16 y) { |
| 171 | void PathWalker_NS::buildPath(AnimationPtr a, uint16 x, uint16 y, bool fromUser) { |
172 | 172 | debugC(1, kDebugWalk, "PathBuilder::buildPath to (%i, %i)", x, y); |
173 | 173 | |
174 | 174 | _a = a; |
| 175 | _fromUser = fromUser; |
175 | 176 | |
176 | 177 | _walkPath.clear(); |
177 | 178 | |
… |
… |
void PathWalker_NS::clipMove(Common::Point& pos, const Common::Point& to) {
|
278 | 279 | } |
279 | 280 | |
280 | 281 | void PathWalker_NS::checkDoor(const Common::Point &foot) { |
| 282 | debugC(1, kDebugWalk, "PathWalker_NS::checkDoor()"); |
281 | 283 | ZonePtr z = _vm->hitZone(kZoneDoor, foot.x, foot.y); |
282 | 284 | if (z) { |
283 | 285 | if ((z->_flags & kFlagsClosed) == 0) { |
… |
… |
void PathWalker_NS::checkDoor(const Common::Point &foot) {
|
306 | 308 | } |
307 | 309 | |
308 | 310 | void PathWalker_NS::finalizeWalk() { |
| 311 | debugC(1, kDebugWalk, "PathWalker_NS::finalizeWalk()"); |
309 | 312 | _engineFlags &= ~kEngineWalking; |
310 | 313 | |
311 | 314 | Common::Point foot; |
312 | 315 | _a->getFoot(foot); |
313 | | checkDoor(foot); |
| 316 | if (_fromUser) |
| 317 | checkDoor(foot); |
314 | 318 | |
315 | 319 | _walkPath.clear(); |
316 | 320 | } |
… |
… |
void PathWalker_NS::updateDirection(const Common::Point& pos, const Common::Poin
|
382 | 386 | _a->setF(frames->firstWalkFrame[_direction] + (_step / frames->frameRepeat[_direction]) % frames->numWalkFrames[_direction]); |
383 | 387 | } |
384 | 388 | |
385 | | PathWalker_NS::PathWalker_NS() : _direction(WALK_DOWN), _step(0) { |
| 389 | PathWalker_NS::PathWalker_NS() : _direction(WALK_DOWN), _step(0), _fromUser(false) { |
386 | 390 | } |
387 | 391 | |
388 | 392 | bool PathWalker_BR::directPathExists(const Common::Point &from, const Common::Point &to) { |
diff --git a/engines/parallaction/walk.h b/engines/parallaction/walk.h
index 6796991..a8f8194 100644
a
|
b
|
class PathWalker_NS {
|
36 | 36 | AnimationPtr _a; |
37 | 37 | PointList _walkPath; |
38 | 38 | int16 _direction, _step; |
| 39 | bool _fromUser; |
39 | 40 | |
40 | 41 | // builder routines |
41 | 42 | PointList _subPath; |
… |
… |
class PathWalker_NS {
|
52 | 53 | public: |
53 | 54 | PathWalker_NS(); |
54 | 55 | |
55 | | void buildPath(AnimationPtr a, uint16 x, uint16 y); |
| 56 | void buildPath(AnimationPtr a, uint16 x, uint16 y, bool fromUser); |
56 | 57 | void walk(); |
57 | 58 | }; |
58 | 59 | |