Skip to content

Commit

Permalink
Brake Boosting: apply to player only
Browse files Browse the repository at this point in the history
  • Loading branch information
Regynate authored Nov 25, 2023
1 parent 185a5e8 commit 7c1ac83
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ChaosMod/Effects/db/Vehs/VehsBrakeBoosting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ static void OnTick()
{
static const Hash blimpHash = "BLIMP"_hash;

for (Vehicle veh : GetAllVehs())
{
if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID()), false) {
Vehicle veh = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), false);

Hash vehModel = GET_ENTITY_MODEL(veh);
int vehClass = GET_VEHICLE_CLASS(veh);

// Exclude helis since the "braking" flag seems to be always set for those
// Also manually exclude blimps since those don't seem to be categorized as either of those
if (vehClass != 15 && vehModel != blimpHash && Memory::IsVehicleBraking(veh))
Expand All @@ -28,4 +29,4 @@ REGISTER_EFFECT(nullptr, nullptr, OnTick, EffectInfo
.Id = "veh_brakeboost",
.IsTimed = true,
}
);
);

0 comments on commit 7c1ac83

Please sign in to comment.