summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2014-02-02 01:51:14 +0100
committererihel <erihel@gmail.com>2014-02-02 01:51:14 +0100
commit93582536ded303f4c9c358ef9967deb07d638e54 (patch)
tree2ba781604f31af20b20fc43fa647491d4c82de32 /src/object
parentd84d38280b3ed706ff2371fc88e43a2a7245d3dd (diff)
parent70b18cc4c05398cd06558f4634937a70c2436546 (diff)
downloadcolobot-93582536ded303f4c9c358ef9967deb07d638e54.tar.gz
colobot-93582536ded303f4c9c358ef9967deb07d638e54.tar.bz2
colobot-93582536ded303f4c9c358ef9967deb07d638e54.zip
Merge branch 'dev' of github:colobot/colobot into dev
Diffstat (limited to 'src/object')
-rw-r--r--src/object/robotmain.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index ced1127..b1cbe52 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -81,6 +81,9 @@
#include <iomanip>
+#include <boost/regex.hpp>
+
+
template<> CRobotMain* CSingleton<CRobotMain>::m_instance = nullptr;
@@ -4050,9 +4053,14 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
continue;
}
- if (Cmd(line, "Title")) continue; // Ignore
- if (Cmd(line, "Resume")) continue; // Ignore
- if (Cmd(line, "ScriptName")) continue; // Ignore
+ static const boost::regex titleCmdRe("Title\\.[A-Z]");
+ static const boost::regex resumeCmdRe("Resume\\.[A-Z]");
+ static const boost::regex scriptNameCmdRe("ScriptName\.[A-Z]");
+
+ if (boost::regex_match(GetCmd(line), titleCmdRe)) continue; // Ignore
+ if (boost::regex_match(GetCmd(line), resumeCmdRe)) continue; // Ignore
+ if (boost::regex_match(GetCmd(line), scriptNameCmdRe)) continue; // Ignore
+
if (Cmd(line, "ScriptFile") && !resetObject)
{