From 9dcd6bb363922b689c091a8888399f8e0a057440 Mon Sep 17 00:00:00 2001 From: Sardelka9515 Date: Wed, 17 Aug 2022 22:50:17 +0800 Subject: [PATCH] Apply prediction on server entity update --- RageCoop.Server/Scripting/ServerEntities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RageCoop.Server/Scripting/ServerEntities.cs b/RageCoop.Server/Scripting/ServerEntities.cs index 1f92d2fa..025d3f51 100644 --- a/RageCoop.Server/Scripting/ServerEntities.cs +++ b/RageCoop.Server/Scripting/ServerEntities.cs @@ -225,7 +225,7 @@ internal void Update(Packets.VehicleSync p, Client sender) Vehicles.TryAdd(p.ID, veh=new ServerVehicle(Server)); veh.ID=p.ID; } - veh._pos = p.Position; + veh._pos = p.Position+p.Velocity*sender.Latency; veh.Owner=sender; veh._quat=p.Quaternion; }