From 87691b311c24528231cb071583194293b8bfe19c Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Mon, 31 Jul 2006 23:40:36 +0000 Subject: [PATCH] -re-added equipment bonus application code removed earlier. Turned out the new code isn't called in the strategic map. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@384 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Items.cpp | 2 ++ Tactical/Weapons.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 8dd011b01..e30e945be 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -3740,6 +3740,8 @@ BOOLEAN PlaceObject( SOLDIERTYPE * pSoldier, INT8 bPos, OBJECTTYPE * pObj ) UpdateRobotControllerGivenController( pSoldier ); } + ApplyEquipmentBonuses(pSoldier); + return( TRUE ); } diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index da423ad7a..e09aae7aa 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -2803,7 +2803,8 @@ void WeaponHit( UINT16 usSoldierID, UINT16 usWeaponIndex, INT16 sDamage, INT16 s if ( EXPLOSIVE_GUN( usWeaponIndex ) ) { // Reduce attacker count! - // marke test mag ammo type: pSoldier->inv[pSoldier->ubAttackingHand ].ubGunAmmoType + //TODO: Madd --- I don't think this code will ever get called for the HE ammo -- the EXPLOSIVE_GUN check filters out regular guns + // marke test mag ammo type: pSoldier->inv[pSoldier->ubAttackingHand ].ubGunAmmoType // 2cond 'or' added if ( Item[usWeaponIndex].rocketlauncher || AmmoTypes[pSoldier->inv[pSoldier->ubAttackingHand ].ubGunAmmoType].explosionSize > 1 ) { @@ -2814,7 +2815,7 @@ void WeaponHit( UINT16 usSoldierID, UINT16 usWeaponIndex, INT16 sDamage, INT16 s // changed rpg type to work only with two flags matching else if ( !Item[usWeaponIndex].singleshotrocketlauncher && Item[usWeaponIndex].rocketlauncher) { - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("StructureHit: RPG7 item: %d, Ammo: %d",pSoldier->inv[HANDPOS].usItem , pSoldier->inv[HANDPOS].usGunAmmoItem ) ); + DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("WeaponHit: RPG7 item: %d, Ammo: %d",pSoldier->inv[HANDPOS].usItem , pSoldier->inv[HANDPOS].usGunAmmoItem ) ); IgniteExplosion( ubAttackerID, sXPos, sYPos, 0, (INT16) (GETWORLDINDEXFROMWORLDCOORDS( sYPos, sXPos )), pSoldier->inv[pSoldier->ubAttackingHand ].usGunAmmoItem, pTargetSoldier->bLevel ); pSoldier->inv[pSoldier->ubAttackingHand ].usGunAmmoItem = NONE;