diff --git a/Client/core/CSettings.cpp b/Client/core/CSettings.cpp index db026c8195..6792bac450 100644 --- a/Client/core/CSettings.cpp +++ b/Client/core/CSettings.cpp @@ -1653,8 +1653,7 @@ void CSettings::UpdateVideoTab() // Player map image CVARS_GET("mapimage", iVar); - if (iVar == 0 || iVar == 1) - m_pPlayerMapImageCombo->SetSelectedItemByIndex(iVar); + m_pPlayerMapImageCombo->SetSelectedItemByIndex(iVar); } // diff --git a/Client/mods/deathmatch/logic/CPlayerMap.cpp b/Client/mods/deathmatch/logic/CPlayerMap.cpp index 8ce800f96a..66678246bd 100644 --- a/Client/mods/deathmatch/logic/CPlayerMap.cpp +++ b/Client/mods/deathmatch/logic/CPlayerMap.cpp @@ -122,18 +122,11 @@ CPlayerMap::~CPlayerMap() void CPlayerMap::SetMapImage(std::size_t imageIndex) { - std::uint32_t width, height; - if (imageIndex < MAP_IMAGE_SIZES.size()) - width = height = MAP_IMAGE_SIZES[imageIndex]; - else // Fail safe, ideally client settings system should not allow this case - width = height = MAP_IMAGE_SIZES[0]; - - SString fileName("MTA\\cgui\\images\\map_%d.png", width); + std::uint32_t mapSize = MAP_IMAGE_SIZES[imageIndex]; + SString fileName("MTA\\cgui\\images\\map_%d.png", mapSize); SAFE_RELEASE(m_mapImageTexture); - m_mapImageTexture = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(CalcMTASAPath(fileName), nullptr, false, width, height, RFORMAT_DXT1); - - g_pCore->GetConsole()->Printf("Player map image loaded: %s", fileName); + m_mapImageTexture = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(CalcMTASAPath(fileName), nullptr, false, mapSize, mapSize, RFORMAT_DXT1); } void CPlayerMap::DoPulse()