mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
fixed some crashes when loading 4xx built savegames. The game can continue, but You'll probably loose your vehicles. The Team in the Laptop/Personel also consist only of Your AVATAR, but in strategic map the team is complete.
This is not a very well finished fix. Only glued some NULL assigned pointers. I recomend to NOT load too old savegames. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@733 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3595,6 +3595,12 @@ BOOLEAN LoadStrategicAI( HWFILE hFile )
|
||||
}
|
||||
if( ubSAIVersion < 19 )
|
||||
{
|
||||
if( !gGarrisonGroup ) /* Sergeant Kolja, 2007-02-20: loading an older Qicksave, I crashed with NULL gGarrisonGroup[] */
|
||||
{
|
||||
gGarrisonGroup = (GARRISON_GROUP*)MemAlloc( sizeof( gOrigGarrisonGroup ) );
|
||||
Assert( gGarrisonGroup );
|
||||
memcpy( gGarrisonGroup, gOrigGarrisonGroup, sizeof( gOrigGarrisonGroup ) );
|
||||
}
|
||||
//Clear the garrison in C5
|
||||
gArmyComp[ gGarrisonGroup[ SectorInfo[ SEC_C5 ].ubGarrisonID ].ubComposition ].bPriority = 0;
|
||||
gArmyComp[ gGarrisonGroup[ SectorInfo[ SEC_C5 ].ubGarrisonID ].ubComposition ].bDesiredPopulation = 0;
|
||||
|
||||
Reference in New Issue
Block a user