mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
character: SwitchSpritesheet: Don't switch when already on requested sheet
This commit is contained in:
parent
844a55019a
commit
2ee41d0899
1 changed files with 3 additions and 0 deletions
|
@ -86,6 +86,9 @@ SYMBOL_EXPORT void SwitchSpritesheet(struct Game* game, struct Character* charac
|
|||
int pos = character->pos;
|
||||
struct Spritesheet* old = character->spritesheet;
|
||||
bool oldrev = character->reversing;
|
||||
if (old && strcmp(name, old->name) == 0) {
|
||||
return;
|
||||
}
|
||||
SelectSpritesheet(game, character, name);
|
||||
if (old && old->bidir && character->spritesheet->bidir && oldrev) {
|
||||
character->reversing = oldrev;
|
||||
|
|
Loading…
Reference in a new issue