solarus-games / solarus

This repository was moved to GitLab: https://gitlab.com/solarus-games/solarus
http://www.solarus-games.org
Other
710 stars 134 forks source link

Animation "sword" for shield sprite is wrong #1185

Closed Diarandor closed 6 years ago

Diarandor commented 6 years ago

Bug reported by Bagu:

The animation "sword" is not displayed correctly for the shield sprite. Sometimes the wrong direction is used, and some directions seem not to be used. I tested this with the dev snapshot for v1.6, and Bagu was using v1.5.x.

Use Bagu's data to reproduce this bug. The bug can be seen in his video too, here: http://forum.solarus-games.org/index.php/topic,1151.0.html

christopho commented 6 years ago

There is an ugly legacy behavior of the engine: during the sword animation, the shield only has 2 directions: right and left. Right is 0 and left is 1.

For dev team: We can fix that for 1.6 without breaking compatibility, just by checking if there are 2 or 4 directions. If there are 2 directions, we keep the old behavior, and if there are 4 directions we consider them as the usual 4 main directions