diff options
-rw-r--r-- | saga/actor.cpp | 5 | ||||
-rw-r--r-- | saga/actor.h | 5 | ||||
-rw-r--r-- | saga/sfuncs.cpp | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index fe97ef7e5b..6a670b3431 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -482,7 +482,10 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource for (i = 0; i < _actorsCount; i++) { actor = _actors[i]; - loadActorResources(actor); + if (actor->_flags & kProtagonist) { + loadActorResources(actor); + break; + } } _centerActor = _protagonist = _actors[protagonistIdx]; diff --git a/saga/actor.h b/saga/actor.h index 6830bfd8d7..48c717fe89 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -590,8 +590,11 @@ public: void freeObjList(); void loadObjList(int objectCount, int objectsResourceID); -private: +protected: + friend class Script; bool loadActorResources(ActorData *actor); + +private: void stepZoneAction(ActorData *actor, const HitZone *hitZone, bool exit, bool stopped); void createDrawOrderList(); diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index d69e67be30..c4d5493e27 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1108,6 +1108,9 @@ void Script::sfPlaceActor(SCRIPTFUNC_PARAMS) { actor->_location.y = actorLocation.y; actor->_facingDirection = actor->_actionDirection = actorDirection; + if (!actor->_frames) + _vm->_actor->loadActorResources(actor); + if (frameType >= 0) { frameRange = _vm->_actor->getActorFrameRange(actorId, frameType); |