Skip to content

Commit

Permalink
ChaosMod: Increase vehicle wheel types to 12 where applicable (gta-ch…
Browse files Browse the repository at this point in the history
…aos-mod#3652)

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 and Regynate committed Jan 4, 2025
1 parent 73aaf08 commit 069e135
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 @@ -235,7 +235,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, std::vector<SeatPe
// 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 069e135

Please sign in to comment.