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