summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-02-06 10:23:28 +0100
committeraap <aap@papnet.eu>2021-02-06 10:23:28 +0100
commitcc435ea71187b07a5dd1fbd817dcfb31c0230d7f (patch)
tree959c628cf50e7e6e157a8defd4d42c53ca190cf0 /src/control
parentfix generic.txd crash (diff)
parentfix (diff)
downloadre3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.tar
re3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.tar.gz
re3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.tar.bz2
re3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.tar.lz
re3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.tar.xz
re3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.tar.zst
re3-cc435ea71187b07a5dd1fbd817dcfb31c0230d7f.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/AutoPilot.cpp8
-rw-r--r--src/control/AutoPilot.h4
-rw-r--r--src/control/CarCtrl.cpp2
-rw-r--r--src/control/Script7.cpp4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/control/AutoPilot.cpp b/src/control/AutoPilot.cpp
index c956a6f1..d3de6ac2 100644
--- a/src/control/AutoPilot.cpp
+++ b/src/control/AutoPilot.cpp
@@ -52,8 +52,8 @@ void CAutoPilot::Save(uint8*& buf)
WriteSaveBuf<int32>(buf, m_nCurrentRouteNode);
WriteSaveBuf<int32>(buf, m_nNextRouteNode);
WriteSaveBuf<int32>(buf, m_nPrevRouteNode);
- WriteSaveBuf<uint32>(buf, m_nTimeEnteredCurve);
- WriteSaveBuf<uint32>(buf, m_nTimeToSpendOnCurrentCurve);
+ WriteSaveBuf<int32>(buf, m_nTimeEnteredCurve);
+ WriteSaveBuf<int32>(buf, m_nTimeToSpendOnCurrentCurve);
WriteSaveBuf<uint32>(buf, m_nCurrentPathNodeInfo);
WriteSaveBuf<uint32>(buf, m_nNextPathNodeInfo);
WriteSaveBuf<uint32>(buf, m_nPreviousPathNodeInfo);
@@ -95,8 +95,8 @@ void CAutoPilot::Load(uint8*& buf)
m_nCurrentRouteNode = ReadSaveBuf<int32>(buf);
m_nNextRouteNode = ReadSaveBuf<int32>(buf);
m_nPrevRouteNode = ReadSaveBuf<int32>(buf);
- m_nTimeEnteredCurve = ReadSaveBuf<uint32>(buf);
- m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<uint32>(buf);
+ m_nTimeEnteredCurve = ReadSaveBuf<int32>(buf);
+ m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<int32>(buf);
m_nCurrentPathNodeInfo = ReadSaveBuf<uint32>(buf);
m_nNextPathNodeInfo = ReadSaveBuf<uint32>(buf);
m_nPreviousPathNodeInfo = ReadSaveBuf<uint32>(buf);
diff --git a/src/control/AutoPilot.h b/src/control/AutoPilot.h
index aa14ccdd..ec3bb8d8 100644
--- a/src/control/AutoPilot.h
+++ b/src/control/AutoPilot.h
@@ -64,8 +64,8 @@ public:
int32 m_nCurrentRouteNode;
int32 m_nNextRouteNode;
int32 m_nPrevRouteNode;
- uint32 m_nTimeEnteredCurve;
- uint32 m_nTimeToSpendOnCurrentCurve;
+ int32 m_nTimeEnteredCurve;
+ int32 m_nTimeToSpendOnCurrentCurve;
uint32 m_nCurrentPathNodeInfo;
uint32 m_nNextPathNodeInfo;
uint32 m_nPreviousPathNodeInfo;
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index c6d78882..d05d9827 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2757,7 +2757,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane)
up.Normalise();
CVector forward(Cos(pPlane->m_fOrientation), Sin(pPlane->m_fOrientation), fForwardZ);
forward.Normalise();
- CVector right = CrossProduct(forward, up);
+ CVector right = CrossProduct(up, forward);
right.z -= 5.0f * pPlane->m_fPlaneSteer;
right.Normalise();
up = CrossProduct(forward, right);
diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp
index 34a364a7..71099cc4 100644
--- a/src/control/Script7.cpp
+++ b/src/control/Script7.cpp
@@ -431,12 +431,12 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
script_assert(pPed);
if (ScriptParams[1]) {
- pPed->bIsDucking = true;
+ pPed->bCrouchWhenShooting = true;
pPed->SetDuck(ScriptParams[2], true);
}
else {
pPed->ClearDuck(true);
- pPed->bIsDucking = false;
+ pPed->bCrouchWhenShooting = false;
}
return 0;
}