mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
character: Maintain bidir status in SwitchSpritesheet
This commit is contained in:
parent
a71d0bb0bb
commit
844a55019a
1 changed files with 5 additions and 0 deletions
|
@ -84,7 +84,12 @@ SYMBOL_EXPORT void SelectSpritesheet(struct Game* game, struct Character* charac
|
|||
|
||||
SYMBOL_EXPORT void SwitchSpritesheet(struct Game* game, struct Character* character, char* name) {
|
||||
int pos = character->pos;
|
||||
struct Spritesheet* old = character->spritesheet;
|
||||
bool oldrev = character->reversing;
|
||||
SelectSpritesheet(game, character, name);
|
||||
if (old && old->bidir && character->spritesheet->bidir && oldrev) {
|
||||
character->reversing = oldrev;
|
||||
}
|
||||
if (pos < character->spritesheet->frame_count && !character->spritesheet->stream) {
|
||||
character->pos = pos;
|
||||
character->frame = &character->spritesheet->frames[character->pos];
|
||||
|
|
Loading…
Reference in a new issue