Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sardelka9515 committed Aug 17, 2022
2 parents 9dcd6bb + 842e143 commit cb73db7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RageCoop.Client/Sync/Entities/SyncedVehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ void DisplayVehicle(bool touching)
_elapsed = Owner.PacketTravelTime+0.001f*LastSyncedStopWatch.ElapsedMilliseconds;
_predictedPos = Position+_elapsed*Velocity;
var current = MainVehicle.ReadPosition();
var dist = current.DistanceTo(Position);
var dist = current.DistanceTo(_predictedPos);
var cali = dist*(_predictedPos - current);
if (Velocity.Length()<0.1) { cali*=10; }
if (dist>30)
if (dist>10)
{
MainVehicle.Position = _predictedPos;
MainVehicle.Velocity = Velocity;
Expand Down Expand Up @@ -446,4 +446,4 @@ private void StopPedalingAnim(bool fast)
internal Vector3 LastVelocity { get; set; }
#endregion
}
}
}

0 comments on commit cb73db7

Please sign in to comment.