summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-15 12:53:42 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-02-15 12:53:42 +0100
commit043efaf082a8ce5010e6ff974afea05d8d66e9d1 (patch)
tree40115f81c6a4b4756743a36485eacd4b7a5607b9 /src/core
parentMerge branch 'master' of https://github.com/Nick007J/re3 (diff)
downloadre3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar
re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.gz
re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.bz2
re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.lz
re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.xz
re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.zst
re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Stats.cpp6
-rw-r--r--src/core/Stats.h2
-rw-r--r--src/core/World.cpp1
-rw-r--r--src/core/World.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index c1259f82..cd5bee06 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -32,8 +32,14 @@ int32 &CStats::MissionsGiven = *(int32*)0x9430E8;
int32 &CStats::MissionsPassed = *(int32*)0x940768;
char(&CStats::LastMissionPassedName)[8] = *(char(*)[8])*(uintptr*)0x70D828;
int32 &CStats::TotalLegitimateKills = *(int32*)0x8F6004;
+int32 &CStats::ElBurroTime = *(int32*)0x8E2A6C;
void CStats::AnotherKillFrenzyPassed()
{
++NumberKillFrenziesPassed;
}
+
+void CStats::RegisterElBurroTime(int32 time)
+{
+ ElBurroTime = (ElBurroTime && ElBurroTime < time) ? ElBurroTime : time;
+}
diff --git a/src/core/Stats.h b/src/core/Stats.h
index 3e7973ea..e1ef3749 100644
--- a/src/core/Stats.h
+++ b/src/core/Stats.h
@@ -34,9 +34,11 @@ public:
static int32 &MissionsPassed;
static char (&LastMissionPassedName)[8];
static int32 &TotalLegitimateKills;
+ static int32 &ElBurroTime;
public:
static void AnotherKillFrenzyPassed();
static void CheckPointReachedUnsuccessfully() { KillsSinceLastCheckpoint = 0; };
static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; };
+ static void RegisterElBurroTime(int32);
}; \ No newline at end of file
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 950943ad..d026e971 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -49,6 +49,7 @@ WRAPPER void CWorld::FindObjectsIntersectingAngledCollisionBox(const CColBox &,
WRAPPER void CWorld::FindObjectsOfTypeInRange(uint32, CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool) { EAXJMP(0x4B2600); }
WRAPPER void CWorld::FindObjectsOfTypeInRangeSectorList(uint32, CPtrList&, CVector&, float, bool, short*, short, CEntity**) { EAXJMP(0x4B2960); }
WRAPPER void CWorld::FindMissionEntitiesIntersectingCube(const CVector&, const CVector&, int16*, int16, CEntity**, bool, bool, bool) { EAXJMP(0x4B3680); }
+WRAPPER void CWorld::ClearCarsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B50E0); }
void
CWorld::Initialise()
diff --git a/src/core/World.h b/src/core/World.h
index 8111746e..68af156c 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -115,6 +115,7 @@ public:
static void FindObjectsIntersectingCube(const CVector &, const CVector &, int16*, int16, CEntity **, bool, bool, bool, bool, bool);
static void FindObjectsIntersectingAngledCollisionBox(const CColBox &, const CMatrix &, const CVector &, float, float, float, float, int16*, int16, CEntity **, bool, bool, bool, bool, bool);
static void FindMissionEntitiesIntersectingCube(const CVector&, const CVector&, int16*, int16, CEntity**, bool, bool, bool);
+ static void ClearCarsFromArea(float, float, float, float, float, float);
static float GetSectorX(float f) { return ((f - WORLD_MIN_X)/SECTOR_SIZE_X); }
static float GetSectorY(float f) { return ((f - WORLD_MIN_Y)/SECTOR_SIZE_Y); }