summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-10 03:40:00 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-10 03:40:00 +0300
commit84039ef9fff93cd783a6ec92daf1eac1af89577a (patch)
treed349cf365c57f0c381d62c33293b7f9ae98ddd15 /src
parent2571df79499e89a1c3d70f4241871c7063d89df3 (diff)
downloadmanaverse-84039ef9fff93cd783a6ec92daf1eac1af89577a.tar.gz
manaverse-84039ef9fff93cd783a6ec92daf1eac1af89577a.tar.bz2
manaverse-84039ef9fff93cd783a6ec92daf1eac1af89577a.tar.xz
manaverse-84039ef9fff93cd783a6ec92daf1eac1af89577a.zip
Fix minimaps loading if minimap missing in tmx file.
Diffstat (limited to 'src')
-rw-r--r--src/gui/minimap.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index f155faaea..e86fac09a 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -152,7 +152,7 @@ void Minimap::setMap(const Map *const map)
else
{
std::string tempname = paths.getStringValue("minimaps")
- + "graphics/minimaps/" + map->getFilename() + ".png";
+ + map->getFilename() + ".png";
ResourceManager *const resman = ResourceManager::getInstance();
minimapName = map->getProperty("minimap");
@@ -160,6 +160,13 @@ void Minimap::setMap(const Map *const map)
if (minimapName.empty() && resman->exists(tempname))
minimapName = tempname;
+ if (minimapName.empty())
+ {
+ tempname = "graphics/minimaps/" + map->getFilename() + ".png";
+ if (resman->exists(tempname))
+ minimapName = tempname;
+ }
+
mMapImage = resman->getImage(minimapName);
mCustomMapImage = false;
}