fixed POW code throwing errors when trying to compile UB build

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9101 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-06-23 23:04:49 +00:00
parent 749854b24f
commit dce924540f
4 changed files with 26 additions and 10 deletions
+2 -1
View File
@@ -533,12 +533,13 @@ BOOLEAN SetThisSectorAsEnemyControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BO
{
gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED;
}
#ifndef JA2UB
//shadooow: re-enable quest if player loses control of the Tixa prison and quest was disabled previously
if (sMapX == gModSettings.ubTixaPrisonSectorX && sMapY == gModSettings.ubTixaPrisonSectorY && gubQuest[QUEST_HELD_IN_TIXA] == QUESTCANNOTSTART)
{
gubQuest[QUEST_HELD_IN_TIXA] = QUESTNOTSTARTED;
}
#endif
// Flugente: reduce workforce
SectorInfo[SECTOR( sMapX, sMapY )].usWorkers = SectorInfo[SECTOR( sMapX, sMapY )].usWorkers * gGameExternalOptions.dInitialWorkerRate;
+8 -6
View File
@@ -2807,18 +2807,16 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
}
ChangeSoldiersAssignment( pSoldier, ASSIGNMENT_POW );
// ATE: Make them neutral!
if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
{
pSoldier->aiData.bNeutral = TRUE;
}
RemoveCharacterFromSquads( pSoldier );
WORLDITEM WorldItem;
std::vector<WORLDITEM> pWorldItem;
#ifdef JA2UB
if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED))
#else
if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED))
#endif
{
INT32 itemdropoffgridno = -1;
@@ -2826,21 +2824,25 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED )
{
//-teleport him to NE Alma sector (not Tixa as originally planned)
pSoldier->aiData.bNeutral = TRUE;
pSoldier->sSectorX = gModSettings.ubInitialPOWSectorX; //13
pSoldier->sSectorY = gModSettings.ubInitialPOWSectorY; //9
pSoldier->bSectorZ = 0;
pSoldier->usStrategicInsertionData = gModSettings.iInitialPOWGridNo[gStrategicStatus.ubNumCapturedForRescue];
itemdropoffgridno = gModSettings.iInitialPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue];
}
#ifndef JA2UB
else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
{
//-teleport him to Tixa as originally planned
pSoldier->aiData.bNeutral = TRUE;
pSoldier->sSectorX = gModSettings.ubTixaPrisonSectorX;
pSoldier->sSectorY = gModSettings.ubTixaPrisonSectorY;
pSoldier->bSectorZ = 0;
pSoldier->usStrategicInsertionData = gModSettings.iTixaPrisonPOWGridNo[gStrategicStatus.ubNumCapturedForRescue];
itemdropoffgridno = gModSettings.iTixaPrisonPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue];
}
#endif
else //if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTDONE )
{
//-teleport him to N7
+2
View File
@@ -3304,6 +3304,7 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
// Do action
HandleNPCDoAction( 0, NPC_ACTION_GRANT_EXPERIENCE_3, 0 );
}
#ifndef JA2UB
else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTINPROGRESS)
{
// Complete quest
@@ -3312,6 +3313,7 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
// Do action
HandleNPCDoAction(0, NPC_ACTION_GRANT_EXPERIENCE_3, 0);
}
#endif
}
}
}