mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- 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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user