mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merged from revision: 7287
Fixes (by Buggler) - Disabled calling reinforcements from patrol groups when queen wakes up as they will not be replenished (thanks anv) - Fixed queen reinforcement pool being replenished on depletion when playing with limited enemy troops setting - Alternative hotkey ~ (tilde) to toggle merc inventory in strategic screen like in tactical screen git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7288 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+24
-15
@@ -2932,12 +2932,13 @@ void SendReinforcementsForGarrison( INT32 iDstGarrisonID, UINT16 usDefencePoints
|
|||||||
Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */
|
Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */
|
||||||
ValidateWeights( 8 );
|
ValidateWeights( 8 );
|
||||||
|
|
||||||
if( gGarrisonGroup[ iDstGarrisonID ].ubSectorID == SEC_B13 ||
|
/*if( gGarrisonGroup[ iDstGarrisonID ].ubSectorID == SEC_B13 ||
|
||||||
gGarrisonGroup[ iDstGarrisonID ].ubSectorID == SEC_C13 ||
|
gGarrisonGroup[ iDstGarrisonID ].ubSectorID == SEC_C13 ||
|
||||||
gGarrisonGroup[ iDstGarrisonID ].ubSectorID == SEC_D13 )
|
gGarrisonGroup[ iDstGarrisonID ].ubSectorID == SEC_D13 )
|
||||||
{
|
{
|
||||||
pSector = NULL;
|
pSector = NULL;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
pSector = &SectorInfo[ gGarrisonGroup[ iDstGarrisonID ].ubSectorID ];
|
pSector = &SectorInfo[ gGarrisonGroup[ iDstGarrisonID ].ubSectorID ];
|
||||||
//Determine how many units the garrison needs.
|
//Determine how many units the garrison needs.
|
||||||
iReinforcementsRequested = GarrisonReinforcementsRequested( iDstGarrisonID, &ubNumExtraReinforcements );
|
iReinforcementsRequested = GarrisonReinforcementsRequested( iDstGarrisonID, &ubNumExtraReinforcements );
|
||||||
@@ -3312,6 +3313,7 @@ void EvaluateQueenSituation()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* // Buggler: Unlimited troops setting will have a constant pool value, limited troops setting should not be able to recruit new troops
|
||||||
if( !giReinforcementPool )
|
if( !giReinforcementPool )
|
||||||
{ //Queen has run out of reinforcements. Simulate recruiting and training new troops
|
{ //Queen has run out of reinforcements. Simulate recruiting and training new troops
|
||||||
uiOffset *= 10;
|
uiOffset *= 10;
|
||||||
@@ -3319,7 +3321,7 @@ void EvaluateQueenSituation()
|
|||||||
giReinforcementPool += ( gGameExternalOptions.guiBaseQueenPoolIncrement * gGameOptions.ubDifficultyLevel ) * ( 100 + CurrentPlayerProgressPercentage() ) / 100 ;
|
giReinforcementPool += ( gGameExternalOptions.guiBaseQueenPoolIncrement * gGameOptions.ubDifficultyLevel ) * ( 100 + CurrentPlayerProgressPercentage() ) / 100 ;
|
||||||
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, GetWorldTotalMin() + uiOffset, 0 );
|
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, GetWorldTotalMin() + uiOffset, 0 );
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//Re-post the event
|
//Re-post the event
|
||||||
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, GetWorldTotalMin() + uiOffset, 0 );
|
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, GetWorldTotalMin() + uiOffset, 0 );
|
||||||
@@ -5628,7 +5630,7 @@ void RequestHighPriorityGarrisonReinforcements( INT32 iGarrisonID, UINT8 ubSoldi
|
|||||||
ubBestDist = 255;
|
ubBestDist = 255;
|
||||||
iBestIndex = -1;
|
iBestIndex = -1;
|
||||||
|
|
||||||
Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */
|
Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */
|
||||||
|
|
||||||
for( i = 0; i < giPatrolArraySize; i++ )
|
for( i = 0; i < giPatrolArraySize; i++ )
|
||||||
{
|
{
|
||||||
@@ -5648,6 +5650,8 @@ void RequestHighPriorityGarrisonReinforcements( INT32 iGarrisonID, UINT8 ubSoldi
|
|||||||
}
|
}
|
||||||
ubDstSectorX = (UINT8)SECTORX( gGarrisonGroup[ iGarrisonID ].ubSectorID );
|
ubDstSectorX = (UINT8)SECTORX( gGarrisonGroup[ iGarrisonID ].ubSectorID );
|
||||||
ubDstSectorY = (UINT8)SECTORY( gGarrisonGroup[ iGarrisonID ].ubSectorID );
|
ubDstSectorY = (UINT8)SECTORY( gGarrisonGroup[ iGarrisonID ].ubSectorID );
|
||||||
|
|
||||||
|
/* // Comment code calling reinforcements from patrol groups as they will not be replenished subsequently
|
||||||
if( iBestIndex != -1 )
|
if( iBestIndex != -1 )
|
||||||
{ //Send the group to the garrison
|
{ //Send the group to the garrison
|
||||||
pGroup = GetGroup( gPatrolGroup[ iBestIndex ].ubGroupID );
|
pGroup = GetGroup( gPatrolGroup[ iBestIndex ].ubGroupID );
|
||||||
@@ -5734,19 +5738,24 @@ void RequestHighPriorityGarrisonReinforcements( INT32 iGarrisonID, UINT8 ubSoldi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //There are no groups that have enough troops. Send a new force from the palace instead.
|
*/
|
||||||
pGroup = CreateNewEnemyGroupDepartingFromSector( SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ), 0, ubSoldiersRequested, 0, 0 );
|
{ //There are no groups that have enough troops. Send a new force from the palace instead.
|
||||||
pGroup->ubMoveType = ONE_WAY;
|
if ( giReinforcementPool > 0 )
|
||||||
pGroup->pEnemyGroup->ubIntention = REINFORCEMENTS;
|
{
|
||||||
gGarrisonGroup[ iGarrisonID ].ubPendingGroupID = pGroup->ubGroupID;
|
pGroup = CreateNewEnemyGroupDepartingFromSector( SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ),
|
||||||
pGroup->ubOriginalSector = (UINT8)SECTOR( ubDstSectorX, ubDstSectorY );
|
0, min( ubSoldiersRequested, giReinforcementPool ), 0 );
|
||||||
|
pGroup->ubMoveType = ONE_WAY;
|
||||||
|
pGroup->pEnemyGroup->ubIntention = REINFORCEMENTS;
|
||||||
|
gGarrisonGroup[ iGarrisonID ].ubPendingGroupID = pGroup->ubGroupID;
|
||||||
|
pGroup->ubOriginalSector = (UINT8)SECTOR( ubDstSectorX, ubDstSectorY );
|
||||||
|
|
||||||
//Madd: unlimited reinforcements?
|
//Madd: unlimited reinforcements?
|
||||||
if ( !gfUnlimitedTroops )
|
if ( !gfUnlimitedTroops )
|
||||||
giReinforcementPool -= (INT32)ubSoldiersRequested;
|
giReinforcementPool -= (INT32)min( ubSoldiersRequested, giReinforcementPool );
|
||||||
|
|
||||||
MoveSAIGroupToSector( &pGroup, gGarrisonGroup[ iGarrisonID ].ubSectorID, EVASIVE, REINFORCEMENTS );
|
MoveSAIGroupToSector( &pGroup, gGarrisonGroup[ iGarrisonID ].ubSectorID, EVASIVE, REINFORCEMENTS );
|
||||||
ValidateGroup( pGroup );
|
ValidateGroup( pGroup );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7202,8 +7202,11 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '`':
|
case '`':
|
||||||
|
if (fAlt)
|
||||||
|
{
|
||||||
|
}
|
||||||
#ifdef JA2TESTVERSION
|
#ifdef JA2TESTVERSION
|
||||||
if( fCtrl )
|
else if( fCtrl )
|
||||||
{
|
{
|
||||||
if( bSelectedInfoChar != -1 )
|
if( bSelectedInfoChar != -1 )
|
||||||
{
|
{
|
||||||
@@ -7211,11 +7214,8 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (fAlt)
|
else
|
||||||
{
|
RequestToggleMercInventoryPanel();
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\\':
|
case '\\':
|
||||||
|
|||||||
@@ -786,6 +786,8 @@ void ToggleTacticalPanels( )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gbNewPanel = SM_PANEL;
|
gbNewPanel = SM_PANEL;
|
||||||
|
// silversurfer: This needs to be reset to TRUE because inventory view only allows radar screen to be displayed and not the squad list.
|
||||||
|
fRenderRadarScreen = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user