summaryrefslogtreecommitdiffstats
path: root/src/control/Script5.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-20 10:12:56 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-20 10:12:56 +0100
commitb4b4c996baa3525c96a53a2a48c879bc87842310 (patch)
treee5366d590e465f78165e2e9978f082683769dfa5 /src/control/Script5.cpp
parentMerge remote-tracking branch 'upstream/lcs' into lcs (diff)
parentscript fixes (diff)
downloadre3-b4b4c996baa3525c96a53a2a48c879bc87842310.tar
re3-b4b4c996baa3525c96a53a2a48c879bc87842310.tar.gz
re3-b4b4c996baa3525c96a53a2a48c879bc87842310.tar.bz2
re3-b4b4c996baa3525c96a53a2a48c879bc87842310.tar.lz
re3-b4b4c996baa3525c96a53a2a48c879bc87842310.tar.xz
re3-b4b4c996baa3525c96a53a2a48c879bc87842310.tar.zst
re3-b4b4c996baa3525c96a53a2a48c879bc87842310.zip
Diffstat (limited to 'src/control/Script5.cpp')
-rw-r--r--src/control/Script5.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index bddcac62..74d187ca 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -2222,9 +2222,13 @@ INITSAVEBUF
script_assert(ReadSaveBuf<uint32>(buf) == SCRIPT_DATA_SIZE);
OnAMissionFlag = ReadSaveBuf<uint32>(buf);
LastMissionPassedTime = ReadSaveBuf<uint32>(buf);
+ for (uint32 i = 0; i < MAX_NUM_COLLECTIVES; i++)
+ CollectiveArray[i] = ReadSaveBuf<tCollectiveData>(buf);
+ NextFreeCollectiveIndex = ReadSaveBuf<int32>(buf);
for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) {
uint32 type = ReadSaveBuf<uint32>(buf);
uint32 handle = ReadSaveBuf<uint32>(buf);
+ /*
switch (type) {
case 0:
BuildingSwapArray[i].m_pBuilding = nil;
@@ -2238,14 +2242,18 @@ INITSAVEBUF
default:
script_assert(false);
}
- BuildingSwapArray[i].m_nNewModel = ReadSaveBuf<uint32>(buf);
- BuildingSwapArray[i].m_nOldModel = ReadSaveBuf<uint32>(buf);
+ */
+ /*BuildingSwapArray[i].m_nNewModel = */ReadSaveBuf<uint32>(buf);
+ /*BuildingSwapArray[i].m_nOldModel = */ReadSaveBuf<uint32>(buf);
+ /*
if (BuildingSwapArray[i].m_pBuilding)
BuildingSwapArray[i].m_pBuilding->ReplaceWithNewModel(BuildingSwapArray[i].m_nNewModel);
+ */
}
for (uint32 i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++) {
uint32 type = ReadSaveBuf<uint32>(buf);
uint32 handle = ReadSaveBuf<uint32>(buf);
+ /*
switch (type) {
case 0:
InvisibilitySettingArray[i] = nil;
@@ -2267,9 +2275,10 @@ INITSAVEBUF
}
if (InvisibilitySettingArray[i])
InvisibilitySettingArray[i]->bIsVisible = false;
+ */
}
script_assert(ReadSaveBuf<bool>(buf) == bUsingAMultiScriptFile);
- bPlayerHasMetDebbieHarry = ReadSaveBuf<uint8>(buf);
+ /*bPlayerHasMetDebbieHarry = */ReadSaveBuf<uint8>(buf);
ReadSaveBuf<uint16>(buf);
script_assert(ReadSaveBuf<uint32>(buf) == MainScriptSize);
script_assert(ReadSaveBuf<uint32>(buf) == LargestMissionScriptSize);
@@ -2277,7 +2286,8 @@ INITSAVEBUF
script_assert(ReadSaveBuf<uint16>(buf) == NumberOfExclusiveMissionScripts);
uint32 runningScripts = ReadSaveBuf<uint32>(buf);
for (uint32 i = 0; i < runningScripts; i++)
- StartNewScript(0)->Load(buf);
+ CRunningScript().Load(buf);
+ StartTestScript(); // <- tmp hack
return true;
VALIDATESAVEBUF(size)
}