aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/actor.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 870de11b5a..ef5cef6267 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1174,17 +1174,31 @@ void Actor::setActorCostume(int c) {
int i;
costumeNeedsInit = true;
-
- if (visible) {
- hideActor();
+
+ if (_vm->_version == 8) {
cost.reset();
+ memset(animVariable, 0, sizeof(animVariable));
costume = c;
- showActor();
+
+ if (visible) {
+ if (costume) {
+ _vm->ensureResourceLoaded(rtCostume, costume);
+ }
+ startAnimActor(initFrame);
+ }
} else {
- costume = c;
- cost.reset();
+ if (visible) {
+ hideActor();
+ cost.reset();
+ costume = c;
+ showActor();
+ } else {
+ costume = c;
+ cost.reset();
+ }
}
+
if (_vm->_features & GF_NEW_COSTUMES) {
for (i = 0; i < 256; i++)
palette[i] = 0xFF;
@@ -1195,7 +1209,6 @@ void Actor::setActorCostume(int c) {
for (i = 0; i < 32; i++)
palette[i] = 0xFF;
}
-
}
void Actor::startWalkActor(int destX, int destY, int dir) {