- new Item_Settings.ini modifiers for weapon class specific range

- renamed weapon overheating modifiers to get a common naming scheme
- added weapon overheating modifiers for launchers
- renamed TURNING_FROM_PRONE_FOR_PUNCH_OR_STUB to TURNING_FROM_PRONE_FOR_PUNCH_OR_STAB for search reasons


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6469 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-10-04 18:55:50 +00:00
parent d83f23ce2b
commit 2b19bd1959
7 changed files with 104 additions and 55 deletions
+18 -4
View File
@@ -6152,6 +6152,12 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject )
// Get base Range value
UINT16 iRangeValue = Weapon[ gpItemDescObject->usItem ].usRange;
// apply Ini modifiers
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_GUN )
iRangeValue *= ( (FLOAT)(gGameExternalOptions.iGunRangeModifier / 100) * gItemSettings.fRangeModifierGun[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ] );
else if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_LAUNCHER )
iRangeValue *= ( (FLOAT)(gGameExternalOptions.iGunRangeModifier / 100) * gItemSettings.fRangeModifierLauncher);
// Get Final Range value
UINT16 iFinalRangeValue = GunRange( gpItemDescObject, NULL );
@@ -11558,7 +11564,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
iFloatModifier[0] = Weapon[ gpItemDescObject->usItem ].usOverheatingSingleShotTemperature * gGameExternalOptions.iOverheatTemperatureGlobalModfier;
if ( Item[gpItemDescObject->usItem].usItemClass & IC_GUN )
iFloatModifier[0] *= gItemSettings.fOverheatTemperatureModifier[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ];
iFloatModifier[0] *= gItemSettings.fOverheatTemperatureModifierGun[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ];
else if ( Item[gpItemDescObject->usItem].usItemClass & IC_LAUNCHER )
iFloatModifier[0] *= gItemSettings.fOverheatTemperatureModifierLauncher;
iFloatModifier[1] = GetSingleShotTemperature( gpItemDescObject ) - iFloatModifier[0];
iFloatModifier[2] = GetSingleShotTemperature( gpItemDescObject );
@@ -11614,7 +11622,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
iFloatModifier[0] = Item[gpItemDescObject->usItem].usOverheatingCooldownFactor;
if ( Item[gpItemDescObject->usItem].usItemClass & IC_GUN )
iFloatModifier[0] *= gItemSettings.fOverheatCooldownModifier[ Weapon[gpItemDescObject->usItem].ubWeaponType ];
iFloatModifier[0] *= gItemSettings.fOverheatCooldownModifierGun[ Weapon[gpItemDescObject->usItem].ubWeaponType ];
else if ( Item[gpItemDescObject->usItem].usItemClass & IC_LAUNCHER )
iFloatModifier[0] *= gItemSettings.fOverheatCooldownModifierLauncher;
iFloatModifier[1] = GetItemCooldownFactor(gpItemDescObject) - iFloatModifier[0];
iFloatModifier[2] = GetItemCooldownFactor(gpItemDescObject);
@@ -11669,7 +11679,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
iFloatModifier[0] = Weapon[ gpItemDescObject->usItem ].usOverheatingJamThreshold;
if ( Item[gpItemDescObject->usItem].usItemClass & IC_GUN )
iFloatModifier[0] *= gItemSettings.fOverheatJamThresholdModifier[ Weapon[gpItemDescObject->usItem].ubWeaponType ];
iFloatModifier[0] *= gItemSettings.fOverheatJamThresholdModifierGun[ Weapon[gpItemDescObject->usItem].ubWeaponType ];
else if ( Item[gpItemDescObject->usItem].usItemClass & IC_LAUNCHER )
iFloatModifier[0] *= gItemSettings.fOverheatJamThresholdModifierLauncher;
iFloatModifier[1] = GetOverheatJamThreshold(gpItemDescObject) - iFloatModifier[0];
iFloatModifier[2] = GetOverheatJamThreshold(gpItemDescObject);
@@ -11724,7 +11736,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
iFloatModifier[0] = Weapon[ gpItemDescObject->usItem ].usOverheatingDamageThreshold;
if ( Item[gpItemDescObject->usItem].usItemClass & IC_GUN )
iFloatModifier[0] *= gItemSettings.fOverheatDamageThresholdModifier[ Weapon[gpItemDescObject->usItem].ubWeaponType ];
iFloatModifier[0] *= gItemSettings.fOverheatDamageThresholdModifierGun[ Weapon[gpItemDescObject->usItem].ubWeaponType ];
else if ( Item[gpItemDescObject->usItem].usItemClass & IC_LAUNCHER )
iFloatModifier[0] *= gItemSettings.fOverheatDamageThresholdModifierLauncher;
iFloatModifier[1] = GetOverheatDamageThreshold(gpItemDescObject) - iFloatModifier[0];
iFloatModifier[2] = GetOverheatDamageThreshold(gpItemDescObject);
+7 -6
View File
@@ -13876,11 +13876,10 @@ UINT16 GetModifiedGunRange(UINT16 usWeaponIndex)
}
// Only apply range modifier on "real" guns!
if (Item[Weapon[usWeaponIndex].uiIndex].usItemClass == IC_GUN ||
Item[Weapon[usWeaponIndex].uiIndex].usItemClass == IC_LAUNCHER)
{
ubRange = (INT16)(( ubRange * gGameExternalOptions.iGunRangeModifier ) / 100);
}
if (Item[Weapon[usWeaponIndex].uiIndex].usItemClass == IC_GUN )
ubRange = (INT16)((FLOAT)( ubRange * gGameExternalOptions.iGunRangeModifier ) / 100 * gItemSettings.fRangeModifierGun[ Weapon[usWeaponIndex].ubWeaponType ] );
else if (Item[Weapon[usWeaponIndex].uiIndex].usItemClass == IC_LAUNCHER )
ubRange = (INT16)((FLOAT)( ubRange * gGameExternalOptions.iGunRangeModifier ) / 100 * gItemSettings.fRangeModifierLauncher );
return (UINT16)ubRange;
}
@@ -14098,7 +14097,9 @@ FLOAT GetItemCooldownFactor( OBJECTTYPE * pObj )
{
FLOAT cooldownfactor = Item[pObj->usItem].usOverheatingCooldownFactor; // ... get item-specific cooldown factor ...
if ( Item[pObj->usItem].usItemClass & IC_GUN )
cooldownfactor *= gItemSettings.fOverheatCooldownModifier[ Weapon[ pObj->usItem ].ubWeaponType ];
cooldownfactor *= gItemSettings.fOverheatCooldownModifierGun[ Weapon[ pObj->usItem ].ubWeaponType ];
else if ( Item[pObj->usItem].usItemClass & IC_LAUNCHER )
cooldownfactor *= gItemSettings.fOverheatCooldownModifierLauncher;
FLOAT modificator = 1.0f + GetItemCooldownModificator( pObj );
+3 -3
View File
@@ -8026,7 +8026,7 @@ void SOLDIERTYPE::TurnSoldier( void )
}
}
if(this->flags.bTurningFromPronePosition == TURNING_FROM_PRONE_FOR_PUNCH_OR_STUB)//dnl ch73 290913
if(this->flags.bTurningFromPronePosition == TURNING_FROM_PRONE_FOR_PUNCH_OR_STAB)//dnl ch73 290913
{
this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_OFF;
}
@@ -11766,7 +11766,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginBladeAttack( INT32 sGridNo, UINT8 ubDirectio
this->EVENT_SetSoldierDesiredDirection(ubDirection);
this->EVENT_SetSoldierDirection(ubDirection);
if(this->flags.bTurningFromPronePosition)
this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_FOR_PUNCH_OR_STUB;
this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_FOR_PUNCH_OR_STAB;
usForceAnimState = INVALID_ANIMATION;
// CHANGE TO ANIMATION
@@ -11987,7 +11987,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
this->EVENT_SetSoldierDesiredDirection(ubDirection);
this->EVENT_SetSoldierDirection(ubDirection);
if(this->flags.bTurningFromPronePosition)
this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_FOR_PUNCH_OR_STUB;
this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_FOR_PUNCH_OR_STAB;
usForceAnimState = INVALID_ANIMATION;
}
+1 -1
View File
@@ -200,7 +200,7 @@ INT8 NUM_SKILL_TRAITS( SOLDIERTYPE * pSoldier, UINT8 uiSkillTraitNumber );
#define TURNING_FROM_PRONE_ON 1
#define TURNING_FROM_PRONE_START_UP_FROM_MOVE 2
#define TURNING_FROM_PRONE_ENDING_UP_FROM_MOVE 3
#define TURNING_FROM_PRONE_FOR_PUNCH_OR_STUB 4//dnl ch73 290913
#define TURNING_FROM_PRONE_FOR_PUNCH_OR_STAB 4//dnl ch73 290913
//ENUMERATIONS FOR ACTIONS
enum
+15 -5
View File
@@ -1458,7 +1458,9 @@ FLOAT GetGunOverheatDamagePercentage( FLOAT usTemperature, UINT16 usIndx )
FLOAT damagethreshold = Weapon[Item[ usIndx ].ubClassIndex].usOverheatingDamageThreshold;
if ( Item[usIndx].usItemClass & IC_GUN )
damagethreshold *= gItemSettings.fOverheatDamageThresholdModifier[Weapon[Item[ usIndx ].uiIndex].ubWeaponType];
damagethreshold *= gItemSettings.fOverheatDamageThresholdModifierGun[Weapon[Item[ usIndx ].uiIndex].ubWeaponType];
else if ( Item[usIndx].usItemClass & IC_LAUNCHER )
damagethreshold *= gItemSettings.fOverheatDamageThresholdModifierLauncher;
return usTemperature/ damagethreshold ;
}
@@ -1469,7 +1471,9 @@ FLOAT GetGunOverheatJamPercentage( FLOAT usTemperature, UINT16 usIndx )
FLOAT jamthreshold = Weapon[Item[ usIndx ].ubClassIndex].usOverheatingJamThreshold;
if ( Item[usIndx].usItemClass & IC_GUN )
jamthreshold *= gItemSettings.fOverheatJamThresholdModifier[Weapon[Item[ usIndx ].uiIndex].ubWeaponType];
jamthreshold *= gItemSettings.fOverheatJamThresholdModifierGun[Weapon[Item[ usIndx ].uiIndex].ubWeaponType];
else if ( Item[usIndx].usItemClass & IC_LAUNCHER )
jamthreshold *= gItemSettings.fOverheatJamThresholdModifierLauncher;
return usTemperature/ jamthreshold ;
}
@@ -12078,7 +12082,9 @@ FLOAT GetSingleShotTemperature( OBJECTTYPE *pObj )
singleshottemperature = Weapon[ pObj->usItem ].usOverheatingSingleShotTemperature;
if ( Item[pObj->usItem].usItemClass & IC_GUN )
singleshottemperature *= gItemSettings.fOverheatTemperatureModifier[ Weapon[ pObj->usItem ].ubWeaponType ];
singleshottemperature *= gItemSettings.fOverheatTemperatureModifierGun[ Weapon[ pObj->usItem ].ubWeaponType ];
else if ( Item[pObj->usItem].usItemClass & IC_LAUNCHER )
singleshottemperature *= gItemSettings.fOverheatTemperatureModifierLauncher;
// determine modificator according to attachments
FLOAT modificator = 1.0f + GetTemperatureModifier(pObj);
@@ -12147,7 +12153,9 @@ FLOAT GetOverheatJamThreshold( OBJECTTYPE *pObj )
jamthreshold = Weapon[ pObj->usItem ].usOverheatingJamThreshold;
if ( Item[pObj->usItem].usItemClass & IC_GUN )
jamthreshold *= gItemSettings.fOverheatJamThresholdModifier[ Weapon[ pObj->usItem ].ubWeaponType ];
jamthreshold *= gItemSettings.fOverheatJamThresholdModifierGun[ Weapon[ pObj->usItem ].ubWeaponType ];
else if ( Item[pObj->usItem].usItemClass & IC_LAUNCHER )
jamthreshold *= gItemSettings.fOverheatJamThresholdModifierLauncher;
// determine modificator according to attachments
FLOAT modificator = 1.0f + GetOverheatJamThresholdModifier(pObj);
@@ -12184,7 +12192,9 @@ FLOAT GetOverheatDamageThreshold( OBJECTTYPE *pObj )
damagethreshold = Weapon[ pObj->usItem ].usOverheatingDamageThreshold;
if ( Item[pObj->usItem].usItemClass & IC_GUN )
damagethreshold *= gItemSettings.fOverheatDamageThresholdModifier[ Weapon[ pObj->usItem ].ubWeaponType ];
damagethreshold *= gItemSettings.fOverheatDamageThresholdModifierGun[ Weapon[ pObj->usItem ].ubWeaponType ];
else if ( Item[pObj->usItem].usItemClass & IC_LAUNCHER )
damagethreshold *= gItemSettings.fOverheatDamageThresholdModifierLauncher;
// determine modificator according to attachments
FLOAT modificator = 1.0f + GetOverheatDamageThresholdModifier(pObj);