mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: crash due to missing image
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7845 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "WCheck.h"
|
||||
#include "Vehicles.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Utilities.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#define LIFE_BAR_SHADOW FROMRGB( 108, 12, 12 )
|
||||
@@ -309,6 +310,18 @@ void DrawBreathUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 s
|
||||
// brown guy
|
||||
GetVideoObject( &hHandle, guiBrownBackgroundForTeamPanel );
|
||||
|
||||
// Flugente: for some reason, the image has sometimes been deleted. In that case, try again
|
||||
if ( !hHandle )
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP( "INTERFACE\\Bars.sti", VObjectDesc.ImageFile );
|
||||
CHECKV( AddVideoObject( &VObjectDesc, &guiBrownBackgroundForTeamPanel ) );
|
||||
|
||||
// brown guy
|
||||
GetVideoObject( &hHandle, guiBrownBackgroundForTeamPanel );
|
||||
}
|
||||
|
||||
// DO MAX BREATH
|
||||
if( guiCurrentScreen != MAP_SCREEN )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user