Brief: //dnl ch72

- Fixing bad APs deduction when using hand grenades, mortars, rocket launchers, grenade launchers and attached grenade launchers from different stances and need turn to your target.
Details:
- Add APs cost for stance change and turnover for mortar and rocket launchers.
- Rocket launchers cannot be fire from prone any more as there are no animation for that stance.
- Attached grenade launchers now take raise gun cost for launcher instead for gun.
- No more problems with APs for grenades from different stances and turnover, add proper costs for crouch too as someone add animation for that.
- Fix wrong APs deduction for grenade launcher from prone and turnover in general.
- Fix incorrect values for APs cost under throwing/launching cursor.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Kriplo
2013-09-27 22:03:42 +00:00
parent ebef9b6df3
commit f65719e801
6 changed files with 100 additions and 39 deletions
+6 -2
View File
@@ -3824,7 +3824,7 @@ BOOLEAN UseThrown( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo )
INT8 bLoop;
UINT8 ubTargetID;
SOLDIERTYPE * pTargetSoldier;
INT16 sAPCost = 0;
//INT16 sAPCost = 0;//dnl ch72 180913
uiHitChance = CalcThrownChanceToHit( pSoldier, sTargetGridNo, pSoldier->aiData.bAimTime, AIM_SHOT_TORSO );
@@ -3923,6 +3923,7 @@ BOOLEAN UseThrown( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo )
CalculateLaunchItemParamsForThrow( pSoldier, sTargetGridNo, pSoldier->bTargetLevel, (INT16)(pSoldier->bTargetLevel * 256 ), &(pSoldier->inv[ HANDPOS ] ), (INT8)(uiDiceRoll - uiHitChance), THROW_ARM_ITEM, 0 );
#if 0//dnl ch72 180913 bad idea to charge APs before stance and turn really occurs, this was not here in v1.12
//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->ubDirection )
@@ -3932,7 +3933,10 @@ BOOLEAN UseThrown( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo )
HandleSoldierThrowItem( pSoldier, pSoldier->sTargetGridNo );
DeductPoints( pSoldier, sAPCost, 0, AFTERSHOT_INTERRUPT );
pSoldier->inv[ HANDPOS ].RemoveObjectsFromStack(1);
#else
HandleSoldierThrowItem(pSoldier, pSoldier->sTargetGridNo);
pSoldier->inv[HANDPOS].RemoveObjectsFromStack(1);
#endif
/*
// Madd: Next 2 lines added: Deduct points!