Code cleanup.

This commit is contained in:
2023-02-10 17:36:36 +08:00
parent bb4ecfcd8c
commit 7d938de409
2 changed files with 13 additions and 13 deletions

View File

@@ -350,7 +350,7 @@ namespace Cryville.Crtr {
graphicalOffset = Settings.Default.GraphicalOffset;
soundOffset = Settings.Default.SoundOffset;
startOffset = Settings.Default.StartOffset;
forceSyncFrames= Settings.Default.ForceSyncFrames;
forceSyncFrames = Settings.Default.ForceSyncFrames;
texloaddone = false;
Game.NetworkTaskWorker.SuspendBackgroundTasks();
Game.AudioSession = Game.AudioSequencer.NewSession();

View File

@@ -80,12 +80,12 @@ namespace Cryville.Crtr.Event {
public readonly Dictionary<int, Anchor> DynamicAnchors = new Dictionary<int, Anchor>();
public readonly Dictionary<int, bool> DynamicAnchorSet = new Dictionary<int, bool>();
public Anchor OpenedAnchor;
protected Anchor a_cur;
protected Anchor a_head;
protected Anchor a_tail;
protected readonly static int _a_cur = IdentifierManager.SharedInstance.Request("cur");
protected readonly static int _a_head = IdentifierManager.SharedInstance.Request("head");
protected readonly static int _a_tail = IdentifierManager.SharedInstance.Request("tail");
Anchor a_cur;
Anchor a_head;
Anchor a_tail;
readonly static int _a_cur = IdentifierManager.SharedInstance.Request("cur");
readonly static int _a_head = IdentifierManager.SharedInstance.Request("head");
readonly static int _a_tail = IdentifierManager.SharedInstance.Request("tail");
double atime_head;
double atime_tail;
public Anchor RegisterAnchor(int name, bool dyn = false, int propSrcCount = 0) {
@@ -152,12 +152,6 @@ namespace Cryville.Crtr.Event {
if (s.CloneType == 3) SetPreGraphicalActive(true, s);
else if (ev is StampedEvent.Anchor) {
var tev = (StampedEvent.Anchor)ev;
if (tev.Target == a_head) {
SetGraphicalActive(true, s);
}
else if (tev.Target == a_tail) {
SetGraphicalActive(false, s);
}
if (gogroup) {
OpenAnchor(tev.Target);
#if UNITY_5_6_OR_NEWER
@@ -169,6 +163,12 @@ namespace Cryville.Crtr.Event {
skinContainer.MatchDynamic(s);
CloseAnchor();
}
if (tev.Target == a_head) {
SetGraphicalActive(true, s);
}
else if (tev.Target == a_tail) {
SetGraphicalActive(false, s);
}
anchorEvPool.Return(tev);
}
else if (gogroup && s.CloneType == 2) skinContainer.MatchDynamic(s);