MegaGlest Forum
Archives (read only) => Vanilla Glest => Bug report => Topic started by: will on 16 March 2011, 07:53:26
-
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.
-
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.
Yes, that bug is very old...Glest and MG has it too. Maybe that could be fixed during the merge.
-
I split this off since it should really be a separate topic but I'm not sure how to move it out of feature requests.
-
OK, I moved it to the general bug report; since this bug applies to all versions of Glest.
-
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. ;D
-
also consider what's the right thing to do - you have a worker who is carrying some amount of some harvested resource.
You explicitly move them. They do not show visually that they are carrying any resource, they show a normal walking and then idle animation. You then ask them to continue harvesting something else, and suddenly they are shown carrying a resource again! Its a bit inconsistent?
What should the proper behaviour be?
-
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. ;D
:| I believe that would carry on to affect ALL the workers movement?
-
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. ;D
Sounds good, although if it was that easy...why wasn't this fixed when GAE and MG was first released? :-X
I mean, this happens in almost every game I play for me...
-
It's probably just an oversight that nobody bothered to write down and fix.
-
I'm (almost) certain I fixed this.
This was done in GAE when an exploit that -Archmage- hinted at was fixed. The exploit fix made it into MG and I think I added comments stating where the animation selection is wrong, but didn't add the code as it was/is a bit clumsy.
relevant clumsy code (from cmd_types_worker.cpp, belong in unit_updater.cpp for MG):
// hacky helper for !HarvestCommandType::canHarvest(u->getLoadType()) animation issue
const 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 issue
const 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.
I thought you did too. I think several fixes have been lost somehow.
-
Fixed now in megaglest, thanks silnarm