- bugfix: Only one M.E.R.C merc was available in single player mode.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2165 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2008-05-14 05:37:33 +00:00
parent 3823ac6f06
commit 36be370bca
2 changed files with 10 additions and 6 deletions
+6 -6
View File
@@ -66,7 +66,7 @@
#define MERC_AC_ROW_SIZE 16
// The maximum number of mercs
#define TOTAL_NUMBER_OF_MERCS 14
//#define TOTAL_NUMBER_OF_MERCS 14
#define MAX_NUMBER_MERCS_ON_PAGE 12
UINT32 guiMercOrderGrid;
@@ -187,7 +187,7 @@ INT32 GetNumberOfHiredMercs()
giMercTotalContractCharge = 0;
for (i = 0; i<=TOTAL_NUMBER_OF_MERCS; i++)
for (i = 0; i<=(NUMBER_OF_MERCS - 1); i++)
{
if( i == MERC_LARRY_ROACHBURN )
continue;
@@ -480,9 +480,9 @@ void DisplayHiredMercs()
usMercIDStart = iCurrentAccountPage * MAX_NUMBER_MERCS_ON_PAGE;
// End
if ((usMercIDStart + MAX_NUMBER_MERCS_ON_PAGE) > TOTAL_NUMBER_OF_MERCS)
if ((usMercIDStart + MAX_NUMBER_MERCS_ON_PAGE) > (NUMBER_OF_MERCS - 1))
{
usMercIDEnd = TOTAL_NUMBER_OF_MERCS;
usMercIDEnd = (NUMBER_OF_MERCS - 1);
}
else
{
@@ -497,7 +497,7 @@ void DisplayHiredMercs()
}
// Loop through all the mercs
for(i=usMercIDStart; i <= TOTAL_NUMBER_OF_MERCS ; i++)
for(i=usMercIDStart; i <= (NUMBER_OF_MERCS - 1) ; i++)
{
// We have no more free rows on the current page
if (usCurrentRow == usMercIDEnd - 1)
@@ -739,7 +739,7 @@ UINT32 CalculateHowMuchPlayerOwesSpeck()
UINT32 uiContractCharge=0;
UINT16 usMercID;
for(i=0; i<TOTAL_NUMBER_OF_MERCS; i++)
for(i=0; i<(NUMBER_OF_MERCS - 1); i++)
{
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
if( i == MERC_LARRY_ROACHBURN )
+4
View File
@@ -330,6 +330,10 @@ void GameInitMercs()
// for(i=0; i<NUMBER_OF_MERCS; i++)
// gubMercArray[ i ] = i+BIFF;
// WANNE - MP: Initialize the the variables for single player
NUMBER_OF_MERCS = 15;
LAST_MERC_ID = 14;
//can now be out of order
gubMercArray[ 0 ] = BIFF;
gubMercArray[ 1 ] = HAYWIRE;