mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
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:
@@ -1295,6 +1295,14 @@ BOOLEAN LoadCurrentSectorsInformationFromTempItemsFile()
|
|||||||
#endif
|
#endif
|
||||||
//if we are in an above ground sector
|
//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 there is a file, load in the Items array
|
||||||
if( DoesTempFileExistsForMap( SF_ITEM_TEMP_FILE_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
|
if( DoesTempFileExistsForMap( SF_ITEM_TEMP_FILE_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
|
||||||
{
|
{
|
||||||
@@ -1311,14 +1319,6 @@ BOOLEAN LoadCurrentSectorsInformationFromTempItemsFile()
|
|||||||
return( FALSE );
|
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 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 ) )
|
if( DoesTempFileExistsForMap( SF_DOOR_TABLE_TEMP_FILES_EXISTS, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user