客户端rsa,冗余清理,bug修复,安卓build问题

This commit is contained in:
FloatGaming
2026-07-14 01:43:49 +08:00
parent fd22501f71
commit f8985d91d2
682 changed files with 4595 additions and 11216 deletions
+21 -16
View File
@@ -312,6 +312,11 @@ public class HoldNote : BaseNote
}
}
private void OnDisable()
{
prevTrackHeld = false;
}
private void OnDestroy()
{
if (controller != null)
@@ -435,7 +440,7 @@ public class HoldNote : BaseNote
}
// Removed: CalibratePosition for delay==0f was causing Start segments to snap to incorrect positions
// if they started moving immediately after Setup (due to activationTime <= Time.time).
// if they started moving immediately after Setup (due to activationTime <= gameplay clock).
// Start segments should begin at spawnPoint and move from there naturally.
}
@@ -446,7 +451,7 @@ public class HoldNote : BaseNote
var jm = cachedJudgeManager;
var tkm = cachedTrackKeyManager;
bool debugEnabled = JudgeManager.IsDebugEnabled;
float now = Time.time;
float now = GameplayClock.NowSongTime;
// Sample held state and derive key-down/up edges at the very top, BEFORE any
// early return. Unity's Input.GetKeyDown/Up are global per-frame edges that
@@ -740,7 +745,7 @@ public class HoldNote : BaseNote
{
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] End entered while key still held: {noteColor}, forcing Perfect");
// Record release time as current time (player is still holding)
releaseTime = Time.time;
releaseTime = GameplayClock.NowSongTime;
hasReleased = true;
JudgeManager.Instance?.RegisterNoteReleased(noteID, true);
// Evaluate and judge the hold end - force Perfect since we reached the end while holding
@@ -818,12 +823,11 @@ public class HoldNote : BaseNote
if (segment == NoteSegment.End)
{
float timeToWait = Mathf.Max(0f, scheduledEndTime - Time.time);
float timeToWait = Mathf.Max(0f, scheduledEndTime - GameplayClock.NowSongTime);
if (timeToWait > 0f)
{
// use scaled time here so pause affects this wait
float target = Time.time + timeToWait;
while (Time.time < target)
float target = GameplayClock.NowSongTime + timeToWait;
while (GameplayClock.NowSongTime < target)
{
yield return null;
}
@@ -858,7 +862,7 @@ public class HoldNote : BaseNote
private IEnumerator DelayedReturnToPool(float delay)
{
yield return new WaitForSeconds(delay);
yield return GameplayClock.WaitForSeconds(delay);
if (gameObject.activeSelf)
{
ReturnToPool();
@@ -883,7 +887,7 @@ public class HoldNote : BaseNote
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] START forced Miss: {noteColor}");
// Use EvaluateHoldEnd to centralize miss logic and statistics
EvaluateHoldEnd(Time.time, true);
EvaluateHoldEnd(GameplayClock.NowSongTime, true);
// Still need to show judge result and update combo for the head segment
InputManager.Instance?.ShowJudgeResult(trackIndex, "Miss");
@@ -897,7 +901,7 @@ public class HoldNote : BaseNote
return;
}
float pressTime = Time.time;
float pressTime = GameplayClock.NowSongTime;
float rawOffsetMs = (hitTime - pressTime) * 1000f;
float offset = Mathf.Abs(pressTime - hitTime);
string result;
@@ -962,7 +966,7 @@ public class HoldNote : BaseNote
JudgeManager.Instance.RegisterStartJudged(noteID, false);
isHoldActive = false;
EvaluateHoldEnd(Time.time, true);
EvaluateHoldEnd(GameplayClock.NowSongTime, true);
try
{
@@ -1035,10 +1039,10 @@ public class HoldNote : BaseNote
private IEnumerator DelayedReturn()
{
yield return new WaitForSeconds(0.05f);
yield return GameplayClock.WaitForSeconds(0.05f);
if (gameObject.activeSelf)
{
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] DelayedReturn: returning {noteID} to pool at time={Time.time:F3}");
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] DelayedReturn: returning {noteID} to pool at time={GameplayClock.NowSongTime:F3}");
ReturnToPool();
}
}
@@ -1331,7 +1335,7 @@ public class HoldNote : BaseNote
}
else
{
releaseTime = Time.time;
releaseTime = GameplayClock.NowSongTime;
}
hasReleased = true;
JudgeManager.Instance?.RegisterNoteReleased(noteID, true);
@@ -1353,7 +1357,7 @@ public class HoldNote : BaseNote
return;
}
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] ReturnToPool called for {noteID} segment={segment} time={Time.time:F3}");
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] ReturnToPool called for {noteID} segment={segment} time={GameplayClock.NowSongTime:F3}");
// CRITICAL: Always release lock before returning to pool, regardless of state
ReleaseTrackJudgeLockSafe();
@@ -1389,6 +1393,7 @@ public class HoldNote : BaseNote
isJudged = false;
isHoldActive = false;
hasBeenHeldFromStart = false;
prevTrackHeld = false;
holdStartTime = -1f;
@@ -1463,7 +1468,7 @@ public class HoldNote : BaseNote
float activation = controller.ActivationTime;
float s = controller.CurrentSpeed;
float elapsed = Time.time - activation;
float elapsed = GameplayClock.NowSongTime - activation;
Vector3 expected = spawnPointPosition;
if (controller.UsesAbsolutePositioning)