summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-12 19:31:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-12 19:31:23 +0200
commitdc444b9ca06efd32eb624e5da063cfec309a086a (patch)
tree0d39d226b09d29ffabc1c8ba37573198772a2646 /src/core
parentfix garages (diff)
parentCClouds; disabled object clipping for SA cam (diff)
downloadre3-dc444b9ca06efd32eb624e5da063cfec309a086a.tar
re3-dc444b9ca06efd32eb624e5da063cfec309a086a.tar.gz
re3-dc444b9ca06efd32eb624e5da063cfec309a086a.tar.bz2
re3-dc444b9ca06efd32eb624e5da063cfec309a086a.tar.lz
re3-dc444b9ca06efd32eb624e5da063cfec309a086a.tar.xz
re3-dc444b9ca06efd32eb624e5da063cfec309a086a.tar.zst
re3-dc444b9ca06efd32eb624e5da063cfec309a086a.zip
Diffstat (limited to '')
-rw-r--r--src/core/Cam.cpp4
-rw-r--r--src/core/Game.cpp7
-rw-r--r--src/core/Game.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 3357c5c0..30336423 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -5101,7 +5101,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
CColPoint foundCol;
CEntity* foundEnt;
CWorld::pIgnoreEntity = CamTargetEntity;
- if (CWorld::ProcessLineOfSight(TargetCoors, Source, foundCol, foundEnt, true, dontCollideWithCars < 0.1f, false, true, false, true, false)) {
+ if (CWorld::ProcessLineOfSight(TargetCoors, Source, foundCol, foundEnt, true, dontCollideWithCars < 0.1f, false, false, false, true, false)) {
float obstacleTargetDist = (TargetCoors - foundCol.point).Magnitude();
float obstacleCamDist = newDistance - obstacleTargetDist;
if (!foundEnt->IsPed() || obstacleCamDist <= 1.0f) {
@@ -5110,7 +5110,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
RwCameraSetNearClipPlane(Scene.camera, Max(0.05f, obstacleTargetDist - 0.3f));
}
} else {
- if (!CWorld::ProcessLineOfSight(foundCol.point, Source, foundCol, foundEnt, true, dontCollideWithCars < 0.1f, false, true, false, true, false)) {
+ if (!CWorld::ProcessLineOfSight(foundCol.point, Source, foundCol, foundEnt, true, dontCollideWithCars < 0.1f, false, false, false, true, false)) {
float lessClip = obstacleCamDist - 0.35f;
if (lessClip <= DEFAULT_NEAR)
RwCameraSetNearClipPlane(Scene.camera, lessClip);
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 2ba3ae3a..6a6b31e7 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -661,6 +661,13 @@ void CGame::Process(void)
}
}
+bool
+CGame::CanSeeOutSideFromCurrArea(void)
+{
+ return currArea == AREA_MAIN_MAP || currArea == AREA_MALL ||
+ currArea == AREA_MANSION || currArea == AREA_HOTEL;
+}
+
void CGame::DrasticTidyUpMemory(bool)
{
#ifdef PS2
diff --git a/src/core/Game.h b/src/core/Game.h
index ed9ded4f..6efacf8d 100644
--- a/src/core/Game.h
+++ b/src/core/Game.h
@@ -60,6 +60,7 @@ public:
static void Process(void);
static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; }
+ static bool CanSeeOutSideFromCurrArea(void);
// NB: these do something on PS2
static void TidyUpMemory(bool, bool);