Fix: load map modifications before loading items, as altered structures can change items visibility

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9086 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2021-06-18 18:40:31 +00:00
parent 9bdb2adfac
commit a288b2e60c
+8 -8
View File
@@ -1295,6 +1295,14 @@ BOOLEAN LoadCurrentSectorsInformationFromTempItemsFile()
#endif
//if we are in an above ground sector
//If there is a map modifications file, load the data from the temp file
if ( DoesTempFileExistsForMap( SF_MAP_MODIFICATIONS_TEMP_FILE_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
{
fUsedTempFile = TRUE;
if ( !LoadAllMapChangesFromMapTempFileAndApplyThem() )
return( FALSE );
}
//If there is a file, load in the Items array
if( DoesTempFileExistsForMap( SF_ITEM_TEMP_FILE_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
{
@@ -1311,14 +1319,6 @@ BOOLEAN LoadCurrentSectorsInformationFromTempItemsFile()
return( FALSE );
}
//If there is a map modifications file, load the data from the temp file
if( DoesTempFileExistsForMap( SF_MAP_MODIFICATIONS_TEMP_FILE_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
{
fUsedTempFile = TRUE;
if( !LoadAllMapChangesFromMapTempFileAndApplyThem( ) )
return( FALSE );
}
//if there is a door table temp file, load the data from the temp file
if( DoesTempFileExistsForMap( SF_DOOR_TABLE_TEMP_FILES_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
{