diff --git a/Strategic/Luaglobal.cpp b/Strategic/Luaglobal.cpp index 3928c8b7b..2ee657f4f 100644 --- a/Strategic/Luaglobal.cpp +++ b/Strategic/Luaglobal.cpp @@ -195,6 +195,41 @@ void IniGlobalGameSetting(lua_State *L) lua_pushboolean(L, gGameUBOptions.InGameHeli); lua_setglobal(L, "UB_iniINGAMEHELI"); + + + + lua_pushinteger(L, gGameUBOptions.SectorLaunchMisslesX); + lua_setglobal(L, "UB_iniSECTOR_LAUNCH_MISSLES_X"); + + lua_pushinteger(L, gGameUBOptions.SectorLaunchMisslesY); + lua_setglobal(L, "UB_iniSECTOR_LAUNCH_MISSLES_Y"); + + lua_pushinteger(L, gGameUBOptions.SectorLaunchMisslesZ); + lua_setglobal(L, "UB_iniSECTOR_LAUNCH_MISSLES_Z"); + + + lua_pushinteger(L, gGameUBOptions.SectorFanX); + lua_setglobal(L, "UB_iniPOWERGEN_SECTOR_X"); + + lua_pushinteger(L, gGameUBOptions.SectorFanY); + lua_setglobal(L, "UB_iniPOWERGEN_SECTOR_Y"); + + lua_pushinteger(L, gGameUBOptions.SectorFanZ); + lua_setglobal(L, "UB_iniPOWERGEN_SECTOR_Z"); + + + lua_pushinteger(L, gGameUBOptions.SectorDoorInTunnelX); + lua_setglobal(L, "UB_iniSECTOR_DOOR_IN_TUNNEL_X"); + + lua_pushinteger(L, gGameUBOptions.SectorDoorInTunnelY); + lua_setglobal(L, "UB_iniSECTOR_DOOR_IN_TUNNEL_Y"); + + lua_pushinteger(L, gGameUBOptions.SectorDoorInTunnelZ); + lua_setglobal(L, "UB_SECTOR_DOOR_IN_TUNNEL_Z"); + + + + #endif //Mod Setting.ini diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index f0b4ffbc0..641fffeb4 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -6697,16 +6697,28 @@ void HandlePlayerTeamQuotesWhenEnteringSector( INT16 sSectorX, INT16 sSectorY, I SOLDIERTYPE *pSoldier = NULL; -#define NUM_VALID_SECTORS 6 -#define DELAY_FOR_PLAYER_DESC_OF_SECTOR 2 - ENTER_SECTOR_PLAYER_QUOTE PlayerSectorDescQuote[NUM_VALID_SECTORS] = + #define NUM_VALID_SECTORS 6 + #define DELAY_FOR_PLAYER_DESC_OF_SECTOR 2 + + ENTER_SECTOR_PLAYER_QUOTE PlayerSectorDescQuote[ NUM_VALID_SECTORS ] = { - {SEC_H9, 0, QUOTE_HATE_MERC_1_ON_TEAM}, - {SEC_I9, 0, QUOTE_LEARNED_TO_HATE_MERC_ON_TEAM}, - {SEC_H10, 0, QUOTE_LEARNED_TO_HATE_MERC_ON_TEAM}, - {SEC_I10, 0, QUOTE_HATE_MERC_2_ON_TEAM}, - {SEC_J13, 0, QUOTE_ENTER_SECTOR_WITH_FAN_1}, - {SEC_J14, 1, 0}, + //SEC_H9-0 + { SECTOR( gGameUBOptions.SectorGuardPostX, gGameUBOptions.SectorGuardPostY ), gGameUBOptions.SectorGuardPostZ, QUOTE_HATE_MERC_1_ON_TEAM }, + + //SEC_I9-0 + { SECTOR( gGameUBOptions.I9SectorPlayerQuoteX, gGameUBOptions.I9SectorPlayerQuoteY ), gGameUBOptions.I9SectorPlayerQuoteZ, QUOTE_LEARNED_TO_HATE_MERC_ON_TEAM }, + + //SEC_H10-0 + { SECTOR( gGameUBOptions.H10SectorPlayerQuoteX, gGameUBOptions.H10SectorPlayerQuoteY ), gGameUBOptions.H10SectorPlayerQuoteZ, QUOTE_LEARNED_TO_HATE_MERC_ON_TEAM }, + + //SEC_I10-0 + { SECTOR( gGameUBOptions.FristSectorTownX, gGameUBOptions.FristSectorTownY ), gGameUBOptions.FristSectorTownZ, QUOTE_HATE_MERC_2_ON_TEAM }, + + //SEC_J13-0 + { SECTOR( gGameUBOptions.SectorFanX, gGameUBOptions.SectorFanY ), gGameUBOptions.SectorFanZ, QUOTE_ENTER_SECTOR_WITH_FAN_1 }, + + //SEC_J14-1 + { SECTOR( gGameUBOptions.SectorGuardPostX, gGameUBOptions.SectorGuardPostY ), gGameUBOptions.ExitForFanToPowerGenSectorZ, 0 }, }; //loop through all the sectors that have the quotes @@ -6733,6 +6745,71 @@ void HandlePlayerTeamQuotesWhenEnteringSector( INT16 sSectorX, INT16 sSectorY, I } //Switch on the town ID + //I10 + if ( iSectorID == SECTOR( gGameUBOptions.FristSectorTownX, gGameUBOptions.FristSectorTownY ) ) + { + UINT8 cnt; + + for( cnt=0; cnt