Mantis: 1066

o Correctly load the minimap on map change.


git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@267 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2005-07-13 21:54:40 +00:00
parent f0bcdd7a9f
commit 081a8e0ec3

View file

@ -420,17 +420,17 @@ void AvHOverviewMap::DrawMiniMap(const DrawInfo& inDrawInfo)
// Use labelled minimaps if cl_labelmaps is 1 // Use labelled minimaps if cl_labelmaps is 1
// Load the mini-map sprite if it's not already loaded. // Load the mini-map sprite if it's not already loaded.
static string lastMiniMapName="";
if ( mMapName != "") { if ( mMapName != "") {
int drawLabels=CVAR_GET_FLOAT(kvLabelMaps); int drawLabels=CVAR_GET_FLOAT(kvLabelMaps);
string theMiniMapName = AvHMiniMap::GetSpriteNameFromMap(ScreenWidth(), mMapName, drawLabels); string theMiniMapName = AvHMiniMap::GetSpriteNameFromMap(ScreenWidth(), mMapName, drawLabels);
if ( lastMiniMapName != theMiniMapName ) if ( mLastMinimapName != theMiniMapName )
{ {
mMiniMapSprite = Safe_SPR_Load(theMiniMapName.c_str()); mMiniMapSprite = Safe_SPR_Load(theMiniMapName.c_str());
// We want to preserve the last minimap even if we fail. There's no point in failing again until the player // We want to preserve the last minimap even if we fail. There's no point in failing again until the player
// changes the value of the cvar. // changes the value of the cvar.
lastMiniMapName=theMiniMapName; mLastMinimapName=theMiniMapName;
// Draw normal minimap if no labelled map exists ( for custom maps ) // Draw normal minimap if no labelled map exists ( for custom maps )
if ( !mMiniMapSprite && drawLabels ) { if ( !mMiniMapSprite && drawLabels ) {