mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature: Diseaes affect your mercenaries. They can be contracted in varíous ways and have varying effects.
For more info, see http://www.ja-galaxy-forum.com/ubbthreads.php/topics/334918#Post334918 Requires GameDir >= r2099. Does not break savegame compatibility. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2585,9 +2585,20 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend
|
||||
AddItemToPool(pTarget->sGridNo, &gTempObject, -1, pTarget->pathing.bLevel, 0, 0);
|
||||
// Make team look for items
|
||||
NotifySoldiersToLookforItems();
|
||||
|
||||
// Flugente: if this guy has the disease, or the blade was already infected, the new one will be too
|
||||
if ( pTarget->sDiseasePoints[0] > 0 || pBullet->usFlags & BULLET_FLAG_INFECTED )
|
||||
(*&gTempObject)[0]->data.sObjectFlag |= INFECTED;
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateItem(usItem, usItemStatus, &pTarget->inv[bSlot]);
|
||||
|
||||
// Flugente: if this guy has the disease, or the blade was already infected, the new one will be too
|
||||
if ( pTarget->sDiseasePoints[0] > 0 || pBullet->usFlags & BULLET_FLAG_INFECTED )
|
||||
pTarget->inv[bSlot][0]->data.sObjectFlag |= INFECTED;
|
||||
}
|
||||
|
||||
ubAmmoType = AMMO_KNIFE;
|
||||
}
|
||||
else if (pBullet->fFragment)
|
||||
@@ -2600,6 +2611,13 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend
|
||||
ubAmmoType = pFirer->inv[pFirer->ubAttackingHand][0]->data.gun.ubGunAmmoType;
|
||||
}
|
||||
|
||||
// Flugente: if bullet is infected, give us disease (this is intended for throwing knifes)
|
||||
if ( pBullet->usFlags & BULLET_FLAG_INFECTED )
|
||||
{
|
||||
// infect us with the first disease
|
||||
pTarget->Infect( 0 );
|
||||
}
|
||||
|
||||
// HEADROCK HAM 5.1: This is an utter hack, but it may be necessary. This soldier is hit by a fragment,
|
||||
// so he needs to have his animations be interruptible. This takes care of soldiers hitting themselves
|
||||
// with their own fragments.
|
||||
@@ -4503,6 +4521,10 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
|
||||
if ( AmmoTypes[(*pObjAttHand)[0]->data.gun.ubGunAmmoType].ammoflag & AMMO_ANTIMATERIEL )
|
||||
usBulletFlags |= BULLET_FLAG_ANTIMATERIEL;
|
||||
|
||||
// Flugente: if object is infected, missile is too (intended for throwing knifes)
|
||||
if ( (*pObjAttHand)[0]->data.sObjectFlag & INFECTED )
|
||||
usBulletFlags |= BULLET_FLAG_INFECTED;
|
||||
|
||||
ubImpact =(UINT8) GetDamage(&pFirer->inv[pFirer->ubAttackingHand]);
|
||||
//zilpin: Begin new code block for spread patterns, number of projectiles, impact adjustment, etc.
|
||||
{
|
||||
@@ -4987,6 +5009,10 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
||||
if ( AmmoTypes[ pFirer->inv[pFirer->ubAttackingHand][0]->data.gun.ubGunAmmoType ].ammoflag & AMMO_ANTIMATERIEL )
|
||||
usBulletFlags |= BULLET_FLAG_ANTIMATERIEL;
|
||||
|
||||
// Flugente: if object is infected, missile is too (intended for throwing knifes)
|
||||
if ( (*pObjAttHand)[0]->data.sObjectFlag & INFECTED )
|
||||
usBulletFlags |= BULLET_FLAG_INFECTED;
|
||||
|
||||
ubImpact =(UINT8) GetDamage(pObjAttHand);
|
||||
//zilpin: pellet spread patterns externalized in XML
|
||||
/* zilpin: The section below, including line comments, is the original adjustment made to multiple projectile stats.
|
||||
|
||||
Reference in New Issue
Block a user