Check out the MegaGlest Wiki! Anyone can be an editor, and we want you!
There is a bug I've noticed generally that, when you move a worker that has harvested something, and then you tell them to harvest something else, they first return to the castle with the wrong type of resource animation.
What should the proper behaviour be?
It should use a loaded animation based on what resource the worker is carrying not on what skill is active. I think that should fix it.
// hacky helper for !HarvestCommandType::canHarvest(u->getLoadType()) animation issueconst MoveSkillType* getMoveLoadedSkill(Unit *u) { const MoveSkillType *mst = 0; for (int i=0; i < u->getType()->getCommandTypeCount<HarvestCommandType>(); ++i) { const HarvestCommandType *t = u->getType()->getCommandType<HarvestCommandType>(i); if (t->canHarvest(u->getLoadType())) { mst = t->getMoveLoadedSkillType(); break; } } return mst;}// hacky helper for !HarvestCommandType::canHarvest(u->getLoadType()) animation issueconst StopSkillType* getStopLoadedSkill(Unit *u) { const StopSkillType *sst = 0; for (int i=0; i < u->getType()->getCommandTypeCount<HarvestCommandType>(); ++i) { const HarvestCommandType *t = u->getType()->getCommandType<HarvestCommandType>(i); if (t->canHarvest(u->getLoadType())) { sst = t->getStopLoadedSkillType(); break; } } return sst;}
I'm (almost) certain I fixed this.