Merge branch '1.6-pre-alpha' of https://github.com/RAGECOOP/RAGECOOP-V into 1.6-pre-alpha
This commit is contained in:
commit
3944d41e85
@ -350,6 +350,7 @@ namespace RageCoop.Client
|
||||
v.RadioStation = packet.RadioStation;
|
||||
v.LicensePlate = packet.LicensePlate;
|
||||
v.Livery = packet.Livery;
|
||||
v.HeadlightColor = packet.HeadlightColor;
|
||||
v.ExtrasMask = packet.ExtrasMask;
|
||||
}
|
||||
v.SetLastSynced(full);
|
||||
|
@ -136,6 +136,7 @@ namespace RageCoop.Client
|
||||
packet.LockStatus = veh.LockStatus;
|
||||
packet.LicensePlate = Call<string>(GET_VEHICLE_NUMBER_PLATE_TEXT, veh);
|
||||
packet.Livery = Call<int>(GET_VEHICLE_LIVERY, veh);
|
||||
packet.HeadlightColor = (byte)Call<int>(GET_VEHICLE_XENON_LIGHT_COLOR_INDEX, veh);
|
||||
packet.ExtrasMask = v.GetVehicleExtras();
|
||||
packet.RadioStation = v.MainVehicle == LastV
|
||||
? Util.GetPlayerRadioIndex() : byte.MaxValue;
|
||||
|
@ -30,6 +30,7 @@ namespace RageCoop.Client
|
||||
internal byte RadioStation = 255;
|
||||
internal string LicensePlate { get; set; }
|
||||
internal int Livery { get; set; } = -1;
|
||||
internal byte HeadlightColor { get; set; } = 255;
|
||||
internal VehicleDataFlags Flags { get; set; }
|
||||
internal ushort ExtrasMask;
|
||||
internal byte ToggleModsMask;
|
||||
@ -75,6 +76,7 @@ namespace RageCoop.Client
|
||||
private bool _lastHornActive;
|
||||
private bool _lastTransformed;
|
||||
private int _lastLivery = -1;
|
||||
private byte _lastHeadlightColor = 255;
|
||||
private Vector3 _predictedPosition;
|
||||
#endregion
|
||||
|
||||
|
@ -3,6 +3,7 @@ using System.Linq;
|
||||
using GTA;
|
||||
using GTA.Math;
|
||||
using GTA.Native;
|
||||
using GTA.UI;
|
||||
using RageCoop.Core;
|
||||
using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData;
|
||||
|
||||
@ -159,6 +160,11 @@ namespace RageCoop.Client
|
||||
_lastLivery = Livery;
|
||||
}
|
||||
|
||||
if (_lastHeadlightColor != HeadlightColor)
|
||||
{
|
||||
Call(SET_VEHICLE_XENON_LIGHT_COLOR_INDEX, MainVehicle.Handle, HeadlightColor);
|
||||
_lastHeadlightColor = HeadlightColor;
|
||||
}
|
||||
MainVehicle.SetDamageModel(DamageModel);
|
||||
|
||||
if (MainVehicle.Handle == V?.Handle && Util.GetPlayerRadioIndex() != RadioStation)
|
||||
|
@ -101,6 +101,8 @@ namespace RageCoop.Core
|
||||
|
||||
m.Write((byte)(Livery + 1));
|
||||
|
||||
m.Write(HeadlightColor);
|
||||
|
||||
m.Write(ExtrasMask);
|
||||
}
|
||||
}
|
||||
@ -176,6 +178,8 @@ namespace RageCoop.Core
|
||||
|
||||
Livery = m.ReadByte() - 1;
|
||||
|
||||
HeadlightColor = m.ReadByte();
|
||||
|
||||
ExtrasMask = m.ReadUInt16();
|
||||
}
|
||||
|
||||
@ -202,7 +206,7 @@ namespace RageCoop.Core
|
||||
public VehicleLockStatus LockStatus { get; set; }
|
||||
|
||||
public int Livery { get; set; } = -1;
|
||||
|
||||
public byte HeadlightColor { get; set; } = 255;
|
||||
public byte RadioStation { get; set; } = 255;
|
||||
public string LicensePlate { get; set; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user