mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix: antimateriel bullet damage to structures often isn't properly applied
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9080 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5633,7 +5633,8 @@ void StructureHit( INT32 iBullet, UINT16 usWeaponIndex, INT16 bWeaponStatus, UIN
|
||||
// Get Structure pointer and damage it!
|
||||
if ( usStructureID != INVALID_STRUCTURE_ID )
|
||||
{
|
||||
pStructure = FindStructureByID( sGridNo, usStructureID );
|
||||
// Flugente: if possible, take the gridno of the bullet. Otherwise we often get the issue that the calculated gridno is not the one where the structure is, leading to the structure being undamaged
|
||||
pStructure = FindStructureByID( pBullet ? pBullet->sGridNo : sGridNo, usStructureID );
|
||||
|
||||
DamageStructure( pStructure, (UINT8)iImpact, STRUCTURE_DAMAGE_GUNFIRE, sGridNo, sXPos, sYPos, ubAttackerID, pBullet->usFlags & BULLET_FLAG_ANTIMATERIEL ? pBullet->iImpact - pBullet->iImpactReduction : 0 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user