mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
The following options have been moved from the campaign the campaign start screen to JA2_Options.ini:
- Maximum number of IMPs (now MAX_IMP_CHARACTERS (Default: 10)) - Enemies drop all items (now DROP_ALL (Default: FALSE)) - Merc Story Backgrounds (now BACKGROUNDS (Default: TRUE)) - Food System (now FOOD (Default: FALSE)) - Improved Interrupt System (now IMPROVED_INTERRUPT_SYSTEM (Default: TRUE)) - Inventory Manipulation Costs AP (now INVENTORY_MANIPULATION_COSTS_AP (Default: FALSE)) For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23855&goto=354656&#msg_354656 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+13
-1027
File diff suppressed because it is too large
Load Diff
+49
-14
@@ -113,7 +113,8 @@ BOOLEAN GetCDromDriveLetter( STR8 pString );
|
||||
BOOLEAN IsDriveLetterACDromDrive( STR pDriveLetter );
|
||||
void CDromEjectionErrorMessageBoxCallBack( UINT8 bExitValue );
|
||||
|
||||
|
||||
// these wrappers have the benefit that changing the location of the variable (gameinitoptionscreen/ini/ingame options) doesn't require huge changes throughout the code
|
||||
// additionally, turning off a feature (for UB, for MP...) can be done here without additional checks in the code
|
||||
bool UsingNewInventorySystem()
|
||||
{
|
||||
return (gGameOptions.ubInventorySystem == INVENTORY_NEW);
|
||||
@@ -129,6 +130,40 @@ bool UsingNewCTHSystem()
|
||||
return (gGameOptions.fUseNCTH == TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN UsingFoodSystem()
|
||||
{
|
||||
return gGameExternalOptions.fFoodSystem;
|
||||
}
|
||||
|
||||
BOOLEAN UsingBackGroundSystem()
|
||||
{
|
||||
return gGameExternalOptions.fBackGround;
|
||||
}
|
||||
|
||||
BOOLEAN UsingImprovedInterruptSystem()
|
||||
{
|
||||
#ifdef JA2EDITOR
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
// this feature is off in multiplayer
|
||||
return (!is_networked && gGameExternalOptions.fImprovedInterruptSystem);
|
||||
}
|
||||
|
||||
BOOLEAN UsingEnemiesDropAllItemsSystem()
|
||||
{
|
||||
return gGameExternalOptions.fEnemiesDropAllItems;
|
||||
}
|
||||
|
||||
BOOLEAN UsingInventoryCostsAPSystem()
|
||||
{
|
||||
#ifdef JA2EDITOR
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return ( gGameExternalOptions.fInventoryCostsAP );
|
||||
}
|
||||
|
||||
std::string StringToLower(std::string strToConvert)
|
||||
{//change each element of the string to lower case
|
||||
for(unsigned int i=0;i<strToConvert.length();i++)
|
||||
@@ -158,7 +193,6 @@ BOOLEAN IsNIVModeValid(bool checkRes)
|
||||
return isValid;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN LoadGameSettings()
|
||||
{
|
||||
try
|
||||
@@ -636,16 +670,8 @@ void InitGameOptions()
|
||||
gGameOptions.fAirStrikes = FALSE;
|
||||
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
||||
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
||||
|
||||
//Fast Bobby Ray Shipments (CHECK)
|
||||
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||
//Inventory AP Costs (CHECK)
|
||||
gGameOptions.fInventoryCostsAP = TRUE;
|
||||
|
||||
|
||||
gGameOptions.fUseNCTH = FALSE;
|
||||
gGameOptions.fImprovedInterruptSystem = TRUE;
|
||||
gGameOptions.fBackGround = FALSE;
|
||||
gGameOptions.fFoodSystem = FALSE;
|
||||
|
||||
//CHRISL: override default inventory mode when in low res
|
||||
if(IsNIVModeValid(true) == FALSE)
|
||||
@@ -670,7 +696,6 @@ void InitGameOptions()
|
||||
gGameOptions.fNewTraitSystem = FALSE;
|
||||
|
||||
gGameOptions.ubProgressSpeedOfItemsChoices = ITEM_PROGRESS_NORMAL;
|
||||
gGameOptions.fEnemiesDropAllItems = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -724,7 +749,7 @@ void LoadGameExternalOptions()
|
||||
|
||||
// HEADROCK PROFEX/3.6: Activate this to write Profile data to MercProfiles Out.XML and MercOpinions Out.XML. This can be used to convert PROF.DAT to XML format.
|
||||
gGameExternalOptions.fWriteProfileDataToXML = iniReader.ReadBoolean("Data File Settings","WRITE_PROFILE_DATA_TO_XML", FALSE);
|
||||
|
||||
|
||||
// Use "EnemyWeaponDrop.XML" etc. for determining which items are dropped?
|
||||
gGameExternalOptions.ubEnemiesItemDrop = iniReader.ReadInteger("Data File Settings","USE_EXTERNALIZED_ENEMY_ITEM_DROPS", 0, 0, 1);
|
||||
|
||||
@@ -734,6 +759,9 @@ void LoadGameExternalOptions()
|
||||
//Madd: set number of pItem files to be used
|
||||
gGameExternalOptions.ubNumPItems = iniReader.ReadInteger("Data File Settings","NUM_P_ITEMS", 3, 3, MAX_PITEMS);
|
||||
|
||||
// Flugente: backgrounds
|
||||
gGameExternalOptions.fBackGround = iniReader.ReadBoolean("Data File Settings", "BACKGROUNDS", TRUE );
|
||||
|
||||
//################# Merc Recruitment Settings #################
|
||||
|
||||
// WDS: Allow flexible numbers of IMPs of each sex
|
||||
@@ -1119,6 +1147,9 @@ void LoadGameExternalOptions()
|
||||
// WANNE: This makes problem for the AI soldiers on the pure client, so why is is set to false
|
||||
gGameExternalOptions.fNoStandingAnimAdjustInCombat = FALSE;
|
||||
|
||||
// manipulating the inventory in tactical costs AP
|
||||
gGameExternalOptions.fInventoryCostsAP = iniReader.ReadBoolean("Tactical Interface Settings", "INVENTORY_MANIPULATION_COSTS_AP", FALSE );
|
||||
|
||||
//Inventory AP Weight Divisor
|
||||
gGameExternalOptions.uWeightDivisor = iniReader.ReadFloat("Tactical Interface Settings","INV_AP_WEIGHT_DIVISOR",5,1,100);
|
||||
|
||||
@@ -1158,6 +1189,9 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fAssignTraitsToMilitia = iniReader.ReadBoolean("Tactical Difficulty Settings", "ASSIGN_SKILL_TRAITS_TO_MILITIA", FALSE);
|
||||
gGameExternalOptions.bAssignedTraitsRarity = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSIGNED_SKILL_TRAITS_RARITY ", 0, -100, 100);
|
||||
|
||||
// Flugente: drop all is now set in the ini instead of the starting screen
|
||||
gGameExternalOptions.fEnemiesDropAllItems = iniReader.ReadBoolean("Tactical Difficulty Settings", "DROP_ALL", FALSE );
|
||||
|
||||
// HEADROCK HAM B2.8: At "1", Militia will drop their equipment similar to enemies, IF killed by non-player character. At "2" they drop whenever killed.
|
||||
gGameExternalOptions.ubMilitiaDropEquipment = iniReader.ReadInteger("Tactical Difficulty Settings","MILITIA_DROP_EQUIPMENT", 0, 0, 2 );
|
||||
|
||||
@@ -1474,7 +1508,7 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fRobotNoReadytime = iniReader.ReadBoolean("Tactical Gameplay Settings", "ROBOT_NO_READYTIME", FALSE);
|
||||
|
||||
// improved Interrupt System (info: multiplayer game ALWAYS use the old interrupt system, because the new one causes crashes, no problem so far)
|
||||
//gGameOptions.fImprovedInterruptSystem = iniReader.ReadBoolean("Tactical Gameplay Settings", "IMPROVED_INTERRUPT_SYSTEM", TRUE);
|
||||
gGameExternalOptions.fImprovedInterruptSystem = iniReader.ReadBoolean("Tactical Gameplay Settings", "IMPROVED_INTERRUPT_SYSTEM", TRUE);
|
||||
gGameExternalOptions.ubBasicPercentRegisterValueIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "BASIC_PERCENTAGE_APS_REGISTERED", 60, 0, 250);
|
||||
gGameExternalOptions.ubPercentRegisterValuePerLevelIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "PERCENTAGE_APS_REGISTERED_PER_EXP_LEVEL", 4, 0, 100);
|
||||
gGameExternalOptions.ubBasicReactionTimeLengthIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "BASIC_REACTION_TIME_LENGTH", 25, 5, 100);
|
||||
@@ -1706,6 +1740,7 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fPrintStructureTileset = iniReader.ReadBoolean("Tactical Fortification Settings", "PRINTOUTTILESET", FALSE );
|
||||
|
||||
//################# Tactical Food Settings ##################
|
||||
gGameExternalOptions.fFoodSystem = iniReader.ReadBoolean("Tactical Food Settings", "FOOD", FALSE );
|
||||
gGameExternalOptions.usFoodDigestionHourlyBaseFood = iniReader.ReadInteger("Tactical Food Settings", "FOOD_DIGESTION_HOURLY_BASE_FOOD", 20, 0, 250);
|
||||
gGameExternalOptions.usFoodDigestionHourlyBaseDrink = iniReader.ReadInteger("Tactical Food Settings", "FOOD_DIGESTION_HOURLY_BASE_DRINK", 130, 0, 250);
|
||||
gGameExternalOptions.sFoodDigestionSleep = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DIGESTION_SLEEP", 0.6f, 0.0f, 10.0f);
|
||||
|
||||
+22
-7
@@ -253,17 +253,17 @@ typedef struct
|
||||
UINT8 ubAttachmentSystem;
|
||||
UINT8 ubSquadSize;
|
||||
// SANDRO - added variables
|
||||
UINT8 ubFiller1; // Flugente: used to be UINT8 ubMaxIMPCharacters;
|
||||
UINT8 ubFiller1; // Flugente: used to be UINT8 ubMaxIMPCharacters;
|
||||
BOOLEAN fNewTraitSystem;
|
||||
BOOLEAN fEnemiesDropAllItems;
|
||||
UINT8 ubFiller2; // Flugente: used to be BOOLEAN fEnemiesDropAllItems;
|
||||
UINT8 ubProgressSpeedOfItemsChoices;
|
||||
|
||||
BOOLEAN fInventoryCostsAP; // ubFiller: From 500 to 499
|
||||
UINT8 ubFiller3; // Flugente: used to be BOOLEAN fInventoryCostsAP; // ubFiller: From 500 to 499
|
||||
|
||||
BOOLEAN fUseNCTH; // ubFiller: From 499 to 498
|
||||
BOOLEAN fImprovedInterruptSystem; // ubFiller: From 498 to 497
|
||||
BOOLEAN fBackGround; // ubFiller: From 497 to 496
|
||||
BOOLEAN fFoodSystem; // ubFiler: From 496 to 495
|
||||
UINT8 ubFiller4; // Flugente: used to be BOOLEAN fImprovedInterruptSystem; // ubFiller: From 498 to 497
|
||||
UINT8 ubFiller5; // Flugente: used to be BOOLEAN fBackGround; // ubFiller: From 497 to 496
|
||||
UINT8 ubFiller6; // Flugente: used to be BOOLEAN fFoodSystem; // ubFiler: From 496 to 495
|
||||
|
||||
UINT8 ubIronManMode; // ubFiler: From 495 to 494
|
||||
|
||||
@@ -275,6 +275,12 @@ typedef struct
|
||||
bool UsingNewInventorySystem();
|
||||
bool UsingNewAttachmentSystem();
|
||||
bool UsingNewCTHSystem();
|
||||
BOOLEAN UsingFoodSystem();
|
||||
BOOLEAN UsingBackGroundSystem();
|
||||
BOOLEAN UsingImprovedInterruptSystem();
|
||||
BOOLEAN UsingEnemiesDropAllItemsSystem();
|
||||
BOOLEAN UsingInventoryCostsAPSystem();
|
||||
|
||||
BOOLEAN IsNIVModeValid(bool checkRes = true);
|
||||
|
||||
// Snap: Options read from an INI file in the default of custom Data directory
|
||||
@@ -351,7 +357,7 @@ typedef struct
|
||||
INT8 bCamoKitArea; // silversurfer added this. It defines how much of the body can be painted with camo kits (usually face and hands).
|
||||
BOOLEAN fEnhancedCloseCombatSystem;
|
||||
|
||||
//BOOLEAN fImprovedInterruptSystem;
|
||||
BOOLEAN fImprovedInterruptSystem;
|
||||
UINT8 ubBasicPercentRegisterValueIIS;
|
||||
UINT8 ubPercentRegisterValuePerLevelIIS;
|
||||
UINT8 ubBasicReactionTimeLengthIIS;
|
||||
@@ -432,6 +438,7 @@ typedef struct
|
||||
BOOLEAN fPrintStructureTileset;
|
||||
|
||||
// Flugente: food settings
|
||||
BOOLEAN fFoodSystem;
|
||||
UINT16 usFoodDigestionHourlyBaseFood;
|
||||
UINT16 usFoodDigestionHourlyBaseDrink;
|
||||
FLOAT sFoodDigestionSleep;
|
||||
@@ -889,6 +896,8 @@ typedef struct
|
||||
INT16 iPenaltyShootUnSeen;
|
||||
BOOLEAN fNoStandingAnimAdjustInCombat; // Flugente: in turnbased combat, do not adjust animation after arriving at target location
|
||||
|
||||
BOOLEAN fInventoryCostsAP; // manipulating the inventory in tactical costs AP
|
||||
|
||||
//Inventory AP Weight Divisor
|
||||
FLOAT uWeightDivisor;
|
||||
|
||||
@@ -1078,6 +1087,9 @@ typedef struct
|
||||
UINT16 usMaxShooterCoweringPenalty;
|
||||
UINT16 usMaxTargetCoweringPenalty;
|
||||
|
||||
// Flugente: drop all is now set in the ini instead of the starting screen
|
||||
BOOLEAN fEnemiesDropAllItems;
|
||||
|
||||
// HEADROCK HAM B2.8: If this is turned on, Militia will drop their equipment similar to enemies, IF killed by non-player character.
|
||||
UINT8 ubMilitiaDropEquipment;
|
||||
|
||||
@@ -1445,6 +1457,9 @@ typedef struct
|
||||
FLOAT dIndividualMilitiaHourlyHealthPercentageGain;
|
||||
FLOAT dIndividualMilitiaDoctorHealModifier;
|
||||
|
||||
// Flugente: backgrounds
|
||||
BOOLEAN fBackGround;
|
||||
|
||||
// Sandro: Alternative weapon holding (rifles fired from hip / pistols fired one-handed)
|
||||
UINT8 ubAllowAlternativeWeaponHolding;
|
||||
UINT8 ubToAltWeaponHoldReadyAPsPerc;
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 18.08.22" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 18.02.09" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
CHAR16 zRevisionNumber[16] = { L"Revision 8598" };
|
||||
CHAR16 zRevisionNumber[16] = { L"Revision 8610" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
@@ -1593,8 +1593,6 @@ UINT32 InitializeJA2(void)
|
||||
gfIntendOnEnteringEditor = TRUE;
|
||||
gGameOptions.fGunNut = TRUE;
|
||||
gGameOptions.fAirStrikes = FALSE;
|
||||
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||
gGameOptions.fInventoryCostsAP = FALSE;
|
||||
return( GAME_SCREEN );
|
||||
}
|
||||
if ( strcmp( gzCommandLine, "-EDITOR" ) == 0 )
|
||||
@@ -1609,8 +1607,6 @@ UINT32 InitializeJA2(void)
|
||||
gfIntendOnEnteringEditor = TRUE;
|
||||
gGameOptions.fGunNut = TRUE;
|
||||
gGameOptions.fAirStrikes = FALSE;
|
||||
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||
gGameOptions.fInventoryCostsAP = FALSE;
|
||||
return( GAME_SCREEN );
|
||||
}
|
||||
|
||||
@@ -1628,8 +1624,6 @@ UINT32 InitializeJA2(void)
|
||||
gfIntendOnEnteringEditor = TRUE;
|
||||
gGameOptions.fGunNut = TRUE;
|
||||
gGameOptions.fAirStrikes = FALSE;
|
||||
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||
gGameOptions.fInventoryCostsAP = FALSE;
|
||||
return( GAME_SCREEN );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -524,7 +524,7 @@ void BtnIMPMinorTraitFinishCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
// Flugente: setting determines whether we see the background page
|
||||
if ( gGameOptions.fBackGround )
|
||||
if ( UsingBackGroundSystem() )
|
||||
{
|
||||
iCurrentImpPage = IMP_BACKGROUND;
|
||||
|
||||
|
||||
@@ -1664,7 +1664,7 @@ void DisplayCharStats( INT32 iId, INT32 iSlot )
|
||||
// Background
|
||||
|
||||
// display background
|
||||
if ( gGameOptions.fBackGround )
|
||||
if ( UsingBackGroundSystem() )
|
||||
{
|
||||
UINT8 loc = 21;
|
||||
UINT8 regionnr = 12;
|
||||
@@ -7603,7 +7603,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
}
|
||||
if( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||
if( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving != 0 && UsingImprovedInterruptSystem() )
|
||||
{
|
||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsMartialArts[27], ( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving * (fExpertLevel ? 2 : 1)), sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
@@ -7641,7 +7641,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[2], ( gSkillTraitValues.ubSLEffectiveLevelAsStandby * (fExpertLevel ? 2 : 1)));
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubSLCollectiveInterruptsBonus != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||
if( gSkillTraitValues.ubSLCollectiveInterruptsBonus != 0 && UsingImprovedInterruptSystem() )
|
||||
{
|
||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[11], ( gSkillTraitValues.ubSLCollectiveInterruptsBonus * (fExpertLevel ? 2 : 1)), sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
@@ -8007,7 +8007,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[2], gSkillTraitValues.ubSTStealthBonus, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||
if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && UsingImprovedInterruptSystem() )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[4], gSkillTraitValues.ubSTReducedAPsRegistered, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
@@ -8296,7 +8296,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
||||
}
|
||||
}
|
||||
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
if ( gSkillTraitValues.sSVFoodConsumption != 0 )
|
||||
{
|
||||
|
||||
+1
-1
@@ -655,4 +655,4 @@ void BtnMPSContinueCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-40
@@ -2572,23 +2572,10 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
|
||||
// Disable Reinforcements
|
||||
gGameExternalOptions.gfAllowReinforcements = false;
|
||||
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
|
||||
|
||||
// WANNE: The new improved interrupt system (IIS) does not work with multiplayer, so disable it
|
||||
//gGameOptions.fImprovedInterruptSystem = false;
|
||||
|
||||
// Disable Real-Time Mode
|
||||
// SANDRO - huh? real-time sneak is in preferences
|
||||
//gGameExternalOptions.fAllowRealTimeSneak = false;
|
||||
|
||||
|
||||
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false;
|
||||
gGameExternalOptions.fQuietRealTimeSneak = false;
|
||||
|
||||
// WANNE: Take the settings from the ja2_options.ini
|
||||
// WANNE: Enable fast loading
|
||||
/*gGameExternalOptions.fDisableLaptopTransition = true;
|
||||
gGameExternalOptions.fFastWWWSitesLoading = true;
|
||||
gGameExternalOptions.fDisableStrategicTransition = true;*/
|
||||
|
||||
|
||||
// WANNE: fix HOT DAY in night at arrival by night.
|
||||
// Explanation: If game starting time + first arrival delay < 07:00 (111600) -> we arrive before the sun rises or
|
||||
// if game starting time + first arrival delay >= 21:00 (162000) -> we arrive after the sun goes down
|
||||
@@ -2631,14 +2618,7 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
|
||||
|
||||
gGameOptions.ubSquadSize = 6;
|
||||
|
||||
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||
gGameOptions.fInventoryCostsAP = FALSE;
|
||||
|
||||
gGameOptions.fUseNCTH = FALSE;
|
||||
gGameOptions.fImprovedInterruptSystem = FALSE;
|
||||
gGameOptions.fBackGround = FALSE;
|
||||
gGameOptions.fFoodSystem = FALSE;
|
||||
|
||||
|
||||
// Server forces us to play with new Inventory, but NIV is not allowed on the client,
|
||||
// because of wrong resolution or other stuff
|
||||
@@ -2796,22 +2776,13 @@ void reapplySETTINGS()
|
||||
// Disable Reinforcements
|
||||
gGameExternalOptions.gfAllowReinforcements = false;
|
||||
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
|
||||
|
||||
// WANNE: The new improved interrupt system (IIS) does not work with multiplayer, so disable it
|
||||
//gGameOptions.fImprovedInterruptSystem = false;
|
||||
|
||||
|
||||
// Disable Real-Time Mode
|
||||
// SANDRO - real-time sneak is in preferences
|
||||
//gGameExternalOptions.fAllowRealTimeSneak = false;
|
||||
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false;
|
||||
gGameExternalOptions.fQuietRealTimeSneak = false;
|
||||
|
||||
// WANNE: Take the settings from the ja2_options.ini
|
||||
// WANNE: Enable fast loading
|
||||
/*gGameExternalOptions.fDisableLaptopTransition = true;
|
||||
gGameExternalOptions.fFastWWWSitesLoading = true;
|
||||
gGameExternalOptions.fDisableStrategicTransition = true;*/
|
||||
|
||||
|
||||
// WANNE: fix HOT DAY in night at arrival by night.
|
||||
// Explanation: If game starting time + first arrival delay < 07:00 (111600) -> we arrive before the sun rises or
|
||||
// if game starting time + first arrival delay >= 21:00 (162000) -> we arrive after the sun goes down
|
||||
@@ -2853,14 +2824,8 @@ void reapplySETTINGS()
|
||||
}
|
||||
|
||||
gGameOptions.ubSquadSize = 6;
|
||||
|
||||
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||
gGameOptions.fInventoryCostsAP = FALSE;
|
||||
|
||||
|
||||
gGameOptions.fUseNCTH = FALSE;
|
||||
gGameOptions.fImprovedInterruptSystem = FALSE;
|
||||
gGameOptions.fBackGround = FALSE;
|
||||
gGameOptions.fFoodSystem = FALSE;
|
||||
|
||||
// WANNE - MP: We have to re-initialize the correct interface
|
||||
if((UsingNewInventorySystem() == true) && IsNIVModeValid(true))
|
||||
|
||||
+1
-9
@@ -3594,13 +3594,7 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
|
||||
|
||||
SaveGameHeader.sInitialGameOptions.ubSquadSize = gGameOptions.ubSquadSize;
|
||||
|
||||
|
||||
//SaveGameHeader.sInitialGameOptions.fBobbyRayFastShipments = gGameOptions.fBobbyRayFastShipments;
|
||||
SaveGameHeader.sInitialGameOptions.fInventoryCostsAP = gGameOptions.fInventoryCostsAP;
|
||||
|
||||
SaveGameHeader.sInitialGameOptions.fUseNCTH = gGameOptions.fUseNCTH;
|
||||
SaveGameHeader.sInitialGameOptions.fImprovedInterruptSystem = gGameOptions.fImprovedInterruptSystem;
|
||||
SaveGameHeader.sInitialGameOptions.fBackGround = gGameOptions.fBackGround;
|
||||
|
||||
//
|
||||
// Save the Save Game header file
|
||||
@@ -3615,9 +3609,7 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
|
||||
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR in SaveCurrentSectorsInformationToTempItemFile()");
|
||||
goto FAILED_TO_SAVE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//if we are saving the quick save,
|
||||
if( ubSaveGameID == 0 )
|
||||
{
|
||||
|
||||
+10
-10
@@ -1485,7 +1485,7 @@ BOOLEAN CanCharacterPatient( SOLDIERTYPE *pSoldier )
|
||||
return ( TRUE );
|
||||
|
||||
// Flugente: stats can also be damaged
|
||||
if ( !gGameOptions.fFoodSystem || ( gGameOptions.fFoodSystem && pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold ) )
|
||||
if ( !UsingFoodSystem() || ( pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold ) )
|
||||
{
|
||||
if ( pSoldier->usStarveDamageHealth > 0 || pSoldier->usStarveDamageStrength > 0 )
|
||||
return ( TRUE );
|
||||
@@ -3134,7 +3134,7 @@ UINT16 CalculateHealingPointsForDoctor(SOLDIERTYPE *pDoctor, UINT16 *pusMaxPts,
|
||||
ReducePointsForFatigue( pDoctor, &usHealPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pDoctor, &usHealPts );
|
||||
|
||||
// count how much medical supplies we have
|
||||
@@ -3228,7 +3228,7 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts
|
||||
ReducePointsForFatigue( pSoldier, &usRepairPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pSoldier, &usRepairPts );
|
||||
|
||||
// figure out what shape his "equipment" is in ("coming" in JA3: Viagra - improves the "shape" your "equipment" is in)
|
||||
@@ -3313,7 +3313,7 @@ UINT8 CalculateCleaningPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxP
|
||||
ReducePointsForFatigue( pSoldier, &usCleaningPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pSoldier, &usCleaningPts );
|
||||
|
||||
// return current cleaning pts
|
||||
@@ -4047,7 +4047,7 @@ void UpdatePatientsWhoAreDoneHealing( void )
|
||||
if ( IS_PATIENT(pTeamSoldier->bAssignment) && !IS_DOCTOR(pTeamSoldier->bAssignment) && (pTeamSoldier->stats.bLife == pTeamSoldier->stats.bLifeMax) && pTeamSoldier->HasDisease(TRUE, TRUE) )
|
||||
{
|
||||
// Flugente: stats can also be damaged
|
||||
if ( !gGameOptions.fFoodSystem || (gGameOptions.fFoodSystem && pTeamSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pTeamSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
|
||||
if ( !UsingFoodSystem() || ( pTeamSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pTeamSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
|
||||
{
|
||||
if ( pTeamSoldier->usStarveDamageHealth > 0 || pTeamSoldier->usStarveDamageStrength > 0 )
|
||||
fHasDamagedStat = TRUE;
|
||||
@@ -7068,7 +7068,7 @@ INT16 GetBonusTrainingPtsDueToInstructor( SOLDIERTYPE *pInstructor, SOLDIERTYPE
|
||||
ReducePointsForFatigue( pInstructor, &uiTrainingPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pInstructor, &uiTrainingPts );
|
||||
|
||||
sTrainingPts = (INT16)uiTrainingPts;
|
||||
@@ -7187,7 +7187,7 @@ INT16 GetSoldierTrainingPts( SOLDIERTYPE *pSoldier, INT8 bTrainStat, UINT16 *pus
|
||||
ReducePointsForFatigue( pSoldier, &uiTrainingPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pSoldier, &uiTrainingPts );
|
||||
|
||||
sTrainingPts = (INT16)uiTrainingPts;
|
||||
@@ -7311,7 +7311,7 @@ INT16 GetSoldierStudentPts( SOLDIERTYPE *pSoldier, INT8 bTrainStat, UINT16 *pusM
|
||||
ReducePointsForFatigue( pSoldier, &uiTrainingPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pSoldier, &uiTrainingPts );
|
||||
|
||||
sTrainingPts = (INT16)uiTrainingPts;
|
||||
@@ -8763,7 +8763,7 @@ INT16 GetTownTrainPtsForCharacter( SOLDIERTYPE *pTrainer, UINT16 *pusMaxPts )
|
||||
ReducePointsForFatigue( pTrainer, &uiTrainingPts );
|
||||
|
||||
// Flugente: our food situation influences our effectiveness
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
ReducePointsForHunger( pTrainer, &uiTrainingPts );
|
||||
|
||||
sTotalTrainingPts = (INT16)uiTrainingPts;
|
||||
@@ -18578,7 +18578,7 @@ UINT8 CalcSoldierNeedForSleep( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
// Flugente: ubNeedForSleep can now be influenced by our food situation
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
FoodNeedForSleepModifiy(pSoldier, &ubNeedForSleep);
|
||||
|
||||
return( ubNeedForSleep );
|
||||
|
||||
@@ -87,7 +87,7 @@ CHAR16 zString[128];
|
||||
HandleTownLoyalty();
|
||||
|
||||
// Flugente: food update
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
HourlyFoodUpdate();
|
||||
|
||||
// hourly update of team assignments
|
||||
|
||||
@@ -606,9 +606,7 @@ void IniGlobalGameSetting(lua_State *L)
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.fRandomManuelText);
|
||||
lua_setglobal(L, "UB_RandomManuelText");
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
|
||||
//Old
|
||||
lua_pushinteger(L, BARRETT_UB);
|
||||
lua_setglobal(L, "itemBARRETT_UB");
|
||||
|
||||
@@ -6137,7 +6137,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
INT32 tickspassed = deltaSeconds / NUM_SEC_PER_TACTICAL_TURN;//1 tick is 5 seconds
|
||||
|
||||
if ( tickspassed == 0 || !itemStack->exists() ||
|
||||
!( gGameExternalOptions.fWeaponOverheating || gGameOptions.fFoodSystem ) )
|
||||
!( gGameExternalOptions.fWeaponOverheating || UsingFoodSystem() ) )
|
||||
return;
|
||||
|
||||
|
||||
@@ -6188,7 +6188,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
}//end overheating
|
||||
|
||||
// ... if it is food and the food system is active ...
|
||||
if ( gGameOptions.fFoodSystem && Item[ itemStack->usItem ].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[ itemStack->usItem ].foodtype > 0 )
|
||||
{
|
||||
if ( Food[ Item[ itemStack->usItem ].foodtype ].usDecayRate > 0.0f ) // ... if the food can decay...
|
||||
{
|
||||
@@ -6210,7 +6210,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
void HandleSectorCooldownFunctions( INT16 sMapX, INT16 sMapY, INT8 sMapZ, std::vector<WORLDITEM>& pWorldItem, UINT32 size, BOOLEAN fWithMinutes, BOOLEAN fUndo )//dnl ch75 271013
|
||||
{
|
||||
// if not using overheating or food system, no point in all this
|
||||
if ( !gGameExternalOptions.fWeaponOverheating && !gGameOptions.fFoodSystem )
|
||||
if ( !gGameExternalOptions.fWeaponOverheating && !UsingFoodSystem() )
|
||||
return;
|
||||
|
||||
UINT32 tickspassed = 1;
|
||||
|
||||
@@ -2360,7 +2360,7 @@ void DrawCharStats( INT16 sCharNum )
|
||||
swprintf( sString, L"%d", pSoldier->stats.bStrength + pSoldier->bExtraStrength );
|
||||
|
||||
// SANDRO - if damaged stat we could regain, show in red until repaired
|
||||
if ( ( gGameOptions.fNewTraitSystem && ( pSoldier->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0 )) || (gGameOptions.fFoodSystem && pSoldier->usStarveDamageStrength > 0) )
|
||||
if ( ( gGameOptions.fNewTraitSystem && ( pSoldier->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0 )) || ( UsingFoodSystem() && pSoldier->usStarveDamageStrength > 0) )
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
@@ -9628,7 +9628,7 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
||||
return;
|
||||
}
|
||||
|
||||
if(gGameOptions.fInventoryCostsAP && (gTacticalStatus.uiFlags & INCOMBAT))//dnl ch66 070913 if fInventoryCostsAP is set and we are in combat then moving equipment in strategic screen is not allowed
|
||||
if ( UsingInventoryCostsAPSystem() && (gTacticalStatus.uiFlags & INCOMBAT))//dnl ch66 070913 if fInventoryCostsAP is set and we are in combat then moving equipment in strategic screen is not allowed
|
||||
return;
|
||||
|
||||
// make sure we're here legally
|
||||
|
||||
+1
-1
@@ -2169,7 +2169,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
}
|
||||
|
||||
// Flugente: food system - symbols used if hungry or thirsty
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
if ( MercPtrs[ pFace->ubSoldierID ]->bDrinkLevel < FoodMoraleMods[FOOD_MERC_START_SHOW_HUNGER_SYMBOL].bThreshold )
|
||||
{
|
||||
|
||||
+3
-3
@@ -102,7 +102,7 @@ void AddFoodpoints( INT32& arCurrentFood, INT32 aVal )
|
||||
|
||||
BOOLEAN DoesSoldierRefuseToEat( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj )
|
||||
{
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
// static variables to remember the last food someone was forced to eat
|
||||
static UINT8 lasteater = 0;
|
||||
@@ -854,7 +854,7 @@ void SectorFillCanteens( void )
|
||||
|
||||
// it would be pretty pointless to fill our canteens and then not to drink from them even though we are hungry. If there is an unlimited water source in this sector, drink from our
|
||||
// freshly filled canteens. Thus calling this function repeatedly will cause us to drink till we're full, and restore our canteens to full level
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
EatFromInventory( pSoldier, TRUE );
|
||||
}
|
||||
}
|
||||
@@ -1129,7 +1129,7 @@ void DrinkFromWaterTap( SOLDIERTYPE* pSoldier )
|
||||
if ( pSoldier->ubProfile == ROBOT || IsVehicle( pSoldier ) )
|
||||
return;
|
||||
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
INT32 watertoadd = max( 0, FoodMoraleMods[FOOD_NORMAL].bThreshold - pSoldier->bDrinkLevel );
|
||||
|
||||
|
||||
@@ -4069,9 +4069,10 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
}
|
||||
}
|
||||
|
||||
if ( gGameOptions.fFoodSystem && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
{
|
||||
if (!fDrawGenIndexes) fDrawGenIndexes = ++cnt; // new index line here?
|
||||
if (!fDrawGenIndexes)
|
||||
fDrawGenIndexes = ++cnt; // new index line here?
|
||||
|
||||
////////////////////// POISONED FOOD
|
||||
if ( (*gpItemDescObject)[0]->data.bTemperature != 0 )
|
||||
@@ -5739,7 +5740,7 @@ void DrawAdvancedStats( OBJECTTYPE * gpItemDescObject )
|
||||
}
|
||||
}
|
||||
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
if ( ( Item[gpItemDescObject->usItem].foodtype > 0 ) ||
|
||||
( fComparisonMode && Item[gpComparedItemDescObject->usItem].foodtype > 0 ) )
|
||||
@@ -14027,8 +14028,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////// FOOD
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
UINT32 fFoodtype = Item[gpItemDescObject->usItem].foodtype;
|
||||
UINT32 fComparedFoodtype = 0;
|
||||
|
||||
@@ -4015,7 +4015,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
if ( OVERHEATING_MAX_TEMPERATURE > 0 )
|
||||
{
|
||||
// Flugente: display condition of food if it can decay
|
||||
if ( gGameOptions.fFoodSystem && Item[pObject->usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[pObject->usItem].foodtype > 0 )
|
||||
{
|
||||
FLOAT condition = (*pObject)[0]->data.bTemperature / OVERHEATING_MAX_TEMPERATURE;
|
||||
|
||||
@@ -7318,7 +7318,7 @@ void RenderItemDescriptionBox( )
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
// Flugente: display condition of food if it can decay
|
||||
else if ( gGameOptions.fFoodSystem == TRUE && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
else if ( UsingFoodSystem() && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
{
|
||||
if ( OVERHEATING_MAX_TEMPERATURE > 0 )
|
||||
{
|
||||
|
||||
@@ -2781,7 +2781,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
FindFontRightCoordinates(SM_DEX_X, SM_DEX_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeStrengthTime, (BOOLEAN)(gpSMCurrentMerc->usValueGoneUp & STRENGTH_INCREASE ? TRUE : FALSE), (BOOLEAN)(((gGameOptions.fNewTraitSystem && (gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0)) || (gGameOptions.fFoodSystem && gpSMCurrentMerc->usStarveDamageStrength > 0)) ? TRUE : FALSE), gpSMCurrentMerc->bExtraStrength != 0 ); // SANDRO
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeStrengthTime, (BOOLEAN)(gpSMCurrentMerc->usValueGoneUp & STRENGTH_INCREASE ? TRUE : FALSE), (BOOLEAN)(((gGameOptions.fNewTraitSystem && (gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0)) || ( UsingFoodSystem() && gpSMCurrentMerc->usStarveDamageStrength > 0)) ? TRUE : FALSE), gpSMCurrentMerc->bExtraStrength != 0 ); // SANDRO
|
||||
|
||||
swprintf( sString, L"%2d", gpSMCurrentMerc->stats.bStrength + gpSMCurrentMerc->bExtraStrength );
|
||||
FindFontRightCoordinates(SM_STR_X, SM_STR_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
@@ -2980,14 +2980,12 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
{
|
||||
GetMoraleString( gpSMCurrentMerc, pMoraleStr );
|
||||
// Flugente: food info if food system is active
|
||||
if ( gGameOptions.fFoodSystem && gpSMCurrentMerc->ubProfile != ROBOT && !IsVehicle(gpSMCurrentMerc) )
|
||||
if ( UsingFoodSystem() && gpSMCurrentMerc->ubProfile != ROBOT && !IsVehicle(gpSMCurrentMerc) )
|
||||
{
|
||||
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_FOOD_POPUPTEXT ], gpSMCurrentMerc->stats.bLife, gpSMCurrentMerc->stats.bLifeMax, gpSMCurrentMerc->bBreath, gpSMCurrentMerc->bBreathMax, pMoraleStr, (INT32)(100*(gpSMCurrentMerc->bDrinkLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%", (INT32)(100*(gpSMCurrentMerc->bFoodLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_POPUPTEXT ], gpSMCurrentMerc->stats.bLife, gpSMCurrentMerc->stats.bLifeMax, gpSMCurrentMerc->bBreath, gpSMCurrentMerc->bBreathMax, pMoraleStr );
|
||||
}
|
||||
|
||||
@@ -3609,7 +3607,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
BOOLEAN fNewItem = FALSE;
|
||||
static BOOLEAN fRightDown = FALSE;
|
||||
static BOOLEAN fLeftDown = FALSE;
|
||||
BOOLEAN INV_AP_COST = gGameOptions.fInventoryCostsAP;
|
||||
BOOLEAN INV_AP_COST = UsingInventoryCostsAPSystem();
|
||||
|
||||
uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
@@ -5514,7 +5512,7 @@ void RenderTEAMPanel( BOOLEAN fDirty )
|
||||
{
|
||||
GetMoraleString( pSoldier, pMoraleStr );
|
||||
|
||||
if ( gGameOptions.fFoodSystem && pSoldier->ubProfile != ROBOT && !IsVehicle(pSoldier) )
|
||||
if ( UsingFoodSystem() && pSoldier->ubProfile != ROBOT && !IsVehicle(pSoldier) )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_FOOD_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr, (INT32)(100*(pSoldier->bDrinkLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%", (INT32)(100*(pSoldier->bFoodLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%" );
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ void DrawItemUIBarEx( OBJECTTYPE *pObject, UINT8 ubStatus, INT16 sXPos, INT16 sY
|
||||
if ( ubStatus == DRAW_ITEM_TEMPERATURE )
|
||||
{
|
||||
// the food item bar always has full size
|
||||
if ( gGameOptions.fFoodSystem == TRUE && Item[pObject->usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[pObject->usItem].foodtype > 0 )
|
||||
{
|
||||
sValue = 100;
|
||||
}
|
||||
|
||||
@@ -6610,7 +6610,7 @@ void NCTHShowMounted( SOLDIERTYPE* pSoldier, UINT16* ptrBuf, UINT32 uiPitch, INT
|
||||
// Flugente: check a profile for a background flag without using SOLDIERTYPE
|
||||
BOOLEAN HasBackgroundFlag( UINT8 usProfile, UINT64 aFlag )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && usProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && usProfile != NO_PROFILE )
|
||||
{
|
||||
if ( zBackground[gMercProfiles[usProfile].usBackground].uiFlags & aFlag )
|
||||
return TRUE;
|
||||
@@ -6621,7 +6621,7 @@ BOOLEAN HasBackgroundFlag( UINT8 usProfile, UINT64 aFlag )
|
||||
|
||||
INT16 GetBackgroundValue( UINT8 usProfile, UINT16 aNr )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && usProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && usProfile != NO_PROFILE )
|
||||
{
|
||||
return zBackground[gMercProfiles[usProfile].usBackground].value[aNr];
|
||||
}
|
||||
|
||||
@@ -2327,7 +2327,7 @@ void RandomlyChooseWhichItemsAreDroppable( SOLDIERCREATE_STRUCT *pp, INT8 bSoldi
|
||||
|
||||
//Madd
|
||||
//if ( gGameSettings.fOptions[TOPTION_DROP_ALL] ) // EXTERNILIZED TO THE INI INSTEAD - SANDRO
|
||||
if ( gGameOptions.fEnemiesDropAllItems )
|
||||
if ( UsingEnemiesDropAllItemsSystem() )
|
||||
{
|
||||
ENEMYAMMODROPRATE = 100;
|
||||
ENEMYGRENADEDROPRATE = 100;
|
||||
@@ -2446,7 +2446,7 @@ else
|
||||
//TODO: someday maybe pp->Inv[i].fFlags &= ~ITEM_REPAIRABLE;
|
||||
|
||||
//if ( gGameSettings.fOptions[TOPTION_DROP_ALL] ) // EXTERNILIZED TO THE INI INSTEAD - SANDRO
|
||||
if ( gGameOptions.fEnemiesDropAllItems )
|
||||
if ( UsingEnemiesDropAllItemsSystem() )
|
||||
{
|
||||
// WANNE: "Drop all" should mean "Drop all"
|
||||
/*
|
||||
@@ -2488,11 +2488,9 @@ else
|
||||
}
|
||||
|
||||
//if ( gGameSettings.fOptions[TOPTION_DROP_ALL] ) // EXTERNILIZED TO THE INI INSTEAD - SANDRO
|
||||
if ( gGameOptions.fEnemiesDropAllItems )
|
||||
if ( UsingEnemiesDropAllItemsSystem() )
|
||||
return;
|
||||
|
||||
|
||||
|
||||
// WANNE: Randomly choose which type of items should be dropped
|
||||
if (gGameExternalOptions.ubEnemiesItemDrop == 0)
|
||||
{
|
||||
|
||||
+3
-3
@@ -1275,7 +1275,7 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
|
||||
return FALSE;
|
||||
|
||||
// silversurfer: no food items if the food system is off
|
||||
if ( !gGameOptions.fFoodSystem && Item[ usItemIndex ].foodtype > 0 )
|
||||
if ( !UsingFoodSystem() && Item[ usItemIndex ].foodtype > 0 )
|
||||
{
|
||||
// Only restrict food for now. Water can be used to replenish lost energy so it is useful even without the food system.
|
||||
if ( Food[Item[usItemIndex].foodtype].bFoodPoints > 0 )
|
||||
@@ -3063,7 +3063,7 @@ UINT16 OBJECTTYPE::GetWeightOfObjectInStack(unsigned int index)
|
||||
}
|
||||
}
|
||||
// account for partially eaten food
|
||||
if ( gGameOptions.fFoodSystem && Item[usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[usItem].foodtype > 0 )
|
||||
weight *= (FLOAT)((*this)[index])->data.objectStatus/100.0f;
|
||||
}
|
||||
else if ( pItem->usItemClass == IC_AMMO && gGameExternalOptions.fAmmoDynamicWeight == TRUE )//Pulmu: added weight allowance for ammo not being full
|
||||
@@ -15366,7 +15366,7 @@ BOOL AddToRandomListFromItem( UINT16 usItem )
|
||||
if ( Item[usItem].ubCoolness <= rditemmaxcoolness )
|
||||
{
|
||||
// if item is food, not drug or canteen, and food system is off, don't add this
|
||||
if ( !gGameOptions.fFoodSystem && Item[usItem].foodtype > 0 && Item[usItem].drugtype == 0 && Item[usItem].canteen == 0 )
|
||||
if ( !UsingFoodSystem() && Item[usItem].foodtype > 0 && Item[usItem].drugtype == 0 && Item[usItem].canteen == 0 )
|
||||
;
|
||||
else
|
||||
randomitemarray[itemcnt++] = usItem;
|
||||
|
||||
+1
-1
@@ -421,7 +421,7 @@ void RefreshSoldierMorale( SOLDIERTYPE * pSoldier )
|
||||
iActualMorale = iActualMorale * pSoldier->GetMoraleModifier();
|
||||
|
||||
// Flugente: ubMaxMorale can now be influenced by our food situation
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
FoodMaxMoraleModifiy(pSoldier, &ubMaxMorale);
|
||||
|
||||
// Flugente: max morale can be lowered
|
||||
|
||||
@@ -1867,7 +1867,7 @@ BOOLEAN ExecuteOverhead( )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - hack! - resolve possible pending interrupt
|
||||
if(GetSoldier(&pSoldier, gusSelectedSoldier) && gGameOptions.fImprovedInterruptSystem )
|
||||
if ( GetSoldier(&pSoldier, gusSelectedSoldier) && UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( pSoldier->bActive )
|
||||
{
|
||||
@@ -2858,7 +2858,7 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for movement type of interupt, resolve it here
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, MOVEMENT_INTERRUPT ) )
|
||||
{
|
||||
@@ -9521,7 +9521,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for after-shot type of interupt, try to resolve it now
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, AFTERSHOT_INTERRUPT ) )
|
||||
{
|
||||
|
||||
+2
-2
@@ -974,7 +974,7 @@ void DeductPoints( SOLDIERTYPE *pSoldier, INT16 sAPCost, INT32 iBPCost, UINT8 ub
|
||||
{
|
||||
// Flugente: if we GAIN breath points, adjust them - if we are hungry, we get fewer points back
|
||||
// Flugente: ubMaxMorale can now be influenced by our food situation
|
||||
if ( iBPCost < 0 && gGameOptions.fFoodSystem )
|
||||
if ( iBPCost < 0 && UsingFoodSystem() )
|
||||
ReduceBPRegenForHunger(pSoldier, &iBPCost);
|
||||
|
||||
// Flugente: backgrounds
|
||||
@@ -1059,7 +1059,7 @@ void DeductPoints( SOLDIERTYPE *pSoldier, INT16 sAPCost, INT32 iBPCost, UINT8 ub
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - Interrupt counter
|
||||
if( gGameOptions.fImprovedInterruptSystem && sAPCost > 0 && ubInterruptType != DISABLED_INTERRUPT )
|
||||
if( UsingImprovedInterruptSystem() && sAPCost > 0 && ubInterruptType != DISABLED_INTERRUPT )
|
||||
{
|
||||
UINT8 ubPointsRegistered = 0;
|
||||
UINT16 uCnt = 0;
|
||||
|
||||
@@ -2469,13 +2469,13 @@ void ReduceAttachmentsOnGunForNonPlayerChars(SOLDIERTYPE *pSoldier, OBJECTTYPE *
|
||||
|
||||
//Not meant for use in OAS.
|
||||
Assert(UsingNewAttachmentSystem()==true);
|
||||
|
||||
//OBJECTTYPE * pObj = &(pSoldier->inv[ invSlot ]);
|
||||
|
||||
|
||||
//If this item has any attachments, is not from a player, and is overwriteable. It's also only for guns.
|
||||
if((*pObj)[0]->AttachmentListSize() > 0 && pSoldier->bTeam != gbPlayerNum && !((*pObj).fFlags & OBJECT_NO_OVERWRITE) && Item[pObj->usItem].usItemClass == IC_GUN && !gGameOptions.fEnemiesDropAllItems){
|
||||
if((*pObj)[0]->AttachmentListSize() > 0 && pSoldier->bTeam != gbPlayerNum && !((*pObj).fFlags & OBJECT_NO_OVERWRITE) && Item[pObj->usItem].usItemClass == IC_GUN && !UsingEnemiesDropAllItemsSystem() )
|
||||
{
|
||||
UINT8 slotCount = 0;
|
||||
for(std::list<OBJECTTYPE>::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter, ++slotCount){
|
||||
for(std::list<OBJECTTYPE>::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter, ++slotCount)
|
||||
{
|
||||
//A few conditions under which we will not delete this attachment
|
||||
if(!iter->exists())
|
||||
continue;
|
||||
|
||||
@@ -3264,7 +3264,7 @@ UINT8 ubItemsNotCounted = 0; //ja25 UB
|
||||
pricepercentage = max( 0, 100 + (fDealerSelling ? -1 : 1) * gpSMCurrentMerc->GetBackgroundValue( BG_PERC_PRICES_GUNS ) );
|
||||
|
||||
// Even without backgrounds, Flo gets a discount. Read her M.E.R.C. profile to understand why
|
||||
if ( !gGameOptions.fBackGround && gpSMCurrentMerc->ubProfile == FLO )
|
||||
if ( !UsingBackGroundSystem() && gpSMCurrentMerc->ubProfile == FLO )
|
||||
pricepercentage = max( 0, 100 + (fDealerSelling ? -1 : 1) * FLO_DISCOUNT_PERCENTAGE );
|
||||
}
|
||||
else if ( Item [ usItemID ].usItemClass & (IC_MAPFILTER_MELEE|IC_MAPFILTER_KIT|IC_MAPFILTER_LBE|IC_MAPFILTER_ARMOR|IC_MAPFILTER_MISC) )
|
||||
|
||||
@@ -625,11 +625,10 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
if ( pSoldier->usAnimState == START_COWER || pSoldier->usAnimState == START_COWER_CROUCHED || pSoldier->usAnimState == START_COWER_PRONE )
|
||||
{
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
}
|
||||
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for after-attack type of interupt, try to resolve it now
|
||||
else if ( gGameOptions.fImprovedInterruptSystem )
|
||||
else if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, AFTERACTION_INTERRUPT ) )
|
||||
{
|
||||
@@ -2286,7 +2285,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for before-attack type of interupt, try to resolve it now
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, BEFORESHOT_INTERRUPT ) )
|
||||
{
|
||||
@@ -3021,7 +3020,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for after-attack type of interupt, try to resolve it now
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
ResolvePendingInterrupt( pSoldier, AFTERACTION_INTERRUPT );
|
||||
}
|
||||
|
||||
@@ -5009,7 +5009,7 @@ void SOLDIERTYPE::EVENT_FireSoldierWeapon( INT32 sTargetGridNo )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - hack! - an interrupt pending before shot
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( this, BEFORESHOT_INTERRUPT ) )
|
||||
{
|
||||
@@ -14451,7 +14451,7 @@ void SOLDIERTYPE::SoldierInventoryCoolDown( void )
|
||||
// handle flashlight. This is necessary in this location, as we need to do this at least once per turn
|
||||
this->HandleFlashLights( );
|
||||
|
||||
if ( !gGameExternalOptions.fWeaponOverheating && !gGameOptions.fFoodSystem )
|
||||
if ( !gGameExternalOptions.fWeaponOverheating && !UsingFoodSystem() )
|
||||
return;
|
||||
|
||||
INT8 numStacks = (INT8)this->inv.size( ); // remember inventorysize, so we don't call size() repeatedly
|
||||
@@ -16811,7 +16811,7 @@ void SOLDIERTYPE::SwitchWeapons( BOOLEAN fKnife, BOOLEAN fSideArm )
|
||||
// execute swap
|
||||
if ( handCanMove == TRUE && searchitemCanMove == TRUE )
|
||||
{
|
||||
if ( gGameOptions.fInventoryCostsAP )
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
UINT16 APTotalCost = 0;
|
||||
|
||||
@@ -17243,7 +17243,7 @@ INT8 SOLDIERTYPE::GetSoldierProfileType( UINT8 usTeam )
|
||||
// Flugente: do we have a specific background flag?
|
||||
BOOLEAN SOLDIERTYPE::HasBackgroundFlag( UINT64 aFlag )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && this->ubProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && this->ubProfile != NO_PROFILE )
|
||||
{
|
||||
if ( zBackground[gMercProfiles[this->ubProfile].usBackground].uiFlags & aFlag )
|
||||
return TRUE;
|
||||
@@ -17254,7 +17254,7 @@ BOOLEAN SOLDIERTYPE::HasBackgroundFlag( UINT64 aFlag )
|
||||
|
||||
INT16 SOLDIERTYPE::GetBackgroundValue( UINT16 aNr )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && this->ubProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && this->ubProfile != NO_PROFILE )
|
||||
{
|
||||
return zBackground[gMercProfiles[this->ubProfile].usBackground].value[aNr];
|
||||
}
|
||||
@@ -19096,7 +19096,7 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc )
|
||||
|
||||
void SOLDIERTYPE::PrintFoodDesc( CHAR16* apStr, BOOLEAN fFullDesc )
|
||||
{
|
||||
if ( !gGameOptions.fFoodSystem )
|
||||
if ( !UsingFoodSystem() )
|
||||
return;
|
||||
|
||||
// only for living mercs with a profile
|
||||
@@ -22735,7 +22735,7 @@ UINT8 RegainDamagedStats( SOLDIERTYPE * pSoldier, UINT16 usAmountRegainedHundred
|
||||
}
|
||||
|
||||
// Flugente: Third, heal damage from starvation if possible
|
||||
if ( !gGameOptions.fFoodSystem || (gGameOptions.fFoodSystem && ubAmountRegained > 0 && pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
|
||||
if ( !UsingFoodSystem() || ( ubAmountRegained > 0 && pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
|
||||
{
|
||||
// if we have a damaged stat here
|
||||
if ( pSoldier->usStarveDamageHealth > 0 )
|
||||
|
||||
@@ -1058,7 +1058,7 @@ void StartInterrupt( void )
|
||||
{
|
||||
// SANDRO - we don't use the "hidden interrupt" feature with IIS
|
||||
// sevenfm: all interrupts in original interrupt system start as hidden and revealed later if soldier decides something
|
||||
if ( !is_networked && pTempSoldier->bTeam != OUR_TEAM && !gGameOptions.fImprovedInterruptSystem )
|
||||
if ( !is_networked && pTempSoldier->bTeam != OUR_TEAM && !UsingImprovedInterruptSystem() )
|
||||
{
|
||||
// we're being interrupted by the computer!
|
||||
// we delay displaying any interrupt message until the computer does something...
|
||||
@@ -2045,7 +2045,7 @@ BOOLEAN InterruptDuel( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOpponent)
|
||||
BOOLEAN fResult = FALSE;
|
||||
|
||||
// sevenfm: if Ctrl+D pressed - skip all player interrupts for this turn
|
||||
if( !is_networked && !gGameOptions.fImprovedInterruptSystem && pSoldier->bTeam == OUR_TEAM && gTacticalStatus.ubDisablePlayerInterrupts )
|
||||
if( !is_networked && !UsingImprovedInterruptSystem() && pSoldier->bTeam == OUR_TEAM && gTacticalStatus.ubDisablePlayerInterrupts )
|
||||
return FALSE;
|
||||
|
||||
// if opponent can't currently see us and we can see them
|
||||
@@ -2552,7 +2552,7 @@ void ResolveInterruptsVs( SOLDIERTYPE * pSoldier, UINT8 ubInterruptType)
|
||||
// add this guy to everyone's interrupt queue
|
||||
AddToIntList(ubIntList[ubSmallestSlot],TRUE,TRUE);
|
||||
// SANDRO - for IIS, reset counter if we got here
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
// reset the counter
|
||||
MercPtrs[ ubIntList[ubSmallestSlot] ]->aiData.ubInterruptCounter[pSoldier->ubID] = 0;
|
||||
|
||||
@@ -8601,16 +8601,15 @@ void HandleTacticalStoreInvItem( void )
|
||||
}
|
||||
|
||||
// calculate needed APs
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
APTotalCost += GetInvMovementCost(&pSoldier->inv[HANDPOS], HANDPOS, ubStoreSlot );
|
||||
if( !EnoughPoints( pSoldier, APTotalCost, 0, TRUE ) )
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
// move item from HANDPOS to found ubStoreSlot
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
// move item from HANDPOS to found ubStoreSlot
|
||||
DeductPoints( pSoldier, APTotalCost, 0 );
|
||||
}
|
||||
|
||||
pSoldier->inv[HANDPOS].MoveThisObjectTo(pSoldier->inv[ubStoreSlot], 1, pSoldier);
|
||||
|
||||
@@ -8687,7 +8686,7 @@ void HandleTacticalTakeInvItem( INT32 iType )
|
||||
pSoldier->usQuickItemId = pSoldier->inv[ubItemSlot].usItem;
|
||||
pSoldier->ubQuickItemSlot = ubItemSlot;
|
||||
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
APTotalCost += GetInvMovementCost(&pSoldier->inv[ubItemSlot], ubItemSlot, HANDPOS);
|
||||
if( !EnoughPoints( pSoldier, APTotalCost, 0, TRUE ) )
|
||||
@@ -8705,7 +8704,7 @@ void HandleTacticalTakeInvItem( INT32 iType )
|
||||
HandleTBSwapHands();
|
||||
|
||||
// move item to handpos
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
DeductPoints( pSoldier, APTotalCost, 0 );
|
||||
pSoldier->inv[ubItemSlot].MoveThisObjectTo(pSoldier->inv[HANDPOS], 1, pSoldier);
|
||||
|
||||
@@ -8753,7 +8752,7 @@ void HandleTacticalDropItem( UINT8 ubSlot )
|
||||
|
||||
if( pSoldier->inv[ ubSlot ].exists() )
|
||||
{
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
APTotalCost += GetInvMovementCost(&pSoldier->inv[ubSlot], ubSlot, HANDPOS);
|
||||
APTotalCost += GetBasicAPsToPickupItem( pSoldier );
|
||||
|
||||
@@ -879,7 +879,7 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
if ((gTacticalStatus.uiFlags & TURNBASED) &&
|
||||
(gTacticalStatus.uiFlags & INCOMBAT) &&
|
||||
(ubSightFlags & SIGHT_INTERRUPT) &&
|
||||
(!gGameOptions.fImprovedInterruptSystem || (gGameOptions.fImprovedInterruptSystem && gGameExternalOptions.fAllowInstantInterruptsOnSight) ) )
|
||||
(!UsingImprovedInterruptSystem() || gGameExternalOptions.fAllowInstantInterruptsOnSight ) )
|
||||
{
|
||||
ResolveInterruptsVs( pSoldier, SIGHTINTERRUPT );
|
||||
}
|
||||
@@ -7389,7 +7389,7 @@ void NoticeUnseenAttacker( SOLDIERTYPE * pAttacker, SOLDIERTYPE * pDefender, INT
|
||||
}
|
||||
}
|
||||
|
||||
if ( !gGameOptions.fImprovedInterruptSystem || (gGameOptions.fImprovedInterruptSystem && gGameExternalOptions.fAllowInstantInterruptsOnSight) )
|
||||
if ( !UsingImprovedInterruptSystem() || gGameExternalOptions.fAllowInstantInterruptsOnSight )
|
||||
{
|
||||
if ( StandardInterruptConditionsMet( pDefender, pAttacker->ubID, bOldOppList ) )
|
||||
{
|
||||
|
||||
@@ -287,7 +287,7 @@ void SetNewLoadScreenHint()
|
||||
// still unsure how to check for these...
|
||||
if ( zLoadScreenHint[cnt].usFlags & (LOADSCREEN_LORE|LOADSCREEN_WEAPON|LOADSCREEN_ITEM|LOADSCREEN_KEYBIND) )
|
||||
fShow = TRUE;
|
||||
else if ( zLoadScreenHint[cnt].usFlags & LOADSCREEN_FOOD && gGameOptions.fFoodSystem )
|
||||
else if ( zLoadScreenHint[cnt].usFlags & LOADSCREEN_FOOD && UsingFoodSystem() )
|
||||
fShow = TRUE;
|
||||
else if ( zLoadScreenHint[cnt].usFlags & LOADSCREEN_ZOMBIE && gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||
fShow = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user