mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Fix: same militia profile is used several times in autoresolve
- Fix: sometimes no battle repoer is written for autoresolve - Fix: no militia profile found in autoresolve due to bad sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8229 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2526,7 +2526,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve2");
|
||||
else
|
||||
{
|
||||
// Flugente: take care of promotions and individual militia update
|
||||
HandlePossibleMilitiaPromotion( gpCivs[i].pSoldier );
|
||||
HandlePossibleMilitiaPromotion( gpCivs[i].pSoldier, TRUE );
|
||||
}
|
||||
|
||||
TacticalRemoveSoldierPointer( gpCivs[ i ].pSoldier, FALSE );
|
||||
@@ -5802,7 +5802,7 @@ void AutoResolveMilitiaDropAndPromote()
|
||||
else if ( gpCivs[i].pSoldier->stats.bLife >= OKLIFE / 2 )
|
||||
{
|
||||
// Flugente: take care of promotions and individual militia update
|
||||
HandlePossibleMilitiaPromotion( gpCivs[i].pSoldier );
|
||||
HandlePossibleMilitiaPromotion( gpCivs[i].pSoldier, TRUE );
|
||||
}
|
||||
|
||||
// DO NOT DELETE HERE!!!!
|
||||
@@ -5810,4 +5810,20 @@ void AutoResolveMilitiaDropAndPromote()
|
||||
//memset( &gpCivs[i], 0, sizeof(SOLDIERCELL) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN IndividualMilitiaInUse_AutoResolve( UINT32 aMilitiaId )
|
||||
{
|
||||
if ( gpAR )
|
||||
{
|
||||
for ( INT32 i = 0; i < gpAR->ubCivs; ++i )
|
||||
{
|
||||
if ( gpCivs[i].pSoldier && aMilitiaId == gpCivs[i].pSoldier->usIndividualMilitiaID && IsLegalMilitiaId( gpCivs[i].pSoldier->usIndividualMilitiaID ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user