mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
cleaned up code: some comiler-warnings fixed, obsolete code removed (oops..and some whitespace stuff) (by CleaningWoman)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6102 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "Random.h"
|
||||
#include "Strategic Pathing.h"
|
||||
#include "message.h"
|
||||
// #include "Sound Control.h"
|
||||
#include "strategicmap.h"
|
||||
#include "Game Clock.h"
|
||||
#include "strategic.h"
|
||||
@@ -568,11 +567,6 @@ INT32 GarrisonReinforcementsRequested( INT32 iGarrisonID, UINT8 *pubExtraReinfor
|
||||
|
||||
iReinforcementsRequested = min( iMaxEnemyGroupSize, iReinforcementsRequested );
|
||||
|
||||
if( iReinforcementsRequested + *pubExtraReinforcements + iExistingForces > iMaxEnemyGroupSize )
|
||||
{
|
||||
iExistingForces = iExistingForces;
|
||||
}
|
||||
|
||||
return iReinforcementsRequested;
|
||||
}
|
||||
|
||||
@@ -2301,6 +2295,8 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic5");
|
||||
//returns TRUE if the group was deleted.
|
||||
BOOLEAN StrategicAILookForAdjacentGroups( GROUP *pGroup )
|
||||
{
|
||||
Assert(pGroup);
|
||||
|
||||
SECTORINFO *pSector;
|
||||
GROUP *pEnemyGroup, *pPlayerGroup;
|
||||
UINT8 ubNumEnemies;
|
||||
@@ -3165,10 +3161,6 @@ void SendReinforcementsForPatrol( INT32 iPatrolID, GROUP **pOptionalGroup )
|
||||
if( iRandom < giReinforcementPool )
|
||||
{ //use the pool and send the requested amount from SECTOR P3 (queen's palace)
|
||||
iReinforcementsApproved = min( iReinforcementsRequested, giReinforcementPool );
|
||||
if( !iReinforcementsApproved )
|
||||
{
|
||||
iReinforcementsApproved = iReinforcementsApproved;
|
||||
}
|
||||
pGroup = CreateNewEnemyGroupDepartingFromSector( SEC_P3, 0, (UINT8)iReinforcementsApproved, 0 );
|
||||
pGroup->ubOriginalSector = (UINT8)SECTOR( ubDstSectorX, ubDstSectorY );
|
||||
|
||||
@@ -6487,14 +6479,8 @@ void MoveSAIGroupToSector( GROUP **pGroup, UINT8 ubSectorID, UINT32 uiMoveCode,
|
||||
(*pGroup)->pEnemyGroup->ubIntention = ubIntention;
|
||||
(*pGroup)->ubMoveType = ONE_WAY;
|
||||
|
||||
if( ubIntention == PURSUIT )
|
||||
{ //Make sure that the group isn't moving into a garrison sector. These sectors should be using ASSAULT intentions!
|
||||
if( SectorInfo[ ubSectorID ].ubGarrisonID != NO_GARRISON )
|
||||
{
|
||||
//Good place for a breakpoint.
|
||||
pGroup = pGroup;
|
||||
}
|
||||
}
|
||||
//Make sure that the group isn't moving into a garrison sector. These sectors should be using ASSAULT intentions!
|
||||
Assert(ubIntention != PURSUIT && SectorInfo[ ubSectorID ].ubGarrisonID != NO_GARRISON );
|
||||
|
||||
if( (*pGroup)->ubSectorX == ubDstSectorX && (*pGroup)->ubSectorY == ubDstSectorY )
|
||||
{ //The destination sector is the current location. Instead of causing code logic problems,
|
||||
|
||||
Reference in New Issue
Block a user