mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Update Town Militia.cpp
This commit is contained in:
@@ -54,7 +54,7 @@ BOOLEAN gfAreWePromotingRegular = FALSE;
|
|||||||
|
|
||||||
|
|
||||||
//the completed list of sector soldiers for training militia
|
//the completed list of sector soldiers for training militia
|
||||||
INT32 giListOfMercsInSectorsCompletedMilitiaTraining[ SIZE_OF_MILITIA_COMPLETED_TRAINING_LIST ];
|
SoldierID giListOfMercsInSectorsCompletedMilitiaTraining[ SIZE_OF_MILITIA_COMPLETED_TRAINING_LIST ];
|
||||||
SOLDIERTYPE *pMilitiaTrainerSoldier = NULL;
|
SOLDIERTYPE *pMilitiaTrainerSoldier = NULL;
|
||||||
|
|
||||||
// note that these sector values are STRATEGIC INDEXES, not 0-255!
|
// note that these sector values are STRATEGIC INDEXES, not 0-255!
|
||||||
@@ -1421,10 +1421,10 @@ void AddSectorForSoldierToListOfSectorsThatCompletedMilitiaTraining( SOLDIERTYPE
|
|||||||
// get the sector value
|
// get the sector value
|
||||||
sSector = pSoldier->sSectorX + pSoldier->sSectorY * MAP_WORLD_X;
|
sSector = pSoldier->sSectorX + pSoldier->sSectorY * MAP_WORLD_X;
|
||||||
|
|
||||||
while( giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] != -1 )
|
while( giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] != NOBODY )
|
||||||
{
|
{
|
||||||
// get the current soldier
|
// get the current soldier
|
||||||
pCurrentSoldier = &Menptr[ giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] ];
|
pCurrentSoldier = giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ];
|
||||||
|
|
||||||
// get the current sector value
|
// get the current sector value
|
||||||
sCurrentSector = CALCULATE_STRATEGIC_INDEX( pCurrentSoldier->sSectorX, pCurrentSoldier->sSectorY );
|
sCurrentSector = CALCULATE_STRATEGIC_INDEX( pCurrentSoldier->sSectorX, pCurrentSoldier->sSectorY );
|
||||||
@@ -1455,7 +1455,7 @@ void ClearSectorListForCompletedTrainingOfMilitia( void )
|
|||||||
|
|
||||||
for( iCounter = 0; iCounter < SIZE_OF_MILITIA_COMPLETED_TRAINING_LIST; iCounter++ )
|
for( iCounter = 0; iCounter < SIZE_OF_MILITIA_COMPLETED_TRAINING_LIST; iCounter++ )
|
||||||
{
|
{
|
||||||
giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] = -1;
|
giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] = NOBODY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1469,10 +1469,10 @@ void HandleContinueOfTownTraining( void )
|
|||||||
BOOLEAN fContinueEventPosted = FALSE;
|
BOOLEAN fContinueEventPosted = FALSE;
|
||||||
|
|
||||||
|
|
||||||
while( giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] != -1 )
|
while( giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] != NOBODY )
|
||||||
{
|
{
|
||||||
// get the soldier
|
// get the soldier
|
||||||
pSoldier = &Menptr[ giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ] ];
|
pSoldier = giListOfMercsInSectorsCompletedMilitiaTraining[ iCounter ];
|
||||||
|
|
||||||
if( pSoldier->bActive )
|
if( pSoldier->bActive )
|
||||||
{
|
{
|
||||||
@@ -1552,7 +1552,7 @@ void BuildListOfUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// handle for tactical
|
// handle for tactical
|
||||||
pSoldier = &Menptr[ gusUIFullTargetID ];
|
pSoldier = gusUIFullTargetID;
|
||||||
iCounter = 0;
|
iCounter = 0;
|
||||||
|
|
||||||
if (ubMilitiaType == TOWN_MILITIA)
|
if (ubMilitiaType == TOWN_MILITIA)
|
||||||
|
|||||||
Reference in New Issue
Block a user