blob: 744f4bd08f2f22e4de94a2882d46acab28cd555e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "common.h"
#include "patcher.h"
#include "IniFile.h"
#include "CarCtrl.h"
#include "FileMgr.h"
#include "main.h"
#include "Population.h"
float CIniFile::PedNumberMultiplier = 1.0f;// = *(float*)0x6182F4;
float CIniFile::CarNumberMultiplier = 1.0f;// = *(float*)0x6182F8;
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;
CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier;
}
|