--- a/QTfrontend/ui/widget/gamecfgwidget.cpp Sun Feb 23 19:15:39 2014 +0100
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Sun Feb 23 13:50:58 2014 -0500
@@ -445,8 +445,8 @@
}
if (param == "SCRIPT")
{
- pMapContainer->setScript(value);
Scripts->setCurrentIndex(Scripts->findText(value));
+ pMapContainer->setScript(Scripts->itemData(Scripts->currentIndex(), GameStyleModel::ScriptRole).toString().toUtf8());
return;
}
if (param == "DRAWNMAP")
@@ -652,6 +652,7 @@
else
{
pMapContainer->setScript(name);
+ pMapContainer->setScript(Scripts->itemData(index, GameStyleModel::ScriptRole).toString().toUtf8());
}
emit paramChanged("SCRIPT", QStringList(name));
}
--- a/share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua Sun Feb 23 19:15:39 2014 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua Sun Feb 23 13:50:58 2014 -0500
@@ -22,6 +22,9 @@
end
end
+function onPreviewInit()
+onGameInit()
+end
function onGameInit()
MapGen = 2