mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-14 23:54:09 +00:00
gang
This commit is contained in:
parent
1ef8d61f36
commit
75943a57b2
2 changed files with 16 additions and 11 deletions
|
@ -597,7 +597,8 @@ CCarCtrl::ChooseCarRating(CZoneInfo* pZoneInfo)
|
|||
int32
|
||||
CCarCtrl::ChooseModel(CZoneInfo* pZone, CVector* pPos, int* pClass) {
|
||||
int32 model = -1;
|
||||
for (int i = 0; i < 10 && (model == -1 || !CStreaming::HasModelLoaded(model)); i++) {
|
||||
int i;
|
||||
for (i = 0; i < 10 && (model == -1 || !CStreaming::HasModelLoaded(model)); i++) {
|
||||
int rnd = CGeneral::GetRandomNumberInRange(0, 1000);
|
||||
|
||||
if (rnd < pZone->copThreshold) {
|
||||
|
@ -606,14 +607,17 @@ CCarCtrl::ChooseModel(CZoneInfo* pZone, CVector* pPos, int* pClass) {
|
|||
continue;
|
||||
}
|
||||
|
||||
for (int i = 0; i < NUM_GANG_CAR_CLASSES; i++) {
|
||||
for (i = 0; i < NUM_GANG_CAR_CLASSES; i++) {
|
||||
if (rnd < pZone->gangThreshold[i]) {
|
||||
*pClass = i + FIRST_GANG_CAR_RATING;
|
||||
model = ChooseGangCarModel(i);
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i != NUM_GANG_CAR_CLASSES)
|
||||
continue;
|
||||
|
||||
*pClass = ChooseCarRating(pZone);
|
||||
model = ChooseCarModel(*pClass);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue