diff options
author | Andrew Kurushin | 2005-06-16 15:33:44 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-06-16 15:33:44 +0000 |
commit | 7539169c1defdcc7fd18ef7f4d74b670b7749f52 (patch) | |
tree | 01a1bd1fcf49b4f19e8736ec9c9ac4d30a5b223f /saga | |
parent | 18e5bf15f83f5c0a772bef792b5ba32429ce6b2b (diff) | |
download | scummvm-rg350-7539169c1defdcc7fd18ef7f4d74b670b7749f52.tar.gz scummvm-rg350-7539169c1defdcc7fd18ef7f4d74b670b7749f52.tar.bz2 scummvm-rg350-7539169c1defdcc7fd18ef7f4d74b670b7749f52.zip |
fix trothy -> oil lamp
svn-id: r18401
Diffstat (limited to 'saga')
-rw-r--r-- | saga/sfuncs.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index f29a3e9a4d..51b8cb9a94 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1479,15 +1479,24 @@ void Script::sfSetDoorState(SCRIPTFUNC_PARAMS) { // Param1: actor id // Param2: z void Script::sfSetActorZ(SCRIPTFUNC_PARAMS) { - int16 actorId; - int16 z; + int16 objectId; ActorData *actor; + ObjectData *obj; + int16 z; - actorId = thread->pop(); + objectId = thread->pop(); z = thread->pop(); - actor = _vm->_actor->getActor(actorId); - actor->location.z = z; + + if (_vm->_actor->validActorId(objectId)) { + actor = _vm->_actor->getActor(objectId); + actor->location.z = z; + } else { + if (_vm->_actor->validObjId(objectId)) { + obj = _vm->_actor->getObj(objectId); + obj->location.z = z; + } + } } // Script function #59 (0x3B) |