mirror of
https://github.com/GTAmodding/re3.git
synced 2025-01-18 07:36:35 +00:00
cea6b20c09
# Conflicts: # src/animation/CutsceneMgr.cpp # src/control/CarCtrl.cpp # src/control/Script.cpp # src/control/Script2.cpp # src/core/Frontend.cpp # src/core/main.cpp # src/entities/Physical.cpp # src/peds/Ped.cpp # src/peds/PedAI.cpp # src/text/Messages.cpp # src/vehicles/Cranes.cpp # src/vehicles/Transmission.cpp
29 lines
No EOL
865 B
C++
29 lines
No EOL
865 B
C++
#include "common.h"
|
|
|
|
#include "IniFile.h"
|
|
|
|
#include "CarCtrl.h"
|
|
#include "FileMgr.h"
|
|
#include "main.h"
|
|
#include "Population.h"
|
|
|
|
float CIniFile::PedNumberMultiplier = 0.6f;
|
|
float CIniFile::CarNumberMultiplier = 0.8f;
|
|
|
|
void CIniFile::LoadIniFile()
|
|
{
|
|
CFileMgr::SetDir("");
|
|
int f = CFileMgr::OpenFile("gta3.ini", "r");
|
|
if (f){
|
|
CFileMgr::ReadLine(f, gString, 200);
|
|
sscanf(gString, "%f", &PedNumberMultiplier);
|
|
PedNumberMultiplier = Min(3.0f, Max(0.5f, PedNumberMultiplier));
|
|
CFileMgr::ReadLine(f, gString, 200);
|
|
sscanf(gString, "%f", &CarNumberMultiplier);
|
|
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
|
|
CFileMgr::CloseFile(f);
|
|
}
|
|
CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier;
|
|
CPopulation::MaxNumberOfPedsInUseInterior = 40.0f * PedNumberMultiplier;
|
|
CCarCtrl::MaxNumberOfCarsInUse = 30.0f * CarNumberMultiplier;
|
|
} |