mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- improved cooldown/decay functions. every time a sector inventory gets loaded, its inventory gets cooled down, thus all accessible world items always have the correct values.
- OVERHEATING_SET_ZERO_UPON_NEW_SECTOR is not used anymore git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5443 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -129,6 +129,7 @@ BOOLEAN InitTempNpcQuoteInfoForNPCFromTempFile();
|
||||
BOOLEAN SaveTempNpcQuoteInfoForNPCToTempFile( UINT8 ubNpcId );
|
||||
BOOLEAN LoadTempNpcQuoteInfoForNPCFromTempFile( UINT8 ubNpcId );
|
||||
UINT32 GetLastTimePlayerWasInSector();
|
||||
UINT32 GetLastTimePlayerWasInSector(INT16 sMapX, INT16 sMapY, INT8 sMapZ); // Flugente: get time for another sector
|
||||
void SetLastTimePlayerWasInSector();
|
||||
|
||||
|
||||
@@ -1411,6 +1412,39 @@ UINT32 GetLastTimePlayerWasInSector()
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
// Flugente: get time for another sector
|
||||
UINT32 GetLastTimePlayerWasInSector(INT16 sMapX, INT16 sMapY, INT8 sMapZ)
|
||||
{
|
||||
if( !sMapZ )
|
||||
return( SectorInfo[ SECTOR( sMapX,sMapY) ].uiTimeCurrentSectorWasLastLoaded );
|
||||
else if( sMapZ > 0 )
|
||||
{
|
||||
UNDERGROUND_SECTORINFO *pTempNode = gpUndergroundSectorInfoHead;
|
||||
|
||||
pTempNode = gpUndergroundSectorInfoHead;
|
||||
|
||||
//loop through and look for the right underground sector
|
||||
while( pTempNode )
|
||||
{
|
||||
if( ( pTempNode->ubSectorX == sMapX ) &&
|
||||
( pTempNode->ubSectorY == sMapY ) &&
|
||||
( pTempNode->ubSectorZ == sMapZ ) )
|
||||
{
|
||||
//set the flag indicating that ther is a temp item file exists for the sector
|
||||
return( pTempNode->uiTimeCurrentSectorWasLastLoaded );
|
||||
}
|
||||
pTempNode = pTempNode->next;
|
||||
}
|
||||
|
||||
#ifdef JA2TESTVERSION
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Failed to Get the 'uiTimeCurrentSectorWasLastLoaded' from an underground sector" );
|
||||
#endif
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user