mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Bugfix: Fixed crash when entering a sector in tactical and the rotting corpses from the temporary file has an invalid high value -> just set rotting corpses to 0
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4894 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1741,6 +1741,10 @@ BOOLEAN LoadRottingCorpsesFromTempCorpseFile( INT16 sMapX, INT16 sMapY, INT8 bMa
|
||||
FileClose( hFile );
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// WANNE: If we get wrong data (very high value) from the temp file, we assume we have wrong value and therefore set corpses to 0 which will not crash the game!
|
||||
if (uiNumberOfCorpses > 10000)
|
||||
uiNumberOfCorpses = 0;
|
||||
|
||||
// Get town ID for use later....
|
||||
bTownId = GetTownIdForSector( gWorldSectorX, gWorldSectorY );
|
||||
|
||||
Reference in New Issue
Block a user