summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp10
-rw-r--r--src/core/Camera.h3
-rw-r--r--src/core/Explosion.cpp1
-rw-r--r--src/core/Explosion.h1
-rw-r--r--src/core/Stats.cpp1
-rw-r--r--src/core/Stats.h1
-rw-r--r--src/core/World.cpp8
-rw-r--r--src/core/World.h6
-rw-r--r--src/core/config.h1
9 files changed, 30 insertions, 2 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 3ab7d742..1aee4edb 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -33,6 +33,8 @@ WRAPPER void CCamera::LoadPathSplines(int file) { EAXJMP(0x46D1D0); }
WRAPPER uint32 CCamera::GetCutSceneFinishTime(void) { EAXJMP(0x46B920); }
WRAPPER void CCamera::FinishCutscene(void) { EAXJMP(0x46B560); }
WRAPPER void CCamera::RestoreWithJumpCut(void) { EAXJMP(0x46FAE0); };
+WRAPPER void CCamera::SetZoomValueFollowPedScript(int16) { EAXJMP(0x46FF30); }
+WRAPPER void CCamera::SetZoomValueCamStringScript(int16) { EAXJMP(0x46FF90); }
bool
CCamera::GetFading()
@@ -1357,6 +1359,14 @@ void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString()
m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
}
+void CCamera::SetCameraDirectlyBehindForFollowPed_CamOnAString()
+{
+ m_bCamDirectlyBehind = true;
+ CPlayerPed *player = FindPlayerPed();
+ if (player)
+ m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
+}
+
void
CCamera::SetWideScreenOn(void)
{
diff --git a/src/core/Camera.h b/src/core/Camera.h
index 46c25436..81eaa84f 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -491,6 +491,9 @@ int m_iModeObbeCamIsInForCar;
void TakeControlWithSpline(short);
void RestoreWithJumpCut(void);
void SetCameraDirectlyInFrontForFollowPed_CamOnAString(void);
+ void SetCameraDirectlyBehindForFollowPed_CamOnAString(void);
+ void SetZoomValueFollowPedScript(int16);
+ void SetZoomValueCamStringScript(int16);
void dtor(void) { this->CCamera::~CCamera(); }
};
diff --git a/src/core/Explosion.cpp b/src/core/Explosion.cpp
index 30809dc9..7a8878f6 100644
--- a/src/core/Explosion.cpp
+++ b/src/core/Explosion.cpp
@@ -4,6 +4,7 @@
WRAPPER void CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32) { EAXJMP(0x5591C0); }
WRAPPER void CExplosion::RemoveAllExplosionsInArea(CVector, float) { EAXJMP(0x55AD40); }
+WRAPPER bool CExplosion::TestForExplosionInArea(eExplosionType, float, float, float, float, float, float) { EAXJMP(0x55AC80); }
WRAPPER
int8 CExplosion::GetExplosionActiveCounter(uint8 id)
diff --git a/src/core/Explosion.h b/src/core/Explosion.h
index 0768bbe4..e85f7892 100644
--- a/src/core/Explosion.h
+++ b/src/core/Explosion.h
@@ -28,4 +28,5 @@ public:
static uint8 GetExplosionType(uint8 id);
static void ResetExplosionActiveCounter(uint8 id);
static void RemoveAllExplosionsInArea(CVector, float);
+ static bool TestForExplosionInArea(eExplosionType, float, float, float, float, float, float);
};
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index 17c3d9d7..fd6ba602 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -5,6 +5,7 @@ int32 &CStats::DaysPassed = *(int32*)0x8F2BB8;
int32 &CStats::HeadsPopped = *(int32*)0x8F647C;
bool& CStats::CommercialPassed = *(bool*)0x8F4334;
bool& CStats::IndustrialPassed = *(bool*)0x8E2A68;
+bool& CStats::SuburbanPassed = *(bool*)0x8F2740;
int32 &CStats::NumberKillFrenziesPassed = *(int32*)0x8E287C;
int32 &CStats::PeopleKilledByOthers = *(int32*)0x8E2C50;
int32 &CStats::HelisDestroyed = *(int32*)0x8E2A64;
diff --git a/src/core/Stats.h b/src/core/Stats.h
index add4320b..8feb3c13 100644
--- a/src/core/Stats.h
+++ b/src/core/Stats.h
@@ -7,6 +7,7 @@ public:
static int32 &HeadsPopped;
static bool& CommercialPassed;
static bool& IndustrialPassed;
+ static bool& SuburbanPassed;
static int32 &NumberKillFrenziesPassed;
static int32 &PeopleKilledByOthers;
static int32 &HelisDestroyed;
diff --git a/src/core/World.cpp b/src/core/World.cpp
index dac64970..0b389e42 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -44,6 +44,10 @@ WRAPPER void CWorld::RemoveStaticObjects() { EAXJMP(0x4B4D50); }
WRAPPER void CWorld::RemoveReferencesToDeletedObject(CEntity*) { EAXJMP(0x4B3BF0); }
WRAPPER void CWorld::FindObjectsKindaColliding(const CVector &, float, bool, int16*, int16, CEntity **, bool, bool, bool, bool, bool){ EAXJMP(0x4B2A30); }
WRAPPER void CWorld::ClearExcitingStuffFromArea(const CVector &pos, float radius, uint8) { EAXJMP(0x4B4E70) };
+WRAPPER void CWorld::FindObjectsIntersectingCube(const CVector &, const CVector &, int16*, int16, CEntity **, bool, bool, bool, bool, bool) { EAXJMP(0x4B2E70); }
+WRAPPER void CWorld::FindObjectsIntersectingAngledCollisionBox(const CColBox &, const CMatrix &, const CVector &, float, float, float, float, int16*, int16, CEntity **, bool, bool, bool, bool, bool) { EAXJMP(0x4B3280); }
+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); }
void
CWorld::Initialise()
@@ -960,7 +964,7 @@ CWorld::RemoveFallenPeds(void)
for(int poolIndex = poolSize-1; poolIndex >= 0; poolIndex--) {
CPed *ped = CPools::GetPedPool()->GetSlot(poolIndex);
if (ped) {
- if (ped->GetPosition().z < -100.0f) {
+ if (ped->GetPosition().z < MAP_Z_LOW_LIMIT) {
if (ped->CharCreatedBy != RANDOM_CHAR || ped->IsPlayer()) {
int closestNode = ThePaths.FindNodeClosestToCoors(ped->GetPosition(), PATH_PED, 999999.9f, false, false);
CVector newPos = ThePaths.m_pathNodes[closestNode].pos;
@@ -982,7 +986,7 @@ CWorld::RemoveFallenCars(void)
for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
CVehicle* veh = CPools::GetVehiclePool()->GetSlot(poolIndex);
if (veh) {
- if (veh->GetPosition().z < -100.0f) {
+ if (veh->GetPosition().z < MAP_Z_LOW_LIMIT) {
if (veh->VehicleCreatedBy == MISSION_VEHICLE || veh == FindPlayerVehicle() || (veh->pDriver && veh->pDriver->IsPlayer())) {
int closestNode = ThePaths.FindNodeClosestToCoors(veh->GetPosition(), PATH_CAR, 999999.9f, false, false);
CVector newPos = ThePaths.m_pathNodes[closestNode].pos;
diff --git a/src/core/World.h b/src/core/World.h
index 119c6324..61a44ea0 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -22,6 +22,8 @@
#define WORLD_MAX_X (WORLD_MIN_X + WORLD_SIZE_X)
#define WORLD_MAX_Y (WORLD_MIN_Y + WORLD_SIZE_Y)
+#define MAP_Z_LOW_LIMIT -100.0f
+
enum
{
ENTITYLIST_BUILDINGS,
@@ -103,11 +105,15 @@ public:
static CEntity *TestSphereAgainstSectorList(CPtrList&, CVector, float, CEntity*, bool);
static void FindObjectsInRangeSectorList(CPtrList&, CVector&, float, bool, short*, short, CEntity**);
static void FindObjectsInRange(CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool);
+ static void FindObjectsOfTypeInRangeSectorList(uint32, CPtrList&, CVector&, float, bool, short*, short, CEntity**);
+ static void FindObjectsOfTypeInRange(uint32, CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool);
static float FindGroundZForCoord(float x, float y);
static float FindGroundZFor3DCoord(float x, float y, float z, bool *found);
static float FindRoofZFor3DCoord(float x, float y, float z, bool *found);
static void RemoveReferencesToDeletedObject(CEntity*);
static void FindObjectsKindaColliding(const CVector &, float, bool, int16*, int16, CEntity **, bool, bool, bool, bool, bool);
+ 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 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); }
diff --git a/src/core/config.h b/src/core/config.h
index 166c2a68..80176fca 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -85,6 +85,7 @@ enum Config {
NUM_ACCIDENTS = 20,
NUM_FIRES = 40,
+ NUM_GARAGES = 32,
NUMPEDROUTES = 200,
NUMPHONES = 50,