mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
New feature: individual militia creates small militia profiles that track a militia's history and allow it to be recreated, thereby maintaining the illusion of persistent militia.
Requires GameDir >= r2316. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23044&goto=345324&#msg_345324 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8202 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -30,10 +30,11 @@
|
||||
#include "Campaign.h"
|
||||
#include "ai.h"
|
||||
#include "Isometric Utils.h"
|
||||
#include "MilitiaSquads.h"
|
||||
#include "MilitiaIndividual.h" // added by Flugente
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -281,9 +282,7 @@ void PrepareMilitiaForTactical( BOOLEAN fPrepareAll)
|
||||
void HandleMilitiaPromotions( void )
|
||||
{
|
||||
UINT8 cnt;
|
||||
UINT8 ubMilitiaRank;
|
||||
SOLDIERTYPE* pTeamSoldier;
|
||||
UINT8 ubPromotions;
|
||||
|
||||
gbGreenToElitePromotions = 0;
|
||||
gbGreenToRegPromotions = 0;
|
||||
@@ -296,31 +295,8 @@ void HandleMilitiaPromotions( void )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->bInSector && pTeamSoldier->stats.bLife > 0 )
|
||||
{
|
||||
if ( pTeamSoldier->ubMilitiaKills > 0 )
|
||||
{
|
||||
ubMilitiaRank = SoldierClassToMilitiaRank( pTeamSoldier->ubSoldierClass );
|
||||
ubPromotions = CheckOneMilitiaForPromotion( gWorldSectorX, gWorldSectorY, ubMilitiaRank, pTeamSoldier->ubMilitiaKills );
|
||||
if( ubPromotions )
|
||||
{
|
||||
if( ubPromotions == 2 )
|
||||
{
|
||||
++gbGreenToElitePromotions;
|
||||
++gbMilitiaPromotions;
|
||||
}
|
||||
else if( pTeamSoldier->ubSoldierClass == SOLDIER_CLASS_GREEN_MILITIA )
|
||||
{
|
||||
++gbGreenToRegPromotions;
|
||||
++gbMilitiaPromotions;
|
||||
}
|
||||
else if( pTeamSoldier->ubSoldierClass == SOLDIER_CLASS_REG_MILITIA )
|
||||
{
|
||||
++gbRegToElitePromotions;
|
||||
++gbMilitiaPromotions;
|
||||
}
|
||||
}
|
||||
|
||||
pTeamSoldier->ubMilitiaKills = 0;
|
||||
}
|
||||
// Flugente: take care of promotions and individual militia update
|
||||
HandlePossibleMilitiaPromotion( pTeamSoldier );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user