mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
-added StealthBonus tag to Items
-stealth works like extra camouflage, but is not terrain dependent and also conceals noise -fixed armour attachments getting destroyed when armour is destroyed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@361 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4144,6 +4144,17 @@ INT32 TotalArmourProtection( SOLDIERTYPE *pFirer, SOLDIERTYPE * pTarget, UINT8 u
|
||||
iTotalProtection += ArmourProtection( pTarget, Item[pArmour->usItem].ubClassIndex, &(pArmour->bStatus[0]), iImpact, ubAmmoType );
|
||||
if ( pArmour->bStatus[ 0 ] < USABLE )
|
||||
{
|
||||
//Madd: put any attachments that someone might have added to the armour in the merc's inventory
|
||||
for (int bLoop = 0; bLoop < MAX_ATTACHMENTS; bLoop++)
|
||||
{
|
||||
OBJECTTYPE newObj;
|
||||
CreateItem(pArmour->usAttachItem[bLoop], pArmour->bAttachStatus[bLoop], &newObj);
|
||||
if ( !AutoPlaceObject( pTarget, &newObj, FALSE ) )
|
||||
{ // put it on the ground
|
||||
AddItemToPool( pTarget->sGridNo, &newObj, 1, pTarget->bLevel, 0 , -1 );
|
||||
}
|
||||
}
|
||||
|
||||
DeleteObj( pArmour );
|
||||
DirtyMercPanelInterface( pTarget, DIRTYLEVEL2 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user