summaryrefslogtreecommitdiffstats
path: root/src/control/AutoPilot.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-12 03:13:22 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-12 03:13:22 +0200
commit55d30a11ec04200091db0e29a44ceec6522fedfb (patch)
treeb8a5bdbd323615ae8ea250174e8f22b7e9ab5f18 /src/control/AutoPilot.cpp
parentMerge remote-tracking branch 'origin/miami' into lcs (diff)
parentReorganize config.h (diff)
downloadre3-55d30a11ec04200091db0e29a44ceec6522fedfb.tar
re3-55d30a11ec04200091db0e29a44ceec6522fedfb.tar.gz
re3-55d30a11ec04200091db0e29a44ceec6522fedfb.tar.bz2
re3-55d30a11ec04200091db0e29a44ceec6522fedfb.tar.lz
re3-55d30a11ec04200091db0e29a44ceec6522fedfb.tar.xz
re3-55d30a11ec04200091db0e29a44ceec6522fedfb.tar.zst
re3-55d30a11ec04200091db0e29a44ceec6522fedfb.zip
Diffstat (limited to 'src/control/AutoPilot.cpp')
-rw-r--r--src/control/AutoPilot.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/control/AutoPilot.cpp b/src/control/AutoPilot.cpp
index db72548f..d7c17a68 100644
--- a/src/control/AutoPilot.cpp
+++ b/src/control/AutoPilot.cpp
@@ -50,45 +50,45 @@ void CAutoPilot::RemoveOnePathNode()
#ifdef COMPATIBLE_SAVES
void CAutoPilot::Save(uint8*& buf)
{
- WriteSaveBuf<int32>(buf, m_nCurrentRouteNode);
- WriteSaveBuf<int32>(buf, m_nNextRouteNode);
- WriteSaveBuf<int32>(buf, m_nPrevRouteNode);
- 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);
- WriteSaveBuf<uint32>(buf, m_nAntiReverseTimer);
- WriteSaveBuf<uint32>(buf, m_nTimeToStartMission);
- WriteSaveBuf<int8>(buf, m_nPreviousDirection);
- WriteSaveBuf<int8>(buf, m_nCurrentDirection);
- WriteSaveBuf<int8>(buf, m_nNextDirection);
- WriteSaveBuf<int8>(buf, m_nCurrentLane);
- WriteSaveBuf<int8>(buf, m_nNextLane);
- WriteSaveBuf<uint8>(buf, m_nDrivingStyle);
- WriteSaveBuf<uint8>(buf, m_nCarMission);
- WriteSaveBuf<uint8>(buf, m_nTempAction);
- WriteSaveBuf<uint32>(buf, m_nTimeTempAction);
- WriteSaveBuf<float>(buf, m_fMaxTrafficSpeed);
- WriteSaveBuf<uint8>(buf, m_nCruiseSpeed);
- WriteSaveBuf<uint8>(buf, m_nCruiseSpeedMultiplierType);
- SkipSaveBuf(buf, 2);
- WriteSaveBuf<float>(buf, m_fCruiseSpeedMultiplier);
+ WriteSaveBuf(buf, m_nCurrentRouteNode);
+ WriteSaveBuf(buf, m_nNextRouteNode);
+ WriteSaveBuf(buf, m_nPrevRouteNode);
+ WriteSaveBuf(buf, m_nTimeEnteredCurve);
+ WriteSaveBuf(buf, m_nTimeToSpendOnCurrentCurve);
+ WriteSaveBuf(buf, m_nCurrentPathNodeInfo);
+ WriteSaveBuf(buf, m_nNextPathNodeInfo);
+ WriteSaveBuf(buf, m_nPreviousPathNodeInfo);
+ WriteSaveBuf(buf, m_nAntiReverseTimer);
+ WriteSaveBuf(buf, m_nTimeToStartMission);
+ WriteSaveBuf(buf, m_nPreviousDirection);
+ WriteSaveBuf(buf, m_nCurrentDirection);
+ WriteSaveBuf(buf, m_nNextDirection);
+ WriteSaveBuf(buf, m_nCurrentLane);
+ WriteSaveBuf(buf, m_nNextLane);
+ WriteSaveBuf(buf, m_nDrivingStyle);
+ WriteSaveBuf(buf, m_nCarMission);
+ WriteSaveBuf(buf, m_nTempAction);
+ WriteSaveBuf(buf, m_nTimeTempAction);
+ WriteSaveBuf(buf, m_fMaxTrafficSpeed);
+ WriteSaveBuf(buf, m_nCruiseSpeed);
+ WriteSaveBuf(buf, m_nCruiseSpeedMultiplierType);
+ ZeroSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_fCruiseSpeedMultiplier);
uint8 flags = 0;
if (m_bSlowedDownBecauseOfCars) flags |= BIT(0);
if (m_bSlowedDownBecauseOfPeds) flags |= BIT(1);
if (m_bStayInCurrentLevel) flags |= BIT(2);
if (m_bStayInFastLane) flags |= BIT(3);
if (m_bIgnorePathfinding) flags |= BIT(4);
- WriteSaveBuf<uint8>(buf, flags);
- WriteSaveBuf<uint8>(buf, m_nSwitchDistance);
- SkipSaveBuf(buf, 2);
- WriteSaveBuf<float>(buf, m_vecDestinationCoors.x);
- WriteSaveBuf<float>(buf, m_vecDestinationCoors.y);
- WriteSaveBuf<float>(buf, m_vecDestinationCoors.z);
- SkipSaveBuf(buf, 32);
- WriteSaveBuf<int16>(buf, m_nPathFindNodesCount);
- SkipSaveBuf(buf, 6);
+ WriteSaveBuf(buf, flags);
+ WriteSaveBuf(buf, m_nSwitchDistance);
+ ZeroSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_vecDestinationCoors.x);
+ WriteSaveBuf(buf, m_vecDestinationCoors.y);
+ WriteSaveBuf(buf, m_vecDestinationCoors.z);
+ ZeroSaveBuf(buf, 32);
+ WriteSaveBuf(buf, m_nPathFindNodesCount);
+ ZeroSaveBuf(buf, 6);
}
void CAutoPilot::Load(uint8*& buf)