mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- bugfix: CTDs after you have placed your mercs before the attacking occurs
- added notification when you try to create a new IMP and you already have the maxium number of mercs (18) in your team. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@619 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1063,9 +1063,9 @@ UINT32 UIHandleNewMerc( UI_EVENT *pUIEvent )
|
||||
{
|
||||
ScreenMsg( FONT_ORANGE, MSG_BETAVERSION, L"Merc hire failed: Either already hired or dislikes you." );
|
||||
}
|
||||
else if( bReturnCode == MERC_HIRE_OVER_20_MERCS_HIRED )
|
||||
else if( bReturnCode == MERC_HIRE_OVER_18_MERCS_HIRED )
|
||||
{
|
||||
ScreenMsg( FONT_ORANGE, MSG_BETAVERSION, L"Can't hire more than 20 mercs." );
|
||||
ScreenMsg( FONT_ORANGE, MSG_BETAVERSION, L"Can't hire more than 18 mercs." );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ INT8 HireMerc( MERC_HIRE_STRUCT *pHireMerc)
|
||||
return( MERC_HIRE_FAILED );
|
||||
|
||||
if( NumberOfMercsOnPlayerTeam() >= 18 )
|
||||
return( MERC_HIRE_OVER_20_MERCS_HIRED );
|
||||
return( MERC_HIRE_OVER_18_MERCS_HIRED );
|
||||
|
||||
// ATE: if we are to use landing zone, update to latest value
|
||||
// they will be updated again just before arrival...
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// Used with the HireMerc function
|
||||
//
|
||||
#define MERC_HIRE_OVER_20_MERCS_HIRED -1
|
||||
#define MERC_HIRE_OVER_18_MERCS_HIRED -1
|
||||
#define MERC_HIRE_FAILED 0
|
||||
#define MERC_HIRE_OK 1
|
||||
|
||||
|
||||
@@ -2343,6 +2343,13 @@ void AddSoldierInitListMilitiaOnEdge( UINT8 ubStrategicInsertionCode, UINT8 ubNu
|
||||
UINT8 ubCurrSlot;
|
||||
UINT8 ubTotalSoldiers;
|
||||
UINT8 bDesiredDirection=0;
|
||||
|
||||
ubTotalSoldiers = ubNumGreen + ubNumReg + ubNumElites;
|
||||
|
||||
// WANNE: If we have no militia soldiers -> exit!
|
||||
if (ubTotalSoldiers == 0)
|
||||
return;
|
||||
|
||||
switch( ubStrategicInsertionCode )
|
||||
{
|
||||
case INSERTION_CODE_NORTH: bDesiredDirection = SOUTHEAST; break;
|
||||
@@ -2355,8 +2362,6 @@ void AddSoldierInitListMilitiaOnEdge( UINT8 ubStrategicInsertionCode, UINT8 ubNu
|
||||
ScreenMsg( FONT_RED, MSG_INTERFACE, L"Militia reinforcements have arrived! (%d admins, %d troops, %d elite)", ubNumGreen, ubNumReg, ubNumElites );
|
||||
#endif
|
||||
|
||||
ubTotalSoldiers = ubNumGreen + ubNumReg + ubNumElites;
|
||||
|
||||
ChooseMapEdgepoints( &MapEdgepointInfo, ubStrategicInsertionCode, (UINT8)(ubNumGreen + ubNumReg + ubNumElites) );
|
||||
ubCurrSlot = 0;
|
||||
while( ubTotalSoldiers )
|
||||
|
||||
Reference in New Issue
Block a user