Blob Blame History Raw
Index: include/mpakogre.h
===================================================================
--- include/mpakogre.h.orig
+++ include/mpakogre.h
@@ -56,6 +56,18 @@ public:
 	FileInfoListPtr findFileInfo(const String &pattern, bool recursive, bool dirs = false);
 
 	bool exists(const String &filename);
+
+	time_t getModifiedTime(const String& filename)
+	{
+		struct stat tagStat;
+		bool ret = (stat(filename.c_str(), &tagStat) == 0);
+		if (ret) {
+			return tagStat.st_mtime;
+		}
+		else {
+			return 0;
+		}
+	}
 };
 
 
Index: src/scriptsystem.cpp
===================================================================
--- src/scriptsystem.cpp.orig
+++ src/scriptsystem.cpp
@@ -137,7 +137,6 @@ static int CreateAsteroid(lua_State *L)
 	Asteroid *roid = new Asteroid(String(name), ScriptSystem::getSingleton().getSceneMgr(), String(mesh), String(mat), pos);
 	roid->setScale(scale, scale, scale);
 	roid->setMass(scale * 10.0f);
-	roid->getEntity()->setNormaliseNormals(true);
 	return 0;
 }
 
@@ -435,6 +434,7 @@
 ScriptSystem::ScriptSystem(SceneManager *mgr, const char *startup_file) {
 	assert(mgr);
 	mSceneMgr = mgr;
+	mgr->setNormaliseNormalsOnScale(true);
 	scriptLights.clear();
 
 	LogManager::getSingleton().logMessage("Using " + String(LUA_VERSION));