1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 15:30:00 +00:00

stats fix

This commit is contained in:
Nikolay Korolev 2020-04-06 19:31:08 +03:00
parent cf804dee91
commit 4f1d6123dd
3 changed files with 51 additions and 62 deletions

View file

@ -526,7 +526,7 @@ void CGarage::Update()
((CAutomobile*)(FindPlayerVehicle()))->m_pBombRigger = FindPlayerPed(); ((CAutomobile*)(FindPlayerVehicle()))->m_pBombRigger = FindPlayerPed();
if (m_eGarageType == GARAGE_BOMBSHOP3) if (m_eGarageType == GARAGE_BOMBSHOP3)
CGarages::GivePlayerDetonator(); CGarages::GivePlayerDetonator();
CStats::KgOfExplosivesUsed += KGS_OF_EXPLOSIVES_IN_BOMB; CStats::KgsOfExplosivesUsed += KGS_OF_EXPLOSIVES_IN_BOMB;
} }
switch (m_eGarageType) { switch (m_eGarageType) {
case GARAGE_BOMBSHOP1: case GARAGE_BOMBSHOP1:

View file

@ -105,17 +105,11 @@ void CStats::Init()
KillsSinceLastCheckpoint = 0; KillsSinceLastCheckpoint = 0;
TotalLegitimateKills = 0; TotalLegitimateKills = 0;
for (int i = 0; i < TOTAL_FASTEST_TIMES; i++) for (int i = 0; i < TOTAL_FASTEST_TIMES; i++)
{
FastestTimes[i] = 0; FastestTimes[i] = 0;
}
for (int i = 0; i < TOTAL_HIGHEST_SCORES; i++) for (int i = 0; i < TOTAL_HIGHEST_SCORES; i++)
{
HighestScores[i] = 0; HighestScores[i] = 0;
}
for (int i = 0; i < NUM_PEDTYPES; i++) for (int i = 0; i < NUM_PEDTYPES; i++)
{
PedsKilledOfThisType[i] = 0; PedsKilledOfThisType[i] = 0;
}
IndustrialPassed = 0; IndustrialPassed = 0;
CommercialPassed = 0; CommercialPassed = 0;
SuburbanPassed = 0; SuburbanPassed = 0;
@ -206,8 +200,6 @@ void CStats::SetTotalNumberMissions(int32 total)
TotalNumberMissions = total; TotalNumberMissions = total;
} }
//WRAPPER void CStats::Init() { EAXJMP(0x4AAC60); }
STARTPATCHES STARTPATCHES
InjectHook(0x48C5A3, CStats::Init, PATCH_JUMP); // CGame::ReInitGameObjectVariables InjectHook(0x48C5A3, CStats::Init, PATCH_JUMP); // CGame::ReInitGameObjectVariables
ENDPATCHES ENDPATCHES

View file

@ -62,8 +62,6 @@ public:
static int32 &CarsCrushed; static int32 &CarsCrushed;
static int32(&FastestTimes)[TOTAL_FASTEST_TIMES]; static int32(&FastestTimes)[TOTAL_FASTEST_TIMES];
static int32(&HighestScores)[TOTAL_HIGHEST_SCORES]; static int32(&HighestScores)[TOTAL_HIGHEST_SCORES];
static int32 &KgOfExplosivesUsed;
static int32 &CarsCrushed;
public: public:
static void RegisterFastestTime(int32, int32); static void RegisterFastestTime(int32, int32);
@ -85,6 +83,5 @@ public:
static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; }; static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; };
static void RegisterElBurroTime(int32); static void RegisterElBurroTime(int32);
static void SaveStats(uint8 *buf, uint32 *size); static void SaveStats(uint8 *buf, uint32 *size);
static void Init(void); static void Init(void);
}; };