From 3dbdd4b2ad4fa8091392702040e7f174ae74c2e2 Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 25 Aug 2012 17:27:28 +0000 Subject: [PATCH] added a global modifier to singleshot temperature (for those who feel the current values are too low or high). git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5535 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 3 ++- GameSettings.h | 3 ++- Tactical/Interface Enhanced.cpp | 2 +- Tactical/Weapons.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index c59d44a3..dcc4eb24 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1388,11 +1388,12 @@ void LoadGameExternalOptions() gGameExternalOptions.guiChanceToDoLightningBetweenTurns = iniReader.ReadInteger("Tactical Weather Settings","CHANCE_TO_DO_LIGHTNING_BETWEEN_TURNS",35, 0, 100); //################# Tactical Weapon Overheating Settings ################## - // Flugente FTW 1: These settings control the behavior of Weapon Overheating, its severity, and its display. + // Flugente: These settings control the behavior of Weapon Overheating, its severity, and its display. gGameExternalOptions.fDisplayOverheatThermometer = iniReader.ReadBoolean("Tactical Weapon Overheating Settings","OVERHEATING_DISPLAY_THERMOMETER",TRUE); gGameExternalOptions.ubOverheatThermometerRedOffset = iniReader.ReadInteger("Tactical Weapon Overheating Settings","OVERHEATING_DISPLAY_THERMOMETER_RED_OFFSET", 100, 0, 255); gGameExternalOptions.iCooldownModificatorLonelyBarrel = iniReader.ReadFloat ("Tactical Weapon Overheating Settings","OVERHEATING_COOLDOWN_MODIFICATOR_LONELYBARREL", 1.15f, 1.0f, 10.0f); + gGameExternalOptions.iOverheatTemperatureGlobalModfier = iniReader.ReadFloat ("Tactical Weapon Overheating Settings","OVERHEATING_TEMPERATURE_GLOBAL_MODIFIER", 1.0f, 0.1f, 10.0f); #ifdef ENABLE_ZOMBIES //################# Tactical Zombie Settings ################## diff --git a/GameSettings.h b/GameSettings.h index 588a97d8..14796223 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -1119,10 +1119,11 @@ typedef struct FLOAT fClockSpeedPercent; #endif - // Flugente FTW 1: Weapon Overheating + // Flugente: Weapon Overheating BOOLEAN fDisplayOverheatThermometer; // Should a 'thermometer' for guns and replacable barrels be displayed? UINT8 ubOverheatThermometerRedOffset; // amount of red colour while temperature is below threshold FLOAT iCooldownModificatorLonelyBarrel; // Cooldown modificator for barrels alone in the landscape ;-) + FLOAT iOverheatTemperatureGlobalModfier; // a global modifier to the singel shot temperatuer value, if one feels that all values hould be lower/higher // Flugente: Weapon Mounting BOOLEAN fWeaponResting; // Should it be possible to rest your weapon on structures in crouched position? diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index 1adb735f..188bcf69 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -11043,7 +11043,7 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject ) sTop = gItemDescAdvRegions[cnt-sFirstLine][1].sTop; sHeight = gItemDescAdvRegions[cnt-sFirstLine][1].sBottom - sTop; - iFloatModifier[0] = Weapon[ gpItemDescObject->usItem ].usOverheatingSingleShotTemperature; + iFloatModifier[0] = Weapon[ gpItemDescObject->usItem ].usOverheatingSingleShotTemperature * gGameExternalOptions.iOverheatTemperatureGlobalModfier; iFloatModifier[1] = GetSingleShotTemperature( gpItemDescObject ) - iFloatModifier[0]; iFloatModifier[2] = GetSingleShotTemperature( gpItemDescObject ); diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index 2da65b81..116c4005 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -11702,7 +11702,7 @@ FLOAT GetSingleShotTemperature( OBJECTTYPE *pObj ) singleshottemperature = Weapon[ pObj->usItem ].usOverheatingSingleShotTemperature; // determine modificator according to attachments - FLOAT modificator = 1.0; + FLOAT modificator = gGameExternalOptions.iOverheatTemperatureGlobalModfier; attachmentList::iterator iterend = (*pObj)[0]->attachments.end(); for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != iterend; ++iter)