Bug fix for vehicle color. Interval by FPS
This commit is contained in:
@ -297,6 +297,11 @@ namespace CoopClient
|
||||
}
|
||||
|
||||
#region -- VEHICLE SYNC --
|
||||
if (MainVehicle.GetResponsiblePedHandle() != Character.Handle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (VehicleColors != null && VehicleColors != LastVehicleColors)
|
||||
{
|
||||
Function.Call(Hash.SET_VEHICLE_COLOURS, MainVehicle, VehicleColors[0], VehicleColors[1]);
|
||||
@ -322,11 +327,6 @@ namespace CoopClient
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MainVehicle.GetResponsiblePedHandle() != Character.Handle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (VehicleMods != null && VehicleMods != LastVehicleMods)
|
||||
{
|
||||
Function.Call(Hash.SET_VEHICLE_MOD_KIT, MainVehicle, 0);
|
||||
|
@ -11,7 +11,7 @@ namespace CoopClient.Entities
|
||||
public EntitiesThread()
|
||||
{
|
||||
Tick += OnTick;
|
||||
Interval = 1000 / 60;
|
||||
Interval = (int)(1f / (Game.FPS > 60f ? 60f : Game.FPS) * 1000f);
|
||||
}
|
||||
|
||||
private void OnTick(object sender, EventArgs e)
|
||||
|
@ -104,7 +104,7 @@ namespace CoopClient
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((Util.GetTickCount64() - LastDataSend) < (1000 / 60))
|
||||
if ((Util.GetTickCount64() - LastDataSend) < ((ulong)(1f / (Game.FPS > 60f ? 60f : Game.FPS) * 1000f)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace CoopClient
|
||||
public WorldThread()
|
||||
{
|
||||
Tick += OnTick;
|
||||
Interval = 1000 / 60;
|
||||
Interval = (int)(1f / (Game.FPS > 60f ? 60f : Game.FPS) * 1000f);
|
||||
Aborted += (sender, e) =>
|
||||
{
|
||||
if (LastDisableTraffic)
|
||||
|
Reference in New Issue
Block a user