summaryrefslogtreecommitdiffstats
path: root/src/core/Cam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Cam.cpp')
-rw-r--r--src/core/Cam.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 1d73a272..f43ff57a 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -193,7 +193,7 @@ CCam::Process(void)
break;
case MODE_CAM_ON_A_STRING:
#ifdef FREE_CAM
- if(CCamera::bFreeCam)
+ if(CCamera::bFreeCam && !CVehicle::bCheat5)
Process_FollowCar_SA(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
else
#endif
@@ -946,7 +946,7 @@ CVector
CCam::DoAverageOnVector(const CVector &vec)
{
int i;
- CVector Average = { 0.0f, 0.0f, 0.0f };
+ CVector Average(0.0f, 0.0f, 0.0f);
if(ResetStatics){
m_iRunningVectorArrayPos = 0;
@@ -3829,11 +3829,11 @@ CCam::Process_Debug(const CVector&, float, float, float)
}
// stay inside sectors
- while(CWorld::GetSectorX(Source.x) > 95.0f)
+ while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f)
Source.x -= 1.0f;
while(CWorld::GetSectorX(Source.x) < 5.0f)
Source.x += 1.0f;
- while(CWorld::GetSectorY(Source.y) > 95.0f)
+ while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f)
Source.y -= 1.0f;
while(CWorld::GetSectorY(Source.y) < 5.0f)
Source.y += 1.0f;
@@ -3900,11 +3900,11 @@ CCam::Process_Debug(const CVector&, float, float, float)
}
// stay inside sectors
- while(CWorld::GetSectorX(Source.x) > 95.0f)
+ while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f)
Source.x -= 1.0f;
while(CWorld::GetSectorX(Source.x) < 5.0f)
Source.x += 1.0f;
- while(CWorld::GetSectorY(Source.y) > 95.0f)
+ while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f)
Source.y -= 1.0f;
while(CWorld::GetSectorY(Source.y) < 5.0f)
Source.y += 1.0f;
@@ -3981,11 +3981,11 @@ CCam::Process_Editor(const CVector&, float, float, float)
}
// stay inside sectors
- while(CWorld::GetSectorX(Source.x) > 95.0f)
+ while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f)
Source.x -= 1.0f;
while(CWorld::GetSectorX(Source.x) < 5.0f)
Source.x += 1.0f;
- while(CWorld::GetSectorY(Source.y) > 95.0f)
+ while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f)
Source.y -= 1.0f;
while(CWorld::GetSectorY(Source.y) < 5.0f)
Source.y += 1.0f;
@@ -5039,11 +5039,15 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
// Using GetCarGun(LR/UD) will give us same unprocessed RightStick value as SA
float stickX = -(pad->GetCarGunLeftRight());
- float stickY = pad->GetCarGunUpDown();
+ float stickY = -pad->GetCarGunUpDown();
// In SA this is for not let num2/num8 move camera when Keyboard & Mouse controls are used.
// if (CCamera::m_bUseMouse3rdPerson)
// stickY = 0.0f;
+#ifdef INVERT_LOOK_FOR_PAD
+ if (CPad::bInvertLook4Pad)
+ stickY = -stickY;
+#endif
float xMovement = Abs(stickX) * (FOV / 80.0f * 5.f / 70.f) * stickX * 0.007f * 0.007f;
float yMovement = Abs(stickY) * (FOV / 80.0f * 3.f / 70.f) * stickY * 0.007f * 0.007f;