Little Alien 2006-04-30

Bugfix: not possible to hit enemy on roof, bullet hits something just after shot

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@44 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2006-04-30 13:27:54 +00:00
parent 3e5e48af29
commit 07028a5737
+8 -1
View File
@@ -3487,7 +3487,14 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
dDeltaY = dEndY - dStartY;
dDeltaZ = dEndZ - dStartZ;
d2DDistance = Distance2D( dDeltaX, dDeltaY );
//lal bugfix
if( dDeltaZ > 0 )
d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ );
else
d2DDistance = Distance2D( dDeltaX, dDeltaY );
//d2DDistance = Distance2D( dDeltaX, dDeltaY );
iDistance = (INT32) d2DDistance;
if ( d2DDistance != iDistance )