Empty-string anim queues are now allowed
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user