EMI: Made chore playing correctly push costumes intead of just setting the costume

This commit is contained in:
Joel Teichroeb 2012-04-24 17:07:46 -07:00
parent 34f07d99a6
commit 62fe2e68ae

View file

@ -546,10 +546,11 @@ void Lua_V2::PlayActorChore() {
const char *choreName = lua_getstring(choreObj);
const char *costumeName = lua_getstring(costumeObj);
Costume *costume = actor->getCurrentCostume();
if (!(costume && costume->getFilename() == costumeName)) {
actor->setCostume(costumeName);
costume = actor->getCurrentCostume();
Costume *costume = actor->findCostume(costumeName);
if (costume == NULL) {
actor->pushCostume(costumeName);
costume = actor->findCostume(costumeName);
}
Chore *chore = costume->getChore(choreName);