mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
nuke all the #if 0's
scripted commit:
find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'
https://coan2.sourceforge.net/coan_man_1.html
This commit is contained in:
committed by
Asdow
parent
6afe785f4b
commit
8b1c4effa0
@@ -4805,15 +4805,7 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
|
||||
dDeltaX = dEndX - dStartX;
|
||||
dDeltaY = dEndY - dStartY;
|
||||
dDeltaZ = dEndZ - dStartZ;
|
||||
#if 0//dnl ch60 020913 isn't true see reason in FireBulletGivenTarget
|
||||
//lal bugfix
|
||||
if( dDeltaZ > 0 )
|
||||
d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ );
|
||||
else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#endif
|
||||
iDistance = (INT32) d2DDistance;
|
||||
|
||||
if ( d2DDistance != iDistance )
|
||||
@@ -5304,15 +5296,7 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
||||
dDeltaX = dEndX - dStartX;
|
||||
dDeltaY = dEndY - dStartY;
|
||||
dDeltaZ = dEndZ - dStartZ;
|
||||
#if 0//dnl ch60 311009 this isn't correct, e.g. if you try head shot from prone to standing target at 1 tile, Distance3D will calculate 7,8 tile distance, this means that you will always hit target regard of CTH calculation, correct usage will be Distance3D(dDeltaX, dDeltaY, CONVERT_HEIGHTUNITS_TO_DISTANCE(dDeltaZ)) but we need here 2D distance as was in original v1.12
|
||||
//lal bugfix
|
||||
if( dDeltaZ > 0 )
|
||||
d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ );
|
||||
else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#endif
|
||||
iDistance = (INT32) d2DDistance;
|
||||
|
||||
if ( d2DDistance != iDistance )
|
||||
@@ -5813,15 +5797,7 @@ INT8 FireFragmentGivenTarget( UINT8 ubOwner, FLOAT dStartX, FLOAT dStartY, FLOAT
|
||||
dDeltaX = dEndX - dStartX;
|
||||
dDeltaY = dEndY - dStartY;
|
||||
dDeltaZ = dEndZ - dStartZ;
|
||||
#if 0//dnl ch60 030913
|
||||
//lal bugfix
|
||||
if( dDeltaZ > 0 )
|
||||
d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ );
|
||||
else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#endif
|
||||
iDistance = (INT32) d2DDistance;
|
||||
|
||||
if ( d2DDistance != iDistance )
|
||||
@@ -5990,15 +5966,7 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
dDeltaX = dEndX - dStartX;
|
||||
dDeltaY = dEndY - dStartY;
|
||||
dDeltaZ = dEndZ - dStartZ;
|
||||
#if 0//dnl ch60 030913
|
||||
//lal bugfix
|
||||
if( dDeltaZ > 0 )
|
||||
d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ );
|
||||
else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#endif
|
||||
iDistance = (INT32) d2DDistance;
|
||||
|
||||
if ( d2DDistance != iDistance )
|
||||
@@ -8584,11 +8552,7 @@ void AdjustTargetCenterPoint( SOLDIERTYPE *pShooter, INT32 iTargetGridNo, FLOAT
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// Find distance between shooter and target, in points.
|
||||
FLOAT d2DDistance=0;
|
||||
#if 0//dnl ch60 030913
|
||||
d2DDistance = Distance3D( dDeltaX, dDeltaY, CONVERT_HEIGHTUNITS_TO_DISTANCE( dDeltaZ ) );
|
||||
#else
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
#endif
|
||||
// Round it upwards.
|
||||
INT32 iDistance = (INT32) d2DDistance;
|
||||
if ( d2DDistance != iDistance )
|
||||
|
||||
Reference in New Issue
Block a user