mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
fully externalize bQueenLosingControlOfSector
This commit is contained in:
committed by
majcosta
parent
e5d25810f6
commit
7d9cd87da8
@@ -85,7 +85,7 @@ typedef struct
|
||||
UINT8 usLevelModifierLowLimit;
|
||||
UINT8 usLevelModifierHighLimit;
|
||||
BOOLEAN bAllowUnrestrictedXPLevels;
|
||||
BOOLEAN bQueenLosingControlOfSector;
|
||||
UINT8 bQueenLosingControlOfSector;
|
||||
BOOLEAN bBloodcatAmbush;
|
||||
BOOLEAN bAirRaidLookForDive;
|
||||
UINT32 iGetNumberOfTurnsPowerGenFanWillBeStoppedFor; //UB
|
||||
|
||||
@@ -555,7 +555,7 @@ difficultySettingsEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "QueenAttackLosingControlOfSector") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curDifficultySettings.bQueenLosingControlOfSector = (BOOLEAN) atol(pData->szCharData);
|
||||
pData->curDifficultySettings.bQueenLosingControlOfSector = atoi(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "BloodcatAmbushSectors") == 0)
|
||||
{
|
||||
|
||||
@@ -5756,26 +5756,13 @@ void StrategicHandleQueenLosingControlOfSector( INT16 sSectorX, INT16 sSectorY,
|
||||
else
|
||||
return;
|
||||
|
||||
//Madd: tweaked to increase attacks for experienced and expert to 8 and 12, and unlimited for insane
|
||||
UINT8 value9;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
value9 = 1;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
|
||||
value9 = 2;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
|
||||
value9 = 3;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
|
||||
value9 = 4;
|
||||
else
|
||||
{
|
||||
value9 = Random (4);
|
||||
if (value9 == 0) value9 = 1;
|
||||
}
|
||||
|
||||
if( pSector->ubInvestigativeState >= ( 4 * value9 ) && !zDiffSetting[gGameOptions.ubDifficultyLevel].bQueenLosingControlOfSector )
|
||||
{
|
||||
//This is the 4th time the player has conquered this sector. We won't pester the player with probing attacks here anymore.
|
||||
return;
|
||||
const auto queenStopsAttacking = zDiffSetting[gGameOptions.ubDifficultyLevel].bQueenLosingControlOfSector;
|
||||
if (queenStopsAttacking != 0 && pSector->ubInvestigativeState >= queenStopsAttacking) {
|
||||
/* This is equal or higher than QueenAttackLosingControlOfSector number of times the player has conquered this sector.
|
||||
We won't pester the player with probing attacks here anymore. */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if( sSectorX != gWorldSectorX || sSectorY != gWorldSectorY )
|
||||
|
||||
Reference in New Issue
Block a user