This revision requires GameDir 1873 to work because of a new icon in ItemInfoAdvancedIcons.sti!!!

- Weapons.xml tags <bRecoilX> and <bRecoilY> are now FLOAT type values. This allows to differentiate weapons by smaller steps.
- Items.xml tags <RecoilModifierX> and <RecoilModifierY> are now FLOAT types as well.
- Items.xml tag <PercentRecoilModifier> will now be displayed in UDB advanced tab.
- Item_Settings.ini has new modifiers for gun type specific <bRecoilX> and <bRecoilY>. This allows modders to quickly adjust recoil values for any gun type.
- fixed UDB description for <RecoilModifierX> and <RecoilModifierY>
- All recoil calculations now use FLOAT values for more precision.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6613 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-11-16 16:55:32 +00:00
parent f986cc1292
commit 5878355d61
23 changed files with 313 additions and 159 deletions
+3 -3
View File
@@ -3137,12 +3137,12 @@ BOOLEAN AIDetermineStealingWeaponAttempt( SOLDIERTYPE * pSoldier, SOLDIERTYPE *
// recoil system.
FLOAT AICalcRecoilForShot( SOLDIERTYPE *pSoldier, OBJECTTYPE *pWeapon, UINT8 ubShotNum)
{
INT8 bRecoilX = 0;
INT8 bRecoilY = 0;
FLOAT bRecoilX = 0;
FLOAT bRecoilY = 0;
GetRecoil( pSoldier, pWeapon, &bRecoilX, &bRecoilY, ubShotNum );
// Return average shooter's ability to control this gun.
// HEADROCK HAM 4: TODO: Incorporate items that alter max counter-force.
FLOAT AverageRecoil = __max(0, ((FLOAT)sqrt( (FLOAT)(bRecoilX * bRecoilX) + (FLOAT)(bRecoilY * bRecoilY) ) - (gGameCTHConstants.RECOIL_MAX_COUNTER_FORCE * 0.7f) ) );
FLOAT AverageRecoil = __max(0, ( sqrt( (bRecoilX * bRecoilX) + (bRecoilY * bRecoilY) ) - (gGameCTHConstants.RECOIL_MAX_COUNTER_FORCE * 0.7f) ) );
return AverageRecoil;
}