From 9d3def4851e0298782f4d43d0ae0322ec73807e8 Mon Sep 17 00:00:00 2001 From: holysnipz <9103583+holysnipz@users.noreply.github.com> Date: Fri, 16 Feb 2024 01:28:05 +0700 Subject: [PATCH] ChaosMod: Increase vehicle wheel types to 12 where applicable (#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* --- ChaosMod/Effects/db/Misc/MiscVehicleRain.cpp | 3 +++ ChaosMod/Effects/db/Vehs/VehsSpawner.cpp | 2 +- ChaosMod/Effects/db/Vehs/VehsUpgradeController.cpp | 2 +- ChaosMod/Util/Vehicle.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChaosMod/Effects/db/Misc/MiscVehicleRain.cpp b/ChaosMod/Effects/db/Misc/MiscVehicleRain.cpp index b0d209b80..6e01dd7c6 100644 --- a/ChaosMod/Effects/db/Misc/MiscVehicleRain.cpp +++ b/ChaosMod/Effects/db/Misc/MiscVehicleRain.cpp @@ -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); diff --git a/ChaosMod/Effects/db/Vehs/VehsSpawner.cpp b/ChaosMod/Effects/db/Vehs/VehsSpawner.cpp index 9d8d52d14..77db19ce8 100644 --- a/ChaosMod/Effects/db/Vehs/VehsSpawner.cpp +++ b/ChaosMod/Effects/db/Vehs/VehsSpawner.cpp @@ -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++) { diff --git a/ChaosMod/Effects/db/Vehs/VehsUpgradeController.cpp b/ChaosMod/Effects/db/Vehs/VehsUpgradeController.cpp index 5f5ae7015..b65e264a3 100644 --- a/ChaosMod/Effects/db/Vehs/VehsUpgradeController.cpp +++ b/ChaosMod/Effects/db/Vehs/VehsUpgradeController.cpp @@ -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++) { diff --git a/ChaosMod/Util/Vehicle.h b/ChaosMod/Util/Vehicle.h index c58c1df38..12fd46f14 100644 --- a/ChaosMod/Util/Vehicle.h +++ b/ChaosMod/Util/Vehicle.h @@ -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++) {