QTfrontend/gamecfgwidget.cpp
changeset 2999 30c4d62cd0c3
parent 2948 3f21a9dc93d0
child 3008 e57cafce4227
--- a/QTfrontend/gamecfgwidget.cpp	Mon Mar 15 02:23:40 2010 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Mon Mar 15 11:53:32 2010 +0000
@@ -158,7 +158,15 @@
 
     QString currentMap = pMapContainer->getCurrentMap();
     if (currentMap.size() > 0)
+    {
         sl.append("emap " + currentMap);
+        QFile mapLuaFile(
+                QString("%1/Maps/%2/map.lua")
+                .arg(datadir->absolutePath())
+                .arg(currentMap));
+        if(mapLuaFile.exists())
+            sl.append(QString("escript %1").arg(mapLuaFile.fileName()));
+    }
     sl.append("etheme " + pMapContainer->getCurrentTheme());
     return sl;
 }