diff options
Diffstat (limited to 'src/control/AutoPilot.cpp')
-rw-r--r-- | src/control/AutoPilot.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/control/AutoPilot.cpp b/src/control/AutoPilot.cpp index 4038c93e..a899518b 100644 --- a/src/control/AutoPilot.cpp +++ b/src/control/AutoPilot.cpp @@ -6,6 +6,8 @@ #include "Curves.h" #include "PathFind.h" +//--MIAMI: file done + void CAutoPilot::ModifySpeed(float speed) { m_fMaxTrafficSpeed = Max(0.01f, speed); @@ -70,6 +72,9 @@ void CAutoPilot::Save(uint8*& buf) 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); uint8 flags = 0; if (m_bSlowedDownBecauseOfCars) flags |= BIT(0); if (m_bSlowedDownBecauseOfPeds) flags |= BIT(1); @@ -77,6 +82,7 @@ void CAutoPilot::Save(uint8*& buf) 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); @@ -109,12 +115,16 @@ void CAutoPilot::Load(uint8*& buf) m_nTimeTempAction = ReadSaveBuf<uint32>(buf); m_fMaxTrafficSpeed = ReadSaveBuf<float>(buf); m_nCruiseSpeed = ReadSaveBuf<uint8>(buf); + m_nCruiseSpeedMultiplierType = ReadSaveBuf<uint8>(buf); + SkipSaveBuf(buf, 2); + m_fCruiseSpeedMultiplier = ReadSaveBuf<float>(buf); uint8 flags = ReadSaveBuf<uint8>(buf); m_bSlowedDownBecauseOfCars = !!(flags & BIT(0)); m_bSlowedDownBecauseOfPeds = !!(flags & BIT(1)); m_bStayInCurrentLevel = !!(flags & BIT(2)); m_bStayInFastLane = !!(flags & BIT(3)); m_bIgnorePathfinding = !!(flags & BIT(4)); + m_nSwitchDistance = ReadSaveBuf<uint8>(buf); SkipSaveBuf(buf, 2); m_vecDestinationCoors.x = ReadSaveBuf<float>(buf); m_vecDestinationCoors.y = ReadSaveBuf<float>(buf); |