mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
BUGZILLA #549: Fixed mercs not showing up on MERC website
o Workaround for old bugged savegames: If passed day 30, make merc available on MERC website o Fixed problems with merc not showing up after Larry was added o Fixed white background graphic when MERC website is down (broken link) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4583 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-2
@@ -20,10 +20,11 @@ extern CHAR16 zTrackingNumber[16];
|
|||||||
//
|
//
|
||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||||
// you will invalidate the saved game file
|
// you will invalidate the saved game file
|
||||||
#define SAVE_GAME_VERSION 122 //114 //113 //112 //111 //110 //109 //108 //107 //106 //105 //104 //103 //102 //101 //100 // 99
|
#define SAVE_GAME_VERSION 123 //114 //113 //112 //111 //110 //109 //108 //107 //106 //105 //104 //103 //102 //101 //100 // 99
|
||||||
|
|
||||||
#define CURRENT_SAVEGAME_DATATYPE_VERSION 122
|
#define CURRENT_SAVEGAME_DATATYPE_VERSION 123
|
||||||
|
|
||||||
|
#define FIXED_MERC_NOT_AVAILABLE_ON_MERC_WEBSITE 123 // Before this, only Bubba was available on MERC website
|
||||||
#define FIXED_CREPITUS_IN_REALISTIC_GAME_MODE 122 // Before this, there was an initializing problem in GameInit.lua on startup, in which we could meet crepitus in Tixa underground map
|
#define FIXED_CREPITUS_IN_REALISTIC_GAME_MODE 122 // Before this, there was an initializing problem in GameInit.lua on startup, in which we could meet crepitus in Tixa underground map
|
||||||
#define FIXED_NPC_QUOTE_BUG 121 // Before this, we need to reload all npc quote information because it was not being saved and loaded correctly.
|
#define FIXED_NPC_QUOTE_BUG 121 // Before this, we need to reload all npc quote information because it was not being saved and loaded correctly.
|
||||||
#define MOVED_GENERAL_INFO 120 // Before this, general game information was saved much later in the save game process.
|
#define MOVED_GENERAL_INFO 120 // Before this, general game information was saved much later in the save game process.
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void RenderBrokenLink()
|
|||||||
|
|
||||||
void DrawBrokenLinkWhiteBackground()
|
void DrawBrokenLinkWhiteBackground()
|
||||||
{
|
{
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, Get16BPPColor( FROMRGB( 255, 255, 255) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y - 55, Get16BPPColor( FROMRGB( 255, 255, 255) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-3
@@ -2537,17 +2537,26 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
|||||||
{
|
{
|
||||||
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
|
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
|
||||||
{
|
{
|
||||||
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
|
|
||||||
|
|
||||||
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
|
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
|
||||||
{
|
{
|
||||||
|
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
|
||||||
|
|
||||||
if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
|
if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
|
||||||
{
|
{
|
||||||
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
|
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LaptopSaveInfo.gubLastMercIndex++;
|
// If Previous merc has alternate index
|
||||||
|
if (i > 0 && gConditionsForMercAvailability[ gConditionsForMercAvailability[i - 1].uiIndex ].uiAlternateIndex != 255)
|
||||||
|
{
|
||||||
|
// Previous merc has alternate (drunk) merc, skip his one!
|
||||||
|
LaptopSaveInfo.gubLastMercIndex = LaptopSaveInfo.gubLastMercIndex + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LaptopSaveInfo.gubLastMercIndex++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE;
|
gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE;
|
||||||
|
|||||||
@@ -5059,6 +5059,28 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WANNE: There were some problems in older savegames, that the MERC are not available on the merc site. Just recalculate the correct number of mercs
|
||||||
|
// Players that have a bugged savegame and are above Day 50 get ALL Merc on the website!
|
||||||
|
if(guiCurrentSaveGameVersion < FIXED_MERC_NOT_AVAILABLE_ON_MERC_WEBSITE)
|
||||||
|
{
|
||||||
|
// WORKAROUND: If player passed day 30, make merc available on MERC website!
|
||||||
|
if (LaptopSaveInfo.gubLastMercIndex <= 6 && GetWorldDay() >= 30)
|
||||||
|
{
|
||||||
|
LaptopSaveInfo.gubLastMercIndex = 0;
|
||||||
|
|
||||||
|
for(UINT8 i=0; i<NUM_PROFILES; i++)
|
||||||
|
{
|
||||||
|
if ( gConditionsForMercAvailability[i].ProfilId != 0 && (gConditionsForMercAvailability[i].NewMercsAvailable == TRUE || gConditionsForMercAvailability[i].StartMercsAvailable == TRUE ))
|
||||||
|
{
|
||||||
|
LaptopSaveInfo.gubLastMercIndex ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LaptopSaveInfo.gubLastMercIndex > 0)
|
||||||
|
LaptopSaveInfo.gubLastMercIndex = LaptopSaveInfo.gubLastMercIndex - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
//if the world is loaded, apply the temp files to the loaded map
|
//if the world is loaded, apply the temp files to the loaded map
|
||||||
|
|||||||
Reference in New Issue
Block a user