Elo system update
This commit is contained in:
@@ -146,14 +146,6 @@ namespace OnlyScove.Scripts
|
||||
bool isRunning = Runner != null && Runner.IsRunning;
|
||||
if (Object == null && isRunning) return;
|
||||
|
||||
// Proxy Sync
|
||||
if (isRunning && Movement.NetworkedPosition != Vector3.zero && !Object.HasInputAuthority)
|
||||
{
|
||||
Controller.enabled = false;
|
||||
transform.position = Movement.NetworkedPosition;
|
||||
Controller.enabled = true;
|
||||
}
|
||||
|
||||
if (GetInput(out PlayerInputData data))
|
||||
{
|
||||
MoveInput = data.Direction;
|
||||
@@ -175,10 +167,24 @@ namespace OnlyScove.Scripts
|
||||
currentState?.Tick(isRunning ? Runner.DeltaTime : Time.fixedDeltaTime);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
public override void Render()
|
||||
{
|
||||
bool isRunning = Runner != null && Runner.IsRunning;
|
||||
if (isRunning && !Object.HasInputAuthority)
|
||||
{
|
||||
// Smooth interpolation for proxies
|
||||
if (Movement.NetworkedPosition != Vector3.zero)
|
||||
{
|
||||
transform.position = Vector3.Lerp(transform.position, Movement.NetworkedPosition, Runner.DeltaTime * 15f);
|
||||
}
|
||||
UpdateAnimator(Runner.DeltaTime);
|
||||
}
|
||||
else if (!isRunning)
|
||||
{
|
||||
UpdateAnimator(Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
Reference in New Issue
Block a user