[Scummvm-cvs-logs] SF.net SVN: scummvm: [23271] scummvm/trunk/engines/scumm/actor.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Jun 24 03:46:59 CEST 2006
Revision: 23271
Author: kirben
Date: 2006-06-23 18:46:54 -0700 (Fri, 23 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23271&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/trunk/engines/scumm/actor.cpp
Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp 2006-06-24 00:37:37 UTC (rev 23270)
+++ scummvm/trunk/engines/scumm/actor.cpp 2006-06-24 01:46:54 UTC (rev 23271)
@@ -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