some fixes for NCTH recoil handling

- first bullet will now always return 0 recoil
- following bullets should now count correctly depending on single or dual wielding shots

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6564 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-11-07 15:13:05 +00:00
parent a05bb3ad5b
commit d054395b59
2 changed files with 36 additions and 11 deletions
+4 -2
View File
@@ -10444,8 +10444,10 @@ void GetRecoil( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, INT8 *bRecoilX, INT8 *b
OBJECTTYPE* pObjUsed = pSoldier->GetUsedWeapon(pObj);
OBJECTTYPE* pObjUsedInHand = pSoldier->GetUsedWeapon( &(pSoldier->inv[HANDPOS]) );
//if (ubNumBullet < 2)
if (ubNumBullet < Weapon[pObjUsed->usItem].ubRecoilDelay)
// silversurfer: The first bullet should never return recoil. If function CalcPreRecoilOffset( ) in LOS.cpp wants to know
// what recoil to expect for the second bullet in the volley it should ask for the second bullet and does so from now on.
// ubRecoilDelay is 0 for almost all weapons so we need to have a failsafe here for the first bullet.
if (ubNumBullet < 2 || ubNumBullet <= Weapon[pObjUsed->usItem].ubRecoilDelay)
{
// The first bullet in a volley never has recoil - it hasn't "set in" yet. Only the second+ bullets
// will have any recoil.