mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fix: shooting through roof.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9302 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+6
-5
@@ -3929,15 +3929,17 @@ UINT8 CalcChanceToGetThrough( BULLET * pBullet )
|
|||||||
}
|
}
|
||||||
else if (pStructure->fFlags & STRUCTURE_ROOF)
|
else if (pStructure->fFlags & STRUCTURE_ROOF)
|
||||||
{
|
{
|
||||||
// only consider roofs if the flag is set; don't add them to the array since they
|
// only consider roofs if the flag is set; don't add them to the array since they are a special case
|
||||||
// are a special case
|
// sevenfm: always check roof
|
||||||
if (pBullet->fCheckForRoof)
|
//if (pBullet->fCheckForRoof)
|
||||||
{
|
{
|
||||||
pRoofStructure = pStructure;
|
pRoofStructure = pStructure;
|
||||||
|
|
||||||
if ( pRoofStructure )
|
if ( pRoofStructure )
|
||||||
{
|
{
|
||||||
qLastZ = pBullet->qCurrZ - pBullet->qIncrZ;
|
// sevenfm: improved check to catch roof crossing
|
||||||
|
//qLastZ = pBullet->qCurrZ - pBullet->qIncrZ;
|
||||||
|
qLastZ = pBullet->qCurrZ - pBullet->qIncrZ * 10;
|
||||||
|
|
||||||
// if just on going to next tile we cross boundary, then roof stops bullet here!
|
// if just on going to next tile we cross boundary, then roof stops bullet here!
|
||||||
if ( (qLastZ > qWallHeight && pBullet->qCurrZ <= qWallHeight) || (qLastZ < qWallHeight && pBullet->qCurrZ >= qWallHeight))
|
if ( (qLastZ > qWallHeight && pBullet->qCurrZ <= qWallHeight) || (qLastZ < qWallHeight && pBullet->qCurrZ >= qWallHeight))
|
||||||
@@ -3948,7 +3950,6 @@ UINT8 CalcChanceToGetThrough( BULLET * pBullet )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pStructure->fFlags & STRUCTURE_PERSON)
|
else if (pStructure->fFlags & STRUCTURE_PERSON)
|
||||||
|
|||||||
Reference in New Issue
Block a user