diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-03-17 19:03:13 +0100 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-03-21 12:58:54 +0100 |
commit | d5a6e17079ab87b946132155bbe37bd20e27c239 (patch) | |
tree | 87a72ec36821bb04d9c08ed0e5730c2393b8fcf4 /src/control/CarCtrl.cpp | |
parent | Merge pull request #346 from Sergeanur/Radar2 (diff) | |
download | re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.gz re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.bz2 re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.lz re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.xz re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.zst re3-d5a6e17079ab87b946132155bbe37bd20e27c239.zip |
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r-- | src/control/CarCtrl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index ab7a4aa1..de8c799e 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -596,10 +596,10 @@ CCarCtrl::ChooseCarModel(int32 vehclass) case TAXI: { if (TotalNumOfCarsOfRating[vehclass] == 0) - debug("ChooseCarModel : No cars of type %d have been declared\n"); + debug("ChooseCarModel : No cars of type %d have been declared\n", vehclass); model = CarArrays[vehclass][NextCarOfRating[vehclass]]; int32 total = TotalNumOfCarsOfRating[vehclass]; - NextCarOfRating[vehclass] += 1 + CGeneral::GetRandomNumberInRange(0, total - 1); + NextCarOfRating[vehclass] += CGeneral::GetRandomNumberInRange(1, total); while (NextCarOfRating[vehclass] >= total) NextCarOfRating[vehclass] -= total; //NextCarOfRating[vehclass] %= total; |