mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- fix: lines in UDB were displayed incorrectly
- fix: food does not decay the first time a sector is entered (to prevent pre-placed items from rotting) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5448 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5090,7 +5090,13 @@ void HandleSectorCooldownFunctions( INT16 sMapX, INT16 sMapY, INT8 sMapZ, WORLDI
|
||||
|
||||
if ( fWithMinutes )
|
||||
{
|
||||
INT32 sMinutesPassed = __max(0, GetWorldTotalMin() - GetLastTimePlayerWasInSector(sMapX, sMapY, sMapZ) );
|
||||
UINT32 usLastVisited = GetLastTimePlayerWasInSector(sMapX, sMapY, sMapZ);
|
||||
|
||||
// if usLastVisited is 0, we have not yet visited this sector. We don't want to cooldown anything in this case (preplaced food could become rotten jsut because we visit this sector late in our campaign)
|
||||
if ( usLastVisited == 0 )
|
||||
return;
|
||||
|
||||
UINT32 sMinutesPassed = __max(0, GetWorldTotalMin() - usLastVisited );
|
||||
|
||||
if ( sMinutesPassed == 0 )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user