-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:
MaddMugsy
2006-07-20 23:27:23 +00:00
parent 2abefe52a8
commit 37162fc413
7 changed files with 79 additions and 5 deletions
+11
View File
@@ -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 );
}