mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
If <BloodiedItem> is set on a blade, the blade weapon wil be replaced with th specified item when a person is hit with it.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7337 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5805,6 +5805,13 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1
|
||||
else
|
||||
sBreathLoss = APBPConstants[BP_GET_HIT];
|
||||
ubReason = TAKE_DAMAGE_BLADE;
|
||||
|
||||
// Flugente: check wether we can make this blade bloody
|
||||
if ( ubAttackerID != NOBODY && MercPtrs[ubAttackerID]->inv[HANDPOS].exists( ) && Item[MercPtrs[ubAttackerID]->inv[HANDPOS].usItem].bloodieditem > 0 )
|
||||
{
|
||||
// magic happens
|
||||
MercPtrs[ubAttackerID]->inv[HANDPOS].usItem = Item[MercPtrs[ubAttackerID]->inv[HANDPOS].usItem].bloodieditem;
|
||||
}
|
||||
}
|
||||
else if ( Item[usWeaponIndex].usItemClass & IC_PUNCH )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user