mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- New feature: Ammotype flag AMMO_ANTIMATERIEL (<ammoflag>4</ammoflag>) gives bullets the ability to destroy walls and other structures.
- Fix: SoldierToSoldierLineOfSightTest was called against NOBODY git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7069 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4442,6 +4442,10 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
|
||||
fTracer = TRUE;
|
||||
}
|
||||
|
||||
// Flugente: anti-materiel ammo
|
||||
if ( AmmoTypes[(*pObjAttHand)[0]->data.gun.ubGunAmmoType].ammoflag & AMMO_ANTIMATERIEL )
|
||||
usBulletFlags |= BULLET_FLAG_ANTIMATERIEL;
|
||||
|
||||
ubImpact =(UINT8) GetDamage(&pFirer->inv[pFirer->ubAttackingHand]);
|
||||
//zilpin: Begin new code block for spread patterns, number of projectiles, impact adjustment, etc.
|
||||
{
|
||||
@@ -4922,6 +4926,10 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
||||
fTracer = TRUE;
|
||||
}
|
||||
|
||||
// Flugente: anti-materiel ammo
|
||||
if ( AmmoTypes[ pFirer->inv[pFirer->ubAttackingHand][0]->data.gun.ubGunAmmoType ].ammoflag & AMMO_ANTIMATERIEL )
|
||||
usBulletFlags |= BULLET_FLAG_ANTIMATERIEL;
|
||||
|
||||
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.
|
||||
@@ -5573,6 +5581,10 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
ubSpreadIndex = 2;
|
||||
}
|
||||
|
||||
// Flugente: anti-materiel ammo
|
||||
if ( AmmoTypes[(*pObj)[0]->data.gun.ubGunAmmoType].ammoflag & AMMO_ANTIMATERIEL )
|
||||
usBulletFlags |= BULLET_FLAG_ANTIMATERIEL;
|
||||
|
||||
// no option to use fire bursts or autofire yet
|
||||
/*// HEADROCK HAM B2.5: Set tracer effect on/off for individual bullets in a Tracer Magazine, as part of the
|
||||
// New Tracer System.
|
||||
@@ -6872,6 +6884,16 @@ void MoveBullet( INT32 iBullet )
|
||||
// play animation to indicate structure being hit
|
||||
BulletHitStructure( pBullet, pStructure->usStructureID, 1, pBullet->qCurrX, pBullet->qCurrY, pBullet->qCurrZ, FALSE );
|
||||
gubLocalStructureNumTimesHit[iStructureLoop] = 1;
|
||||
|
||||
// Flugente: anti-materiel rifles have to be handled slightly different - we have to remove the bullet after impact.
|
||||
// Otherwise we might destroy a structure, but this function won't 'realize' it, leading to invalid memory access
|
||||
if ( pBullet->usFlags & BULLET_FLAG_ANTIMATERIEL )
|
||||
{
|
||||
// Moved here to keep ABC >0 as long as possible
|
||||
RemoveBullet( iBullet );
|
||||
// ReduceAttackBusyCount( );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user