Empty-string anim queues are now allowed

This commit is contained in:
2026-02-25 02:54:54 -05:00
parent 4b81a0768a
commit 95cd378dc0
6 changed files with 34 additions and 51 deletions

View File

@@ -420,8 +420,16 @@ const FlxAnimationStep *FlxAnimTracker::FindAnimation(int64 hash) const
}
void FlxAnimTracker::Update(std::string_view encqueue) {
check(!encqueue.empty());
// An empty encqueue represents a blank queue: one step with hash=0, empty body.
//
if (encqueue.empty()) {
if (AQ.Num() == 1 && AQ[0].Hash == 0) return;
Changed = true;
AQ.Empty();
AQ.Emplace(0, std::string_view());
return;
}
// If the first hash matches, we don't bother updating at all.
//
FlxAnimQueueDecoder decoder(encqueue);