fix for CTD when the prebattle interface should come up but we are in tactical screen at the moment. The game tried to draw into an invalid screen.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7096 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2014-03-19 17:22:31 +00:00
parent 76511902e0
commit 51f2eaff78
+9 -5
View File
@@ -427,17 +427,21 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
}
}
fMapScreenBottomDirty = TRUE;
ChangeSelectedMapSector( gubPBSectorX, gubPBSectorY, gubPBSectorZ );
// Headrock: Added FALSE argument, We might need TRUE but not sure. Will need to initiate battle :)
RenderMapScreenInterfaceBottom( FALSE );
// silversurfer: moved this up here because this check needs to be done before we draw anything on the map screen - otherwise CTD.
// Also the necessary variables have to be set.
//If we are currently in tactical, then set the flag to automatically bring up the mapscreen.
if( guiCurrentScreen == GAME_SCREEN )
{
gfEnteringMapScreen = TRUE;
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
return;
}
fMapScreenBottomDirty = TRUE;
ChangeSelectedMapSector( gubPBSectorX, gubPBSectorY, gubPBSectorZ );
// Headrock: Added FALSE argument, We might need TRUE but not sure. Will need to initiate battle :)
RenderMapScreenInterfaceBottom( FALSE );
if( !fShowTeamFlag )
{
ToggleShowTeamsMode();