This commit is contained in:
PC-20230316NUNE\Administrator
2024-02-02 15:38:13 +08:00
parent 877dca3b43
commit 00f56e11c7
228 changed files with 36944 additions and 20084 deletions

View File

@@ -47,7 +47,7 @@ namespace Pathfinding.Legacy {
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
{
base.OnSyncUpdate(dt, frame, input);
deltaTime = Mathf.Min(Time.smoothDeltaTime*2, Time.deltaTime);
deltaTime = Mathf.Min(GetSync().Time.smoothDeltaTime*2, GetSync().Time.deltaTime);
if (richPath != null) {
//System.Diagnostics.Stopwatch w = new System.Diagnostics.Stopwatch();
@@ -61,7 +61,7 @@ namespace Pathfinding.Legacy {
//tr.position = ps;
//Only get walls every 5th frame to save on performance
if (Time.frameCount % 5 == 0 && wallForce > 0 && wallDist > 0) {
if (GetSync().Time.frameCount % 5 == 0 && wallForce > 0 && wallDist > 0) {
wallBuffer.Clear();
fn.FindWalls(wallBuffer, wallDist);
}
@@ -255,7 +255,7 @@ namespace Pathfinding.Legacy {
}
UpdateVelocity();
lastDeltaTime = Time.deltaTime;
lastDeltaTime = GetSync().Time.deltaTime;
}
/// <summary>Update is called once per frame</summary>