[Scummvm-cvs-logs] SF.net SVN: scummvm: [23304] scummvm/branches/branch-0-9-0/engines/scumm/actor.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Jun 25 03:05:46 CEST 2006
Revision: 23304
Author: kirben
Date: 2006-06-24 18:05:41 -0700 (Sat, 24 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23304&view=rev
Log Message:
-----------
Add cyx's patch for bug #1508935 - FOA: Indy walks on the spot. Also fixes car failing to turn during smart star challenge in thinker1
Modified Paths:
--------------
scummvm/branches/branch-0-9-0/engines/scumm/actor.cpp
Modified: scummvm/branches/branch-0-9-0/engines/scumm/actor.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/engines/scumm/actor.cpp 2006-06-25 01:03:38 UTC (rev 23303)
+++ scummvm/branches/branch-0-9-0/engines/scumm/actor.cpp 2006-06-25 01:05:41 UTC (rev 23304)
@@ -420,6 +420,11 @@
}
_pos = _actorPos;
+
+ if (_pos == _walkdata.next) {
+ _moving &= ~MF_IN_LEG;
+ return 0;
+ }
return 1;
}
@@ -776,14 +781,15 @@
if (newdir == -1 || _ignoreTurns)
return;
- _moving &= ~MF_TURN;
-
- if (newdir != _facing) {
- if (_vm->_game.version <= 6)
- _moving = MF_TURN;
- else
+ if (_vm->_game.version <= 6) {
+ _moving = MF_TURN;
+ _targetFacing = newdir;
+ } else {
+ _moving &= ~MF_TURN;
+ if (newdir != _facing) {
_moving |= MF_TURN;
- _targetFacing = newdir;
+ _targetFacing = newdir;
+ }
}
}
@@ -817,7 +823,7 @@
startAnimActor(_talkStopFrame);
} else {
if (_costumeNeedsInit) {
- startAnimActor(_initFrame);
+ startAnimActor(_initFrame);
_costumeNeedsInit = false;
}
}
@@ -1335,7 +1341,7 @@
for (i = 1; i < _numActors; i++) {
if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
&& y >= _actors[i]._top && y <= _actors[i]._bottom
- && (_actors[i]._pos.y > _actors[curActor]._pos.y || curActor == 0))
+ && (_actors[i]._pos.y > _actors[curActor]._pos.y || curActor == 0))
curActor = i;
}
@@ -1596,7 +1602,7 @@
if (!isInCurrentRoom() && _vm->_game.version <= 6) {
_pos.x = abr.x;
_pos.y = abr.y;
- if (_ignoreTurns == false && dir != -1)
+ if (!_ignoreTurns && dir != -1)
_facing = dir;
return;
}
@@ -1688,6 +1694,12 @@
_moving = 0;
setBox(_walkdata.destbox);
startWalkAnim(3, _walkdata.destdir);
+ if (_vm->_game.version <= 6) {
+ if (!_ignoreTurns && _walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) {
+ _targetFacing = _walkdata.destdir;
+ _moving = MF_TURN;
+ }
+ }
return;
}
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