More detailed error messages for failed saves

Yet another phantom militia fix

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1124 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-07-26 05:26:38 +00:00
parent 3e997fa0e1
commit c462fd7744
3 changed files with 90 additions and 4 deletions
+34 -1
View File
@@ -25,6 +25,7 @@
#include "math.h"
#include "Auto Resolve.h"
#include "Vehicles.h"
#include "Soldier Init List.h"
#endif
#include "MilitiaSquads.h"
@@ -737,9 +738,41 @@ void DoMilitiaHelpFromAdjacentSectors( INT16 sMapX, INT16 sMapY )
if (gfStrategicMilitiaChangesMade)
{
RemoveMilitiaFromTactical();
PrepareMilitiaForTactical();
//PrepareMilitiaForTactical();
for( x = 0 ; x < guiDirNumber ; ++x )
{
#if 0
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld,%ld,%ld", gpAttackDirs[ x ][ 0 ], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2], gpAttackDirs[ x ][3] );
if( gfMSResetMilitia )
{
if( gpAttackDirs[ x ][ 3 ] != INSERTION_CODE_CENTER )
{
AddSoldierInitListMilitiaOnEdge( gpAttackDirs[ x ][ 3 ], gpAttackDirs[ x ][0], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2] );
ubGreen -= gpAttackDirs[ x ][0];
ubRegs -= gpAttackDirs[ x ][1];
ubElites -= gpAttackDirs[ x ][2];
}
}
else
{
#endif
if( gpAttackDirs[ x ][ 3 ] == INSERTION_CODE_CENTER )
{
AddSoldierInitListMilitia( gpAttackDirs[ x ][0], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2] );
}
else
{
AddSoldierInitListMilitiaOnEdge( gpAttackDirs[ x ][ 3 ], gpAttackDirs[ x ][0], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2] );
}
// }
}
gfStrategicMilitiaChangesMade = FALSE;
}
guiDirNumber = 0;
memset( gpAttackDirs, 0, sizeof( gpAttackDirs));
}
void MSCallBack( UINT8 ubResult )