Skip to content

Commit

Permalink
ChaosMod: Increase vehicle wheel types to 12 where applicable (#3652)
Browse files Browse the repository at this point in the history
And added "random Wheel types" to Vehicle Rain effect as well

Only tested in 3095. but should be fine with all versions, since GTA will default to Sport(0) if `WheelType` is *invalid* anyway.
*example: trying to apply Track(12) type in pre Tuners update*
  • Loading branch information
holysnipz authored Feb 15, 2024
1 parent 4f8ad1f commit 9d3def4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ChaosMod/Effects/db/Misc/MiscVehicleRain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ static void OnTick()

// Also apply random upgrades
SET_VEHICLE_MOD_KIT(veh, 0);

SET_VEHICLE_WHEEL_TYPE(veh, g_Random.GetRandomInt(0, 12));

for (int i = 0; i < 50; i++)
{
int max = GET_NUM_VEHICLE_MODS(veh, i);
Expand Down
2 changes: 1 addition & 1 deletion ChaosMod/Effects/db/Vehs/VehsSpawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static void OnStartRandom()
// Also apply random upgrades
SET_VEHICLE_MOD_KIT(veh, 0);

SET_VEHICLE_WHEEL_TYPE(veh, g_Random.GetRandomInt(0, 7));
SET_VEHICLE_WHEEL_TYPE(veh, g_Random.GetRandomInt(0, 12));

for (int i = 0; i < 50; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion ChaosMod/Effects/db/Vehs/VehsUpgradeController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static void OnStartRandomUpgrades()
{
SET_VEHICLE_MOD_KIT(veh, 0);

SET_VEHICLE_WHEEL_TYPE(veh, g_Random.GetRandomInt(0, 7));
SET_VEHICLE_WHEEL_TYPE(veh, g_Random.GetRandomInt(0, 12));

for (int i = 0; i < 50; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion ChaosMod/Util/Vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ inline Vehicle CreateRandomVehicleWithPeds(Vehicle oldHandle, const std::vector<
// Also apply random upgrades
SET_VEHICLE_MOD_KIT(newVehicle, 0);

SET_VEHICLE_WHEEL_TYPE(newVehicle, g_Random.GetRandomInt(0, 7));
SET_VEHICLE_WHEEL_TYPE(newVehicle, g_Random.GetRandomInt(0, 12));

for (int i = 0; i < 50; i++)
{
Expand Down

0 comments on commit 9d3def4

Please sign in to comment.