Fix #10206: Disable scripts in intro game (#10241)

This commit is contained in:
Loïc Guilloux
2022-12-15 21:43:07 +01:00
committed by GitHub
parent 8db4892f49
commit 2848483810
4 changed files with 11 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ struct AIPLChunkHandler : ChunkHandler {
_ai_saveload_version = -1;
SlObject(nullptr, slt);
if (_networking && !_network_server) {
if (_game_mode == GM_MENU || (_networking && !_network_server)) {
if (Company::IsValidAiID(index)) AIInstance::LoadEmpty();
continue;
}

View File

@@ -69,7 +69,7 @@ struct GSDTChunkHandler : ChunkHandler {
_game_saveload_version = -1;
SlObject(nullptr, slt);
if (_networking && !_network_server) {
if (_game_mode == GM_MENU || (_networking && !_network_server)) {
GameInstance::LoadEmpty();
if (SlIterateArray() != -1) SlErrorCorrupt("Too many GameScript configs");
return;