aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-25 08:24:02 -0500
committerPaul Gilbert2014-12-12 22:44:58 -0500
commit7a691f38cf866c43222ce7d555f6bc953de49017 (patch)
tree93e56f005635910cb62b8b16442a89b9af9d09d7
parentcc8a8bfdddaf66f6c3b8a7ac049a05b6877eb973 (diff)
downloadscummvm-rg350-7a691f38cf866c43222ce7d555f6bc953de49017.tar.gz
scummvm-rg350-7a691f38cf866c43222ce7d555f6bc953de49017.tar.bz2
scummvm-rg350-7a691f38cf866c43222ce7d555f6bc953de49017.zip
ACCESS: Fix guard movement logic on slaver boat
-rw-r--r--engines/access/amazon/amazon_scripts.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index e83bc9f190..df6bb8f00f 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -1085,10 +1085,11 @@ void AmazonScripts::guard() {
switch (_game->_guardLocation) {
case 1:
+ // Guard walking down
if (curCel <= 8 || curCel > 13)
_game->_guard._guardCel = curCel = 8;
- _game->_guard._position.y = _vm->_player->_walkOffDown[curCel - 8];
+ _game->_guard._position.y += _vm->_player->_walkOffDown[curCel - 8];
guardSee();
if (_game->_guard._position.y >= 272) {
_game->_guard._position.y = 272;
@@ -1096,10 +1097,11 @@ void AmazonScripts::guard() {
}
break;
case 2:
+ // Guard walking left
if (curCel <= 43 || curCel > 48)
_game->_guard._guardCel = curCel = 43;
- _game->_guard._position.x = _vm->_player->_walkOffLeft[curCel - 43];
+ _game->_guard._position.x -= _vm->_player->_walkOffLeft[curCel - 43];
guardSee();
if (_game->_guard._position.x <= 56) {
_game->_guard._position.x = 56;
@@ -1107,10 +1109,11 @@ void AmazonScripts::guard() {
}
break;
case 3:
+ // Guard walking up
if (curCel <= 0 || curCel > 5)
_game->_guard._guardCel = curCel = 0;
- _game->_guard._position.y = _vm->_player->_walkOffUp[curCel];
+ _game->_guard._position.y -= _vm->_player->_walkOffUp[curCel];
guardSee();
if (_game->_guard._position.y <= 89) {
_game->_guard._position.y = 89;
@@ -1120,10 +1123,11 @@ void AmazonScripts::guard() {
}
break;
default:
+ // Guard walking right
if (curCel <= 43 || curCel > 48)
_game->_guard._guardCel = curCel = 43;
- _game->_guard._position.x = _vm->_player->_walkOffRight[curCel - 43];
+ _game->_guard._position.x += _vm->_player->_walkOffRight[curCel - 43];
guardSee();
if (_game->_guard._position.x >= 127) {
_game->_guard._position.x = 127;