mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
提交
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user