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:
Marco Antonio Jaguaribe Costa
2023-01-19 00:13:08 +02:00
committed by Asdow
parent 6afe785f4b
commit 8b1c4effa0
72 changed files with 0 additions and 6657 deletions
-78
View File
@@ -2946,85 +2946,7 @@ INT32 FindClosestClimbPoint (SOLDIERTYPE *pSoldier, BOOLEAN fClimbUp )
BOOLEAN CanClimbFromHere (SOLDIERTYPE * pSoldier, BOOLEAN fUp )
{
#if 1
return FindDirectionForClimbing( pSoldier, pSoldier->sGridNo, pSoldier->pathing.bLevel) != DIRECTION_IRRELEVANT;
#else
BUILDING * pBuilding;
INT32 i;
INT32 iSearchRange = 1;
INT16 sMaxLeft, sMaxRight, sMaxUp, sMaxDown, sXOffset, sYOffset;
//DebugMsg( TOPIC_JA2AI , DBG_LEVEL_3 , "CanClimbFromHere");
// determine maximum horizontal limits
sMaxLeft = min( iSearchRange, (pSoldier->sGridNo % MAXCOL));
sMaxRight = min( iSearchRange, MAXCOL - ((pSoldier->sGridNo % MAXCOL) + 1));
// determine maximum vertical limits
sMaxUp = min( iSearchRange, (pSoldier->sGridNo / MAXROW));
sMaxDown = min( iSearchRange, MAXROW - ((pSoldier->sGridNo / MAXROW) + 1));
INT32 sGridNo=NOWHERE;
for (sYOffset = -sMaxUp; sYOffset <= sMaxDown; sYOffset++)
{
for (sXOffset = -sMaxLeft; sXOffset <= sMaxRight; sXOffset++)
{
// calculate the next potential gridno
sGridNo = pSoldier->sGridNo + sXOffset + (MAXCOL * sYOffset);
//DebugMsg( TOPIC_JA2AI , DBG_LEVEL_3 , String("Checking grid %d" , sGridNo ));
//NumMessage("Testing gridno #",gridno);
if ( !(sGridNo >=0 && sGridNo < WORLD_MAX) )
{
continue;
}
if ( sGridNo == pSoldier->pathing.sBlackList )
{
continue;
}
// OK, this place shows potential. How useful is it as cover?
//NumMessage("Promising seems gridno #",gridno);
// Kaiden: From this point down I've removed an unneccessary call to
// FindBuilding, The original code that was from this point till the
// end of the function is now commented out AFTER the function.
pBuilding = FindBuilding ( sGridNo );
if ( pBuilding != NULL)
{
if ( fUp )
{
for (i = 0 ; i < pBuilding->ubNumClimbSpots; i++)
{
if (pBuilding->sUpClimbSpots[ i ] == pSoldier->sGridNo &&
(WhoIsThere2( pBuilding->sUpClimbSpots[ i ], 0 ) == NOBODY)
&& (WhoIsThere2( pBuilding->sDownClimbSpots[ i ], 1 ) == NOBODY) )
return TRUE;
}
}
else
{
for (i = 0 ; i < pBuilding->ubNumClimbSpots; i++)
{
if (pBuilding->sDownClimbSpots[ i ] == pSoldier->sGridNo &&
(WhoIsThere2( pBuilding->sUpClimbSpots[ i ], 0 ) == NOBODY)
&& (WhoIsThere2( pBuilding->sDownClimbSpots[ i ], 1 ) == NOBODY) )
return TRUE;
}
}
}
}
}
return FALSE;
#endif
}
// OK, this place shows potential. How useful is it as cover?
//NumMessage("Promising seems gridno #",gridno);