ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.72k stars 376 forks source link

Combat screen, creature wince pause occurs on the wrong frame for low morale animation #6367

Closed Branikolog closed 1 year ago

Branikolog commented 1 year ago

Preliminary checks

Platform

Windows

Describe the bug

During low morale animation creature performs "damage taken" animation with a pause in the middle to fit gold eagle animation timing. Currently, pause in wincing animation is made on a wrong frame for all creatures. fheroes2:

https://user-images.githubusercontent.com/55348946/208101766-e3a66b38-4d69-48a0-938b-fe13c2bb1b21.mp4

Original:

https://user-images.githubusercontent.com/55348946/208103842-0a37e9bf-2551-4ea1-822f-55b0d2feadc5.mp4

The issue is similar to recently fixed Death Wave spell animation. (https://github.com/ihhub/fheroes2/pull/6344#issuecomment-1348225088)

Save file

None.

Additional info

No response

Districh-ru commented 1 year ago

Hi, @Branikolog. The problem is the same as it was in #6344. For now the animation runs fully and hangs on the last frame, waiting for gold eagle do disappear. This function is also used for Lich cloud animation. A little later I'll try to fix this.

Branikolog commented 1 year ago

Hi, @Districh-ru

Hi, @Branikolog. The problem is the same as it was in #6344. For now the animation runs fully and hangs on the last frame, waiting for gold eagle do disappear. This function is also used for Lich cloud animation. A little later I'll try to fix this.

That would be awesome, if you fix this animation as well!

This function is also used for Lich cloud animation.

Should I investigate Lich cloud and open new issue, if neccessary?

Districh-ru commented 1 year ago

Should I investigate Lich cloud and open new issue, if neccessary?

Thanks, @Branikolog! I've checked it behavior in OG earlier when was investigating what spells should not overlay the front standing units, but only one shot. As I noticed in the OG the creature (in the video it is Zombie) makes full wince animation, as it is a blast action and not the continuous burning like in the Death Wave spell. All we need is to change the creature animation to STATIC/IDLE after the wince animation to avoid freezing the last frame of wince animation.

OG:

https://user-images.githubusercontent.com/113276641/208134910-af8cc512-731e-4697-a31b-e9e7001f6e4e.mp4

You can more carefully investigate Lich cloud when you have time to clear this question. We can change the behavior of this animation any time to act like for the Death Wave spell, if we decide that it is a better behavior. I also wrote about this not to forget to check the Lich cloud animation after fixing the low morale animation. :)

Districh-ru commented 1 year ago

The Lich cloud animation has to be redone:

https://user-images.githubusercontent.com/113276641/208140589-b8e983eb-b40d-4466-9605-081c25356f51.mp4

It is an "inhibited" zombie. :)

It is not necessary to open a new issue, as the solution is in the same place. You can just update the current one if you don't mind.