summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-03-31 04:54:19 +0200
committereray orçunus <erayorcunus@gmail.com>2020-03-31 05:05:49 +0200
commit5e2fe749bd7620522168c9cd3dc469f70ac49e5a (patch)
treed87db4ec81411477066901fd30c67f79d153c801 /src/vehicles
parentMerge pull request #366 from Nick007J/master (diff)
downloadre3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.gz
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.bz2
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.lz
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.xz
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.zst
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index e709a87f..aca96aa3 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -2339,10 +2339,17 @@ CAutomobile::FireTruckControl(void)
if(this == FindPlayerVehicle()){
if(!CPad::GetPad(0)->GetWeapon())
return;
- m_fCarGunLR += CPad::GetPad(0)->GetCarGunLeftRight()*0.00025f*CTimer::GetTimeStep();
- m_fCarGunUD += CPad::GetPad(0)->GetCarGunUpDown()*0.0001f*CTimer::GetTimeStep();
+#ifdef FREE_CAM
+ extern bool bFreeMouseCam;
+ if (!bFreeMouseCam)
+#endif
+ {
+ m_fCarGunLR += CPad::GetPad(0)->GetCarGunLeftRight() * 0.00025f * CTimer::GetTimeStep();
+ m_fCarGunUD += CPad::GetPad(0)->GetCarGunUpDown() * 0.0001f * CTimer::GetTimeStep();
+ }
m_fCarGunUD = clamp(m_fCarGunUD, 0.05f, 0.3f);
+
CVector cannonPos(0.0f, 1.5f, 1.9f);
cannonPos = GetMatrix() * cannonPos;
CVector cannonDir(
@@ -2408,7 +2415,12 @@ CAutomobile::TankControl(void)
// Rotate turret
float prevAngle = m_fCarGunLR;
- m_fCarGunLR -= CPad::GetPad(0)->GetCarGunLeftRight() * 0.00015f * CTimer::GetTimeStep();
+#ifdef FREE_CAM
+ extern bool bFreeMouseCam;
+ if(!bFreeMouseCam)
+#endif
+ m_fCarGunLR -= CPad::GetPad(0)->GetCarGunLeftRight() * 0.00015f * CTimer::GetTimeStep();
+
if(m_fCarGunLR < 0.0f)
m_fCarGunLR += TWOPI;
if(m_fCarGunLR > TWOPI)