Brief: //dnl ch67

- Throwing knives had tendency to magically disappear if hit some kind structure.
Details:
- For those who like Dimitri, throwing knives will not disappear anymore if hit some structure or flies into the sky, also using them affect their condition.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6378 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Kriplo
2013-09-08 17:20:27 +00:00
parent 5428ee5ae1
commit d05d130f33
2 changed files with 69 additions and 16 deletions
+8 -15
View File
@@ -2364,30 +2364,23 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend
if (pBullet->usFlags & BULLET_FLAG_KNIFE)
{
//dnl ch67 080913
// Place knife on guy....
UINT16 usItem = (Item[pBullet->fromItem].bloodieditem>0 ? Item[pBullet->fromItem].bloodieditem : pBullet->fromItem);
UINT16 usItemStatus = (pBullet->ubItemStatus>1 ? pBullet->ubItemStatus-Random(2) : pBullet->ubItemStatus);
// See if they have room ( and make sure it's not in hand pos?
// CHRISL:
bSlot = FindEmptySlotWithin( pTarget, BIGPOCKSTART, NUM_INV_SLOTS );
if (bSlot == NO_SLOT)
if(bSlot == NO_SLOT)
{
// Add item
CreateItem( pBullet->fromItem, (INT8) pBullet->ubItemStatus, &gTempObject );
AddItemToPool( pTarget->sGridNo, &gTempObject, -1 , pTarget->pathing.bLevel, 0, 0 );
CreateItem(usItem, usItemStatus, &gTempObject);
AddItemToPool(pTarget->sGridNo, &gTempObject, -1, pTarget->pathing.bLevel, 0, 0);
// Make team look for items
NotifySoldiersToLookforItems( );
NotifySoldiersToLookforItems();
}
else
{
if ( Item[pBullet->fromItem].bloodieditem > 0 )
CreateItem( Item[pBullet->fromItem].bloodieditem, (INT8) pBullet->ubItemStatus, &(pTarget->inv[bSlot]) );
else
CreateItem( pBullet->fromItem, (INT8) pBullet->ubItemStatus, &(pTarget->inv[bSlot]) );
}
CreateItem(usItem, usItemStatus, &pTarget->inv[bSlot]);
ubAmmoType = AMMO_KNIFE;
}
else if (pBullet->fFragment)