mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
fix: sector entering still behaved weird
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5459 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5041,15 +5041,9 @@ void SectorInventoryCooldownFunctions( INT16 sMapX, INT16 sMapY, INT16 sMapZ )
|
||||
// #endif
|
||||
|
||||
// now load these items into memory, based on fact if sector is in fact loaded
|
||||
if( ( sMapX == gWorldSectorX )&&( gWorldSectorY == sMapY ) &&(gbWorldSectorZ == sMapZ ) )
|
||||
if( ( sMapX == gWorldSectorX )&&( gWorldSectorY == sMapY ) && (gbWorldSectorZ == sMapZ ) && guiNumWorldItems)
|
||||
{
|
||||
fReturn = GetNumberOfWorldItemsFromTempItemFile( sMapX, sMapY, ( INT8 )( sMapZ ), &( uiTotalNumberOfRealItems ), FALSE );
|
||||
Assert( fReturn );
|
||||
|
||||
if ( !uiTotalNumberOfRealItems )
|
||||
return;
|
||||
|
||||
pTotalSectorList = gWorldItems;
|
||||
HandleSectorCooldownFunctions( sMapX, sMapY, (INT8)sMapZ, gWorldItems, guiNumWorldItems, TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5069,12 +5063,9 @@ void SectorInventoryCooldownFunctions( INT16 sMapX, INT16 sMapY, INT16 sMapZ )
|
||||
// now load into mem
|
||||
LoadWorldItemsFromTempItemFile( sMapX, sMapY, ( INT8 ) ( sMapZ ), pTotalSectorList );
|
||||
}
|
||||
}
|
||||
|
||||
HandleSectorCooldownFunctions( sMapX, sMapY, (INT8)sMapZ, pTotalSectorList, uiTotalNumberOfRealItems, TRUE );
|
||||
|
||||
if ( sMapX != gWorldSectorX || sMapY != gWorldSectorY || sMapZ != gbWorldSectorZ )
|
||||
{
|
||||
HandleSectorCooldownFunctions( sMapX, sMapY, (INT8)sMapZ, pTotalSectorList, uiTotalNumberOfRealItems, TRUE );
|
||||
|
||||
//Save the Items to the the file
|
||||
SaveWorldItemsToTempItemFile( sMapX, sMapY, (INT8)sMapZ, uiTotalNumberOfRealItems, pTotalSectorList );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user