- Added AndroidXP fixes for Sniper Deadlock and Grenade AP loss

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@797 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2007-03-25 15:20:25 +00:00
parent c2528cab4f
commit 6664b92b25
7 changed files with 107 additions and 62 deletions
+12 -1
View File
@@ -2586,6 +2586,17 @@ BOOLEAN UseThrown( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo )
CalculateLaunchItemParamsForThrow( pSoldier, sTargetGridNo, pSoldier->bTargetLevel, (INT16)(pSoldier->bTargetLevel * 256 ), &(pSoldier->inv[ HANDPOS ] ), (INT8)(uiDiceRoll - uiHitChance), THROW_ARM_ITEM, 0 );
//AXP 25.03.2007: Cleaned up throwing AP costs. Now only turning + stance change AP
// costs are deducted. Final throw cost is deducted on creating the grenade object
if ( (UINT8)GetDirectionFromGridNo( sTargetGridNo, pSoldier ) != pSoldier->bDirection )
sAPCost += (INT16)GetAPsToLook( pSoldier );
sAPCost += (INT16)GetAPsToChangeStance( pSoldier, ANIM_STAND );
HandleSoldierThrowItem( pSoldier, pSoldier->sTargetGridNo );
DeductPoints( pSoldier, sAPCost, 0 );
RemoveObjs( &(pSoldier->inv[ HANDPOS ] ), 1 );
/*
// Madd: Next 2 lines added: Deduct points!
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, FALSE, pSoldier->bAimTime );
@@ -2597,7 +2608,7 @@ BOOLEAN UseThrown( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo )
// Kaiden: Deducting points too early, moving the line down
DeductPoints( pSoldier, sAPCost, 0 );
RemoveObjs( &(pSoldier->inv[ HANDPOS ] ), 1 );
*/
return( TRUE );
}