Externalize fan exitgrid location in the source sector

This commit is contained in:
Asdow
2025-06-24 22:54:44 +03:00
parent d9391de58a
commit a1bb85ca95
5 changed files with 15 additions and 9 deletions
+10 -6
View File
@@ -293,7 +293,8 @@ UINT32 POWERGENSECTOR_GRIDNO1 = 15100;
UINT32 POWERGENSECTOR_GRIDNO2 = 12220;
UINT32 POWERGENSECTOR_GRIDNO3 = 14155;
UINT32 POWERGENSECTOR_GRIDNO4 = 13980;
UINT32 POWERGENSECTOREXITGRID_GRIDNO1 = 19749;
UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO = 10979;
UINT32 POWERGENSECTOREXITGRID_DST_GRIDNO = 19749;
UINT32 POWERGENFANSOUND_GRIDNO1 = 10979;
UINT32 POWERGENFANSOUND_GRIDNO2 = 19749;
UINT32 STARTFANBACKUPAGAIN_GRIDNO = 10980;
@@ -310,11 +311,13 @@ UINT32 SECTOR_FAN_Y = 0;
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
//J14-1
// Destination sector for fan exitgrid
//J14-1
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = 14;
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = 10;
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = 1;
void InitGridNoUB()
{
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
@@ -326,7 +329,8 @@ void InitGridNoUB()
POWERGENSECTOR_GRIDNO2 = gGameUBOptions.PowergenSectorGridNo2; //= 12220;
POWERGENSECTOR_GRIDNO3 = gGameUBOptions.PowergenSectorGridNo3; //= 14155;
POWERGENSECTOR_GRIDNO4 = gGameUBOptions.PowergenSectorGridNo4; //= 13980;
POWERGENSECTOREXITGRID_GRIDNO1 = gGameUBOptions.PowergenSectorExitgridGridNo; // = 19749;
POWERGENSECTOREXITGRID_SRC_GRIDNO = gGameUBOptions.PowergenSectorExitgridSrcGridNo; //= 10979; // Exitgrid location in the sector it is created in
POWERGENSECTOREXITGRID_DST_GRIDNO = gGameUBOptions.PowergenSectorExitgridGridNo; // = 19749; // Exitgrid location in the destination sector
POWERGENFANSOUND_GRIDNO1 = gGameUBOptions.PowergenFanSoundGridNo1; //= 10979;
POWERGENFANSOUND_GRIDNO2 = gGameUBOptions.PowergenFanSoundGridNo2; //= 19749;
STARTFANBACKUPAGAIN_GRIDNO = gGameUBOptions.StartFanbackupAgainGridNo; //= 10980;
@@ -821,7 +825,7 @@ void StartFanBackUpAgain()
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
//Remove the exit grid
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
SetRenderFlags(RENDER_FLAG_FULL);
@@ -942,10 +946,10 @@ void AddExitGridForFanToPowerGenSector()
ExitGrid.ubGotoSectorX = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X; //14;
ExitGrid.ubGotoSectorY = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y; //MAP_ROW_J;
ExitGrid.ubGotoSectorZ = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z; //1;
ExitGrid.usGridNo = POWERGENSECTOREXITGRID_GRIDNO1;
ExitGrid.usGridNo = POWERGENSECTOREXITGRID_DST_GRIDNO;
//Add the exit grid when the fan is either stopped or blown up
AddExitGridToWorld( PGF__FAN_EXIT_GRID_GRIDNO, &ExitGrid );
AddExitGridToWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO, &ExitGrid );
}
BOOLEAN HandlePlayerSayingQuoteWhenFailingToOpenGateInTunnel( SOLDIERTYPE *pSoldierAtDoor, BOOLEAN fSayQuoteOnlyOnce )