summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-31 22:54:39 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-31 22:54:39 +0200
commite2ed4680189e1a0ef135c4f038eb72de7a67146e (patch)
treef136c0db19a92315aebb2c91a50cf5e2e1401e2e /src/vehicles
parentfix (diff)
parenttimebars (diff)
downloadre3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.tar
re3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.tar.gz
re3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.tar.bz2
re3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.tar.lz
re3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.tar.xz
re3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.tar.zst
re3-e2ed4680189e1a0ef135c4f038eb72de7a67146e.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)