mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
**********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 ** ********************************************************** - Merged Big Maps Project code from BMP+MP trunk (Revision: 3340) o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - Before THIS merge, I made a branch of the existing 1.13 source o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src - Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago - I will add VS 2010 projects and solution file in the next few days git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+23
-28
@@ -330,10 +330,10 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
|
||||
}
|
||||
|
||||
// the trainer announces to player that he's finished his assignment. Make his sector flash!
|
||||
AssignmentDone( pTrainer, TRUE, FALSE );
|
||||
// the trainer announces to player that he's finished his assignment. Make his sector flash!
|
||||
AssignmentDone( pTrainer, TRUE, FALSE );
|
||||
|
||||
// handle completion of town by training group
|
||||
// handle completion of town by training group
|
||||
HandleCompletionOfTownTrainingByGroupWithTrainer( pTrainer, TOWN_MILITIA );
|
||||
}
|
||||
}
|
||||
@@ -673,7 +673,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||
ubMilitiaType = MOBILE_MILITIA;
|
||||
else
|
||||
return;
|
||||
|
||||
// grab total number of sectors
|
||||
iNumberOfSectors = GetNumberOfUnpaidTrainableSectors( ubMilitiaType );
|
||||
Assert( iNumberOfSectors > 0 );
|
||||
@@ -687,25 +686,24 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||
{
|
||||
// If Regulars are maxed, and Elites are allowed, calculate cost to upgrade Regular->Elite
|
||||
if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, REGULAR_MILITIA )
|
||||
&& (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iVeteranCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWePromotingRegular = TRUE;
|
||||
}
|
||||
// If Greens are maxed, calculate cost to upgrade Green->Regular
|
||||
else if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, GREEN_MILITIA ))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iRegularCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWePromotingGreen = TRUE;
|
||||
}
|
||||
&& (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iVeteranCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWePromotingRegular = TRUE;
|
||||
}
|
||||
else if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, GREEN_MILITIA ))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iRegularCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWePromotingGreen = TRUE;
|
||||
}
|
||||
// Normal training.
|
||||
else
|
||||
{
|
||||
giTotalCostOfTraining = iMilitiaTrainingCost * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
else
|
||||
{
|
||||
giTotalCostOfTraining = iMilitiaTrainingCost * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1084,7 +1082,6 @@ void PayMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue )
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
// put this BEFORE training gets handled to avoid detecting an error everytime a sector completes training
|
||||
// HEADROCK HAM 3.6: Checks both Mobiles and Garrisons.
|
||||
VerifyTownTrainingIsPaidFor();
|
||||
#endif
|
||||
|
||||
@@ -1518,9 +1515,9 @@ void HandleContinueOfTownTraining( void )
|
||||
|
||||
//If the militia view isn't currently active, then turn it on when prompting to continue training.
|
||||
if ( !fShowMilitia )
|
||||
{
|
||||
ToggleShowMilitiaMode();
|
||||
}
|
||||
{
|
||||
ToggleShowMilitiaMode();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -1872,8 +1869,6 @@ void BuildMilitiaPromotionsString( STR16 str )
|
||||
gbRegToElitePromotions = 0;
|
||||
gbMilitiaPromotions = 0;
|
||||
}
|
||||
|
||||
|
||||
// HEADROCK HAM 3.3: This function finds the best Militia Trainer in the target sector. It may also take into account
|
||||
// mercs' TEACHING skill, if told to. The function returns the calculated "Effective Leadership" of the selected
|
||||
// trainer.
|
||||
|
||||
Reference in New Issue
Block a user