mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Removed unused code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7709 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2814,8 +2814,9 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve2");
|
||||
{
|
||||
AddDeadSoldierToUnLoadedSector( gpAR->ubSectorX, gpAR->ubSectorY, 0, gpCivs[ i ].pSoldier, RandomGridNo(), ADD_DEAD_SOLDIER_TO_SWEETSPOT );
|
||||
StrategicRemoveMilitiaFromSector( gpCivs[ i ].pSoldier->sSectorX, gpCivs[ i ].pSoldier->sSectorY, ubCurrentRank, 1 );
|
||||
// ARRemoveMilitiaMan( gpAR->ubSectorX, gpAR->ubSectorY, ubCurrentRank );
|
||||
if( ProcessLoyalty() )HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_NATIVE_KILLED, gpAR->ubSectorX, gpAR->ubSectorY, 0 );
|
||||
|
||||
if( ProcessLoyalty() )
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_NATIVE_KILLED, gpAR->ubSectorX, gpAR->ubSectorY, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -156,25 +156,6 @@ UINT8 CountAllMilitiaInFiveSectors(INT16 sMapX, INT16 sMapY)
|
||||
return ubResult;
|
||||
}
|
||||
|
||||
UINT8 MilitiaInFiveSectorsOfRank( INT16 sMapX, INT16 sMapY, UINT8 ubRank )
|
||||
{
|
||||
UINT8 ubResult = 0;
|
||||
UINT16 pusMoveDir[4][3];
|
||||
UINT8 ubDirNumber, ubIndex;
|
||||
|
||||
ubResult = MilitiaInSectorOfRank( sMapX, sMapY, ubRank );
|
||||
|
||||
if( !gGameExternalOptions.gfAllowReinforcements )
|
||||
return ubResult;
|
||||
|
||||
GenerateDirectionInfos( sMapX, sMapY, &ubDirNumber, pusMoveDir, FALSE, TRUE );
|
||||
|
||||
for( ubIndex = 0; ubIndex < ubDirNumber; ubIndex++ )
|
||||
ubResult += MilitiaInSectorOfRank( SECTORX( pusMoveDir[ ubIndex ][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ), ubRank );
|
||||
|
||||
return ubResult;
|
||||
}
|
||||
|
||||
BOOLEAN ARMoveBestMilitiaManFromAdjacentSector(INT16 sMapX, INT16 sMapY)
|
||||
{
|
||||
UINT16 pusMoveDir[4][3];
|
||||
@@ -198,37 +179,6 @@ BOOLEAN ARMoveBestMilitiaManFromAdjacentSector(INT16 sMapX, INT16 sMapY)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN ARRemoveMilitiaMan( INT16 sMapX, INT16 sMapY, UINT8 ubRank )
|
||||
{
|
||||
UINT16 pusMoveDir[4][3];
|
||||
UINT8 ubDirNumber, ubRandom;
|
||||
|
||||
if( MilitiaInSectorOfRank( sMapX, sMapY, ubRank ) )
|
||||
{
|
||||
StrategicRemoveMilitiaFromSector( sMapX, sMapY, ubRank, 1 );
|
||||
ARMoveBestMilitiaManFromAdjacentSector( sMapX, sMapY );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if( !gGameExternalOptions.gfAllowReinforcements )
|
||||
return FALSE;
|
||||
|
||||
GenerateDirectionInfos( sMapX, sMapY, &ubDirNumber, pusMoveDir, FALSE, TRUE );
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
ubRandom = Random( ubDirNumber );
|
||||
if( MilitiaInSectorOfRank( SECTORX( pusMoveDir[ ubRandom ][ 0 ] ), SECTORY( pusMoveDir[ ubRandom ][ 0 ] ), ubRank ) )
|
||||
{
|
||||
StrategicRemoveMilitiaFromSector( SECTORX( pusMoveDir[ ubRandom ][ 0 ] ), SECTORY( pusMoveDir[ ubRandom ][ 0 ] ), ubRank, 1 );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GROUP* GetEnemyGroupInSector( INT16 sMapX, INT16 sMapY )
|
||||
{
|
||||
GROUP *curr;
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
#ifndef __REINFORCEMENT_H__
|
||||
#define __REINFORCEMENT_H__
|
||||
|
||||
|
||||
#define IS_ONLY_IN_CITIES ( gGameExternalOptions.gfAllowReinforcementsOnlyInCity ? TRUE: FALSE )
|
||||
|
||||
|
||||
//For Autoresolve (mostly)
|
||||
void GetNumberOfEnemiesInFiveSectors( INT16 sSectorX, INT16 sSectorY, UINT8 *pubNumAdmins, UINT8 *pubNumTroops, UINT8 *pubNumElites, UINT8 *pubNumTanks );
|
||||
BOOLEAN IsGroupInARightSectorToReinforce( GROUP *pGroup, INT16 sSectorX, INT16 sSectorY );
|
||||
UINT8 GetAdjacentSectors( UINT8 pSectors[4], INT16 sSectorX, INT16 sSectorY );
|
||||
UINT8 CountAllMilitiaInFiveSectors(INT16 sMapX, INT16 sMapY);
|
||||
UINT8 MilitiaInFiveSectorsOfRank(INT16 sMapX, INT16 sMapY, UINT8 ubRank);
|
||||
BOOLEAN ARRemoveMilitiaMan( INT16 sMapX, INT16 sMapY, UINT8 ubRank );
|
||||
UINT8 NumEnemiesInFiveSectors( INT16 sMapX, INT16 sMapY );
|
||||
|
||||
//For Tactical
|
||||
|
||||
Reference in New Issue
Block a user