diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index 876840c4..53cebeea 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -1722,10 +1722,10 @@ void CGarage::FindDoorsEntities() { m_pDoor1 = nil; m_pDoor2 = nil; - int xstart = Max(0, CWorld::GetSectorIndexX(GetGarageCenterX())); - int xend = Min(NUMSECTORS_X - 1, CWorld::GetSectorIndexX(m_fSupX)); - int ystart = Max(0, CWorld::GetSectorIndexY(GetGarageCenterY())); - int yend = Min(NUMSECTORS_Y - 1, CWorld::GetSectorIndexY(m_fSupY)); + int xstart = Max(0, CWorld::GetSectorIndexX(GetGarageCenterX() - 100.0f)); + int xend = Min(NUMSECTORS_X - 1, CWorld::GetSectorIndexX(GetGarageCenterX() + 100.0f)); + int ystart = Max(0, CWorld::GetSectorIndexY(GetGarageCenterY() - 100.0f)); + int yend = Min(NUMSECTORS_Y - 1, CWorld::GetSectorIndexY(GetGarageCenterY() + 100.0f)); assert(xstart <= xend); assert(ystart <= yend); diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 5ff5a383..9d5e347b 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -4767,10 +4767,10 @@ void CRunningScript::Save(uint8*& buf) #endif for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++) WriteSaveBuf(buf, m_anLocalVariables[i]); + WriteSaveBuf(buf, m_bIsActive); WriteSaveBuf(buf, m_bCondResult); WriteSaveBuf(buf, m_bIsMissionScript); WriteSaveBuf(buf, m_bSkipWakeTime); - SkipSaveBuf(buf, 1); WriteSaveBuf(buf, m_nWakeTime); WriteSaveBuf(buf, m_nAndOrState); WriteSaveBuf(buf, m_bNotFlag); @@ -4802,10 +4802,10 @@ void CRunningScript::Load(uint8*& buf) #endif for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++) m_anLocalVariables[i] = ReadSaveBuf(buf); + m_bIsActive = ReadSaveBuf(buf); m_bCondResult = ReadSaveBuf(buf); m_bIsMissionScript = ReadSaveBuf(buf); m_bSkipWakeTime = ReadSaveBuf(buf); - SkipSaveBuf(buf, 1); m_nWakeTime = ReadSaveBuf(buf); m_nAndOrState = ReadSaveBuf(buf); m_bNotFlag = ReadSaveBuf(buf);