mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 16:50:07 +00:00
fixed some bugs (saves might be broken though)
This commit is contained in:
parent
d89d3db126
commit
56ea1c7be7
|
@ -1722,10 +1722,10 @@ void CGarage::FindDoorsEntities()
|
||||||
{
|
{
|
||||||
m_pDoor1 = nil;
|
m_pDoor1 = nil;
|
||||||
m_pDoor2 = nil;
|
m_pDoor2 = nil;
|
||||||
int xstart = Max(0, CWorld::GetSectorIndexX(GetGarageCenterX()));
|
int xstart = Max(0, CWorld::GetSectorIndexX(GetGarageCenterX() - 100.0f));
|
||||||
int xend = Min(NUMSECTORS_X - 1, CWorld::GetSectorIndexX(m_fSupX));
|
int xend = Min(NUMSECTORS_X - 1, CWorld::GetSectorIndexX(GetGarageCenterX() + 100.0f));
|
||||||
int ystart = Max(0, CWorld::GetSectorIndexY(GetGarageCenterY()));
|
int ystart = Max(0, CWorld::GetSectorIndexY(GetGarageCenterY() - 100.0f));
|
||||||
int yend = Min(NUMSECTORS_Y - 1, CWorld::GetSectorIndexY(m_fSupY));
|
int yend = Min(NUMSECTORS_Y - 1, CWorld::GetSectorIndexY(GetGarageCenterY() + 100.0f));
|
||||||
assert(xstart <= xend);
|
assert(xstart <= xend);
|
||||||
assert(ystart <= yend);
|
assert(ystart <= yend);
|
||||||
|
|
||||||
|
|
|
@ -4767,10 +4767,10 @@ void CRunningScript::Save(uint8*& buf)
|
||||||
#endif
|
#endif
|
||||||
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
||||||
WriteSaveBuf<int32>(buf, m_anLocalVariables[i]);
|
WriteSaveBuf<int32>(buf, m_anLocalVariables[i]);
|
||||||
|
WriteSaveBuf<bool>(buf, m_bIsActive);
|
||||||
WriteSaveBuf<bool>(buf, m_bCondResult);
|
WriteSaveBuf<bool>(buf, m_bCondResult);
|
||||||
WriteSaveBuf<bool>(buf, m_bIsMissionScript);
|
WriteSaveBuf<bool>(buf, m_bIsMissionScript);
|
||||||
WriteSaveBuf<bool>(buf, m_bSkipWakeTime);
|
WriteSaveBuf<bool>(buf, m_bSkipWakeTime);
|
||||||
SkipSaveBuf(buf, 1);
|
|
||||||
WriteSaveBuf<uint32>(buf, m_nWakeTime);
|
WriteSaveBuf<uint32>(buf, m_nWakeTime);
|
||||||
WriteSaveBuf<uint16>(buf, m_nAndOrState);
|
WriteSaveBuf<uint16>(buf, m_nAndOrState);
|
||||||
WriteSaveBuf<bool>(buf, m_bNotFlag);
|
WriteSaveBuf<bool>(buf, m_bNotFlag);
|
||||||
|
@ -4802,10 +4802,10 @@ void CRunningScript::Load(uint8*& buf)
|
||||||
#endif
|
#endif
|
||||||
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
|
||||||
m_anLocalVariables[i] = ReadSaveBuf<int32>(buf);
|
m_anLocalVariables[i] = ReadSaveBuf<int32>(buf);
|
||||||
|
m_bIsActive = ReadSaveBuf<bool>(buf);
|
||||||
m_bCondResult = ReadSaveBuf<bool>(buf);
|
m_bCondResult = ReadSaveBuf<bool>(buf);
|
||||||
m_bIsMissionScript = ReadSaveBuf<bool>(buf);
|
m_bIsMissionScript = ReadSaveBuf<bool>(buf);
|
||||||
m_bSkipWakeTime = ReadSaveBuf<bool>(buf);
|
m_bSkipWakeTime = ReadSaveBuf<bool>(buf);
|
||||||
SkipSaveBuf(buf, 1);
|
|
||||||
m_nWakeTime = ReadSaveBuf<uint32>(buf);
|
m_nWakeTime = ReadSaveBuf<uint32>(buf);
|
||||||
m_nAndOrState = ReadSaveBuf<uint16>(buf);
|
m_nAndOrState = ReadSaveBuf<uint16>(buf);
|
||||||
m_bNotFlag = ReadSaveBuf<bool>(buf);
|
m_bNotFlag = ReadSaveBuf<bool>(buf);
|
||||||
|
|
Loading…
Reference in a new issue