2019-08-06 23:32:19 +02:00
|
|
|
#include "common.h"
|
2020-04-17 15:31:11 +02:00
|
|
|
|
2019-08-06 23:32:19 +02:00
|
|
|
#include "IniFile.h"
|
|
|
|
|
|
|
|
#include "CarCtrl.h"
|
|
|
|
#include "FileMgr.h"
|
|
|
|
#include "main.h"
|
|
|
|
#include "Population.h"
|
|
|
|
|
2020-09-29 21:53:12 +02:00
|
|
|
// --MIAMI: file done
|
|
|
|
|
|
|
|
float CIniFile::PedNumberMultiplier = 0.6f;
|
|
|
|
float CIniFile::CarNumberMultiplier = 0.6f;
|
2019-08-06 23:32:19 +02:00
|
|
|
|
|
|
|
void CIniFile::LoadIniFile()
|
|
|
|
{
|
|
|
|
CFileMgr::SetDir("");
|
|
|
|
int f = CFileMgr::OpenFile("gta3.ini", "r");
|
|
|
|
if (f){
|
|
|
|
CFileMgr::ReadLine(f, gString, 200);
|
|
|
|
sscanf(gString, "%f", &PedNumberMultiplier);
|
2020-04-19 18:34:08 +02:00
|
|
|
PedNumberMultiplier = Min(3.0f, Max(0.5f, PedNumberMultiplier));
|
2019-08-06 23:32:19 +02:00
|
|
|
CFileMgr::ReadLine(f, gString, 200);
|
|
|
|
sscanf(gString, "%f", &CarNumberMultiplier);
|
2020-04-19 18:34:08 +02:00
|
|
|
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
|
2019-08-06 23:32:19 +02:00
|
|
|
CFileMgr::CloseFile(f);
|
|
|
|
}
|
|
|
|
CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier;
|
2020-09-29 21:53:12 +02:00
|
|
|
CPopulation::MaxNumberOfPedsInUseInterior = 40.0f * PedNumberMultiplier;
|
2019-08-06 23:32:19 +02:00
|
|
|
CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier;
|
|
|
|
}
|