mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-12 12:08:00 +01:00
character: Fix handling of one frame spritesheets with bidir
This commit is contained in:
parent
51e0a25734
commit
8fe925f30d
1 changed files with 6 additions and 2 deletions
|
@ -639,7 +639,9 @@ SYMBOL_EXPORT void AnimateCharacter(struct Game* game, struct Character* charact
|
||||||
|
|
||||||
if (character->frame->start) {
|
if (character->frame->start) {
|
||||||
if (character->spritesheet->bidir) {
|
if (character->spritesheet->bidir) {
|
||||||
character->pos++;
|
if (!character->frame->end) {
|
||||||
|
character->pos++;
|
||||||
|
}
|
||||||
character->reversing = false;
|
character->reversing = false;
|
||||||
if (!character->reversed) {
|
if (!character->reversed) {
|
||||||
reachedEnd = true;
|
reachedEnd = true;
|
||||||
|
@ -659,7 +661,9 @@ SYMBOL_EXPORT void AnimateCharacter(struct Game* game, struct Character* charact
|
||||||
QuitGame(game, false);
|
QuitGame(game, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
character->pos--;
|
if (!character->frame->start) {
|
||||||
|
character->pos--;
|
||||||
|
}
|
||||||
character->reversing = true;
|
character->reversing = true;
|
||||||
if (character->reversed) {
|
if (character->reversed) {
|
||||||
reachedEnd = true;
|
reachedEnd = true;
|
||||||
|
|
Loading…
Reference in a new issue