Fix priority for manually set special anchors.

This commit is contained in:
2023-02-09 18:11:32 +08:00
parent 3e525842cb
commit 682fe38d40

View File

@@ -197,7 +197,12 @@ namespace Cryville.Crtr.Event {
throw new ArgumentException(string.Format("Specified anchor \"{0}\" not found", IdentifierManager.SharedInstance.Retrieve(name)));
if (DynamicAnchorSet[name])
throw new InvalidOperationException(string.Format("Specified anchor \"{0}\" has been set", IdentifierManager.SharedInstance.Retrieve(name)));
PushAnchorEvent(time, anchor);
int priority = 0;
bool forced = true;
if (name == _a_head) priority = -1;
else if (name == _a_tail) priority = 1;
else forced = false;
PushAnchorEvent(time, anchor, priority, forced);
DynamicAnchorSet[name] = true;
}
void PushAnchorEvent(double time, Anchor anchor, int priority = 0, bool forced = false) {