- bug fix: invisible enemies

- bug fix: manual reload for two weapons
- bug fix: barrel extender falls off while none is attached


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@382 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2006-07-31 19:53:58 +00:00
parent bba67c2082
commit 7a9ea3dbe4
6 changed files with 106 additions and 39 deletions
+8 -2
View File
@@ -1606,10 +1606,16 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT16 sTargetGridNo )
OBJECTTYPE * pInHand;
pInHand = &(pSoldier->inv[pSoldier->ubAttackingHand]);
UINT32 item;
item = FindRangeBonusAttachment(pInHand);
bAttachPos = FindAttachment( pInHand, item );
//item = FindRangeBonusAttachment(pInHand);
//bAttachPos = FindAttachment( pInHand, item );
// lalien: search for barrel extender not for any item with range bonus. (else barrel extender will fall off even when none is attached)
bAttachPos = FindAttachment( pInHand, GUN_BARREL_EXTENDER );
if ( bAttachPos != ITEM_NOT_FOUND )
{
item = Item[pInHand->usAttachItem[bAttachPos]].uiIndex;
// reduce status and see if it falls off
pInHand->bAttachStatus[ bAttachPos ] -= (INT8) Random( 2 );