MegaGlest Forum

MegaGlest => Bug reports => Topic started by: tomreyn on 3 June 2013, 22:32:47

Title: 3.7.1, r4372: Megapack: Norsemen worker amination: small bag
Post by: tomreyn on 3 June 2013, 22:32:47
There's a single wrong image in the animation of the norse worker when he grabs his bag of gold and gets ready to return to the castle.

Normally a norseman worker who is on his way back to the castle looks like this:

(http://s9.postimg.org/4xig8c5qm/screen8.jpg)http://postimg.org/image/rm7n7wn4b/ (http://postimg.org/image/rm7n7wn4b/)

However, there is exactly one image where his bag suddenly shrinks to half the size:

http://postimg.org/image/spwcxlx57/ (http://postimg.org/image/spwcxlx57/)

As discussed with Titi, that's due to a bug in the worker animation (and is not related to the engine).

Edit by Omega: image links need to be direct links to work with the img tag (consider using imgur?)
Title: Re: 3.7.1, r4372: Megapack: Norsemen worker amination: small bag
Post by: Omega on 3 June 2013, 23:13:21
Yes, this is a bug with the animation. About 90% through the worker_standing_loaded.g3d animation of the thrull, the bag shrinks. This also appears on Tech's worker (and therefore, presumably all worker derived units). However, we don't have source files for the original magitech units, so fixing this will require a complete redo of the animation.
Title: Re: 3.7.1, r4372: Megapack: Norsemen worker amination: small bag
Post by: titi on 3 June 2013, 23:27:44
now that I think about it Its maybe not a bug in the animation ....
But I must look at it .

What might happen is :

imagine unit animation has 8 frames

the states between the saved animations are calculated so we see

1->2->3->4->5->6->7->8->1( but first frame of walk loaded is used instead of frame 1 then )

so between 8 and 1 we maybe see this thing. I remember I did something for this at least for the "animation progress bound" feature. I must check this .
Title: Re: 3.7.1, r4372: Megapack: Norsemen worker amination: small bag
Post by: tomreyn on 21 June 2013, 11:03:53
Do you think you can take a look at this for the alpha/beta?
Title: Re: 3.7.1, r4372: Megapack: Norsemen worker amination: small bag
Post by: titi on 23 June 2013, 23:32:48
I tried to fix this 2 times now without luck, so we better stay with this for the moment. Its really not something obvious so .....

wat I did is replacing
Code: [Select]
model->updateInterpolationData(unit->getAnimProgressAsFloat(), unit->isAlive() && !unit->isAnimProgressBound() );

with this (renderer.cpp line ~5092 )
Code: [Select]
bool isStopHarvest=unit->getCurrSkill()!= NULL && unit->getCurrCommand()!=NULL &&  unit->getCurrCommand()->getCommandType()->getClass() == ccHarvest && unit->getCurrSkill()->getClass()==scStop;
model->updateInterpolationData(unit->getAnimProgressAsFloat(), unit->isAlive() && !unit->isAnimProgressBound() && !isStopHarvest);

This should fix is as the animation yould not played "cycled", just one time. Sadly this ended up with a somehow flickering animation I cannot explain. That's why I did not checkin.