diff options
author | Peter Kohaut | 2017-03-20 00:28:51 +0100 |
---|---|---|
committer | Peter Kohaut | 2017-03-20 00:28:51 +0100 |
commit | 25e5143f99dab91d53eb52de703ef1b4c9ee2656 (patch) | |
tree | 49e6627b2c7404b40e7b57e7117f5a0576286aad /engines/bladerunner/actor.cpp | |
parent | 6bb953e25bca80f763f8cd7c2df1863a529ba889 (diff) | |
download | scummvm-rg350-25e5143f99dab91d53eb52de703ef1b4c9ee2656.tar.gz scummvm-rg350-25e5143f99dab91d53eb52de703ef1b4c9ee2656.tar.bz2 scummvm-rg350-25e5143f99dab91d53eb52de703ef1b4c9ee2656.zip |
BLADERUNNER: added full office leroy ai script
fix sceneobject remove
Diffstat (limited to 'engines/bladerunner/actor.cpp')
-rw-r--r-- | engines/bladerunner/actor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 9a8892cf6c..96a76bf4be 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -203,10 +203,10 @@ void Actor::setAtXYZ(const Vector3 &position, int facing, bool snapFacing, bool setBoundingBox(_position, retired); - _vm->_sceneObjects->remove(_id); + _vm->_sceneObjects->remove(_id + SCENE_OBJECTS_ACTORS_OFFSET); if (_vm->_scene->getSetId() == _setId) { - _vm->_sceneObjects->addActor(_id, _bbox, &_screenRectangle, 1, moving, _isTargetable, retired); + _vm->_sceneObjects->addActor(_id + SCENE_OBJECTS_ACTORS_OFFSET, _bbox, &_screenRectangle, 1, moving, _isTargetable, retired); } } @@ -477,7 +477,7 @@ bool Actor::tick(bool forceDraw) { this->_position.z = this->_position.z + positionChange.x * sinx + positionChange.y * cosx; this->_position.y = this->_position.y + positionChange.z; - if (_vm->_sceneObjects->existsOnXZ(this->_id, this->_position.x, this->_position.z, false, false) == 1 && !this->_isImmuneToObstacles) { + if (_vm->_sceneObjects->existsOnXZ(this->_id + SCENE_OBJECTS_ACTORS_OFFSET, this->_position.x, this->_position.z, false, false) == 1 && !this->_isImmuneToObstacles) { this->_position.x = originalX; this->_position.y = originalY; this->_position.z = originalZ; |