Skip to content

Commit

Permalink
Add vehicle parachute sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Sardelka9515 committed Aug 18, 2022
1 parent 13a6431 commit e369a50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions RageCoop.Client/Sync/Entities/SyncedVehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,16 @@ internal override void Update()
MainVehicle.SetRocketBoostActive(false);
}
}
if(MainVehicle.HasParachute){
if(Flags.HasFlag(VehicleDataFlags.IsParachuteActive)){
if(!MainVehicle.IsParachuteActive()){
MainVehicle.SetParachuteActive(true);
}
}
else if(MainVehicle.IsParachuteActive()){
MainVehicle.SetParachuteActive(false);
}
}

Function.Call(Hash.SET_VEHICLE_BRAKE_LIGHTS, MainVehicle.Handle, BrakeLightsOn);
MainVehicle.SetDamageModel(DamageModel);
Expand Down
1 change: 1 addition & 0 deletions RageCoop.Core/Packets/Packets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ internal enum VehicleDataFlags:ushort
IsDead = 1 << 5,
IsHornActive = 1 << 6,
IsTransformed = 1 << 7,
IsParachuteActive = 1 << 8,
IsRocketBoostActive = 1 << 9,
IsAircraft = 1 << 10,
IsDeluxoHovering=1 << 11,
Expand Down

0 comments on commit e369a50

Please sign in to comment.