Fix vibration on stopped vehicle

This commit is contained in:
sardelka9515 2022-08-22 19:25:03 +08:00
parent 8b3f8ffd9b
commit eb31a33104
2 changed files with 10 additions and 6 deletions

View File

@ -16,7 +16,7 @@ using System.Resources;
// Version informationr(
[assembly: AssemblyVersion("1.5.2.99")]
[assembly: AssemblyFileVersion("1.5.2.99")]
[assembly: AssemblyVersion("1.5.2.103")]
[assembly: AssemblyFileVersion("1.5.2.103")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

View File

@ -84,7 +84,9 @@ namespace RageCoop.Client
return;
}
}
DisplayVehicle();
// Skip update if no new sync message has arrived.
if (!NeedUpdate)
{
@ -97,8 +99,6 @@ namespace RageCoop.Client
}
MainVehicle.ThrottlePower=ThrottlePower;
MainVehicle.BrakePower=BrakePower;
var v = Main.P.CurrentVehicle;
DisplayVehicle(v != null && MainVehicle.IsTouching(v));
if (IsDead)
{
@ -258,7 +258,7 @@ namespace RageCoop.Client
}
LastUpdated=Main.Ticked;
}
void DisplayVehicle(bool touching)
void DisplayVehicle()
{
_elapsed = Owner.PacketTravelTime + 0.001f * LastSyncedStopWatch.ElapsedMilliseconds;
_predictedPosition = Position + _elapsed * Velocity;
@ -273,6 +273,10 @@ namespace RageCoop.Client
MainVehicle.Quaternion = Quaternion;
return;
}
else if (dist <= 0.03)
{
return;
}
MainVehicle.Velocity = Velocity+cali;