Skip to content

Commit 864b4a7

Browse files
committed
Car Generator Randomizer: Exempt Gauntlets
1 parent be953f1 commit 864b4a7

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/misc/ramps.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class RampRandomizer
3636
if ("DOES_ENTITY_EXIST"_n(ObjectHandle))
3737
return;
3838

39-
if (!CStreaming::HasModelLoaded (Model))
39+
if (!CStreaming::HasModelLoaded (modelIdx))
4040
{
41-
CStreaming::RequestModel (Model, 0);
41+
CStreaming::RequestModel (modelIdx, 0);
4242
CStreaming::LoadAllObjects (false);
4343
}
4444

src/mission/missions_Cmds.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ MissionRandomizer_Commands::OnMissionStart (uint32_t origHash,
298298
case "finalea"_joaat:
299299
"GIVE_WEAPON_TO_PED"_n("PLAYER_PED_ID"_n(), "weapon_pistol"_joaat,
300300
25, 1, 1);
301+
break;
301302

302303
case "family3"_joaat: SetBuildingState (2, 0); break;
303304
}

src/vehicles/cargens.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ class CarGeneratorRandomizer
3434
return GetRandomElement (Rainbomizer::Common::GetVehicleHashes ());
3535
}
3636

37+
/*******************************************************/
38+
static bool
39+
ShouldRandomize (uint32_t modelHash)
40+
{
41+
return modelHash != "gauntlet"_joaat;
42+
}
43+
3744
/*******************************************************/
3845
template <auto &CCarGen__Init>
3946
static void
@@ -55,7 +62,7 @@ class CarGeneratorRandomizer
5562
p20, p21, p22);
5663
#endif
5764

58-
if (Config().Enable)
65+
if (Config().Enable && ShouldRandomize (modelHash))
5966
{
6067
*vehicleGroup = 0;
6168

0 commit comments

Comments
 (0)