Add rocket boost sync
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
**/bin
|
||||
**/obj
|
||||
**/packages
|
||||
**/.vs
|
||||
**/.vs
|
||||
**/.vscode
|
@ -241,6 +241,18 @@ namespace RageCoop.Client
|
||||
MainVehicle.RoofState=RoofState;
|
||||
}
|
||||
|
||||
if(MainVehicle.HasRocketBoost){
|
||||
if(Flags.HasFlag(VehicleDataFlags.IsRocketBoostActive) )
|
||||
{
|
||||
if(!MainVehicle.IsRocketBoostActive()){
|
||||
MainVehicle.SetRocketBoostActive(true);
|
||||
}
|
||||
}
|
||||
else if(MainVehicle.IsRocketBoostActive()){
|
||||
MainVehicle.SetRocketBoostActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
Function.Call(Hash.SET_VEHICLE_BRAKE_LIGHTS, MainVehicle.Handle, BrakeLightsOn);
|
||||
MainVehicle.SetDamageModel(DamageModel);
|
||||
|
||||
|
@ -54,11 +54,6 @@ namespace RageCoop.Client
|
||||
flags |= VehicleDataFlags.IsTransformed;
|
||||
}
|
||||
|
||||
if (veh.HasRoof && (veh.RoofState == VehicleRoofState.Opened || veh.RoofState == VehicleRoofState.Opening))
|
||||
{
|
||||
flags |= VehicleDataFlags.RoofOpened;
|
||||
}
|
||||
|
||||
|
||||
if (veh.IsAircraft)
|
||||
{
|
||||
@ -72,6 +67,10 @@ namespace RageCoop.Client
|
||||
{
|
||||
flags|=VehicleDataFlags.HasRoof;
|
||||
}
|
||||
if (veh.IsRocketBoostActive())
|
||||
{
|
||||
flags|=VehicleDataFlags.IsRocketBoostActive;
|
||||
}
|
||||
if (veh.IsOnFire)
|
||||
{
|
||||
flags|=VehicleDataFlags.IsOnFire;
|
||||
@ -80,7 +79,14 @@ namespace RageCoop.Client
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public static bool IsRocketBoostActive(this Vehicle veh)
|
||||
{
|
||||
return Function.Call<bool>(Hash._IS_VEHICLE_ROCKET_BOOST_ACTIVE,veh);
|
||||
}
|
||||
public static void SetRocketBoostActive(this Vehicle veh,bool toggle)
|
||||
{
|
||||
Function.Call(Hash._SET_VEHICLE_ROCKET_BOOST_ACTIVE,veh,toggle);
|
||||
}
|
||||
public static Dictionary<int, int> GetVehicleMods(this VehicleModCollection mods)
|
||||
{
|
||||
Dictionary<int, int> result = new Dictionary<int, int>();
|
||||
|
@ -121,8 +121,7 @@ namespace RageCoop.Core
|
||||
IsDead = 1 << 5,
|
||||
IsHornActive = 1 << 6,
|
||||
IsTransformed = 1 << 7,
|
||||
RoofOpened = 1 << 8,
|
||||
OnTurretSeat = 1 << 9,
|
||||
IsRocketBoostActive = 1 << 9,
|
||||
IsAircraft = 1 << 10,
|
||||
IsDeluxoHovering=1 << 11,
|
||||
HasRoof=1 << 12,
|
||||
|
Reference in New Issue
Block a user