2023-03-20 17:14:52 +08:00
|
|
|
using System;
|
2022-10-23 19:02:39 +08:00
|
|
|
using System.Collections.Generic;
|
2022-08-18 20:44:39 +08:00
|
|
|
using GTA;
|
|
|
|
using GTA.Math;
|
2022-09-06 21:46:35 +08:00
|
|
|
using RageCoop.Core;
|
2022-08-18 20:44:39 +08:00
|
|
|
|
2022-09-06 21:46:35 +08:00
|
|
|
namespace RageCoop.Client
|
|
|
|
{
|
|
|
|
public partial class SyncedVehicle
|
|
|
|
{
|
2022-08-18 20:44:39 +08:00
|
|
|
public Vehicle MainVehicle { get; internal set; }
|
|
|
|
|
|
|
|
|
|
|
|
#region -- SYNC DATA --
|
2023-03-26 15:36:15 +08:00
|
|
|
internal VehicleData VD;
|
|
|
|
internal VehicleDataFull VDF;
|
|
|
|
internal VehicleDataVar VDV;
|
2022-08-18 20:44:39 +08:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region FLAGS
|
|
|
|
|
2023-03-26 15:36:15 +08:00
|
|
|
internal bool EngineRunning => VD.Flags.HasVehFlag(VehicleDataFlags.IsEngineRunning);
|
|
|
|
internal bool Transformed => VD.Flags.HasVehFlag(VehicleDataFlags.IsTransformed);
|
|
|
|
internal bool HornActive => VD.Flags.HasVehFlag(VehicleDataFlags.IsHornActive);
|
|
|
|
internal bool LightsOn => VD.Flags.HasVehFlag(VehicleDataFlags.AreLightsOn);
|
|
|
|
internal bool BrakeLightsOn => VD.Flags.HasVehFlag(VehicleDataFlags.AreBrakeLightsOn);
|
|
|
|
internal bool HighBeamsOn => VD.Flags.HasVehFlag(VehicleDataFlags.AreHighBeamsOn);
|
|
|
|
internal bool SireneActive => VD.Flags.HasVehFlag(VehicleDataFlags.IsSirenActive);
|
|
|
|
internal bool IsDead => VD.Flags.HasVehFlag(VehicleDataFlags.IsDead);
|
|
|
|
internal bool IsDeluxoHovering => VD.Flags.HasVehFlag(VehicleDataFlags.IsDeluxoHovering);
|
2022-10-23 19:02:39 +08:00
|
|
|
|
2022-08-18 20:44:39 +08:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region FIXED-DATA
|
|
|
|
|
|
|
|
internal bool IsMotorcycle;
|
|
|
|
internal bool IsAircraft;
|
|
|
|
internal bool HasRocketBoost;
|
|
|
|
internal bool HasParachute;
|
|
|
|
internal bool HasRoof;
|
|
|
|
internal bool IsSubmarineCar;
|
|
|
|
internal bool IsDeluxo;
|
2022-11-20 15:55:11 +08:00
|
|
|
internal bool IsTrain;
|
2023-03-20 18:20:07 +08:00
|
|
|
internal ushort AvalibleExtras;
|
2023-03-19 17:47:00 +08:00
|
|
|
|
2023-03-18 15:58:31 +08:00
|
|
|
[DebugTunable]
|
|
|
|
static float RotCalMult = 10f;
|
2022-11-30 20:17:06 +08:00
|
|
|
|
2022-08-18 20:44:39 +08:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region PRIVATE
|
2023-03-26 15:36:15 +08:00
|
|
|
private VehicleData _lastVD;
|
|
|
|
private VehicleDataFull _lastVDF;
|
|
|
|
private VehicleDataVar _lastVDV;
|
2022-08-18 22:08:06 +08:00
|
|
|
private Vector3 _predictedPosition;
|
2023-03-26 15:36:15 +08:00
|
|
|
internal bool _lastTransformed => _lastVD.Flags.HasVehFlag(VehicleDataFlags.IsTransformed);
|
|
|
|
internal bool _lastHornActive => _lastVD.Flags.HasVehFlag(VehicleDataFlags.IsHornActive);
|
|
|
|
|
2022-08-18 20:44:39 +08:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region OUTGOING
|
2022-10-23 19:02:39 +08:00
|
|
|
|
2022-08-18 20:44:39 +08:00
|
|
|
internal float LastNozzleAngle { get; set; }
|
|
|
|
|
|
|
|
internal float LastEngineHealth { get; set; }
|
|
|
|
internal Vector3 LastVelocity { get; set; }
|
2022-10-23 19:02:39 +08:00
|
|
|
|
2022-08-18 20:44:39 +08:00
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|