diff --git a/ReallifeGamemode.Server/Managers/VehicleManager.cs b/ReallifeGamemode.Server/Managers/VehicleManager.cs index 46365c7a..661fb120 100644 --- a/ReallifeGamemode.Server/Managers/VehicleManager.cs +++ b/ReallifeGamemode.Server/Managers/VehicleManager.cs @@ -723,7 +723,7 @@ namespace ReallifeGamemode.Server.Managers Vector3 lastPosition = v.Position; if (lastPositions.ContainsKey(v.Handle)) lastPosition = lastPositions[v.Handle]; - double distanceDriven = v.HasSharedData("drivenDistance") ? ((v.GetSharedData("drivenDistance") as double?) ?? 0D) : 0D; + double distanceDriven = v.HasSharedData("drivenDistance") ? (double)v.GetSharedData("drivenDistance") : 0D; double distance = lastPosition.DistanceTo(v.Position) / 1000.0; if (distance > 0.2) return;