]> Dogcows Code - chaz/yoink/blobdiff - src/Animation.cc
fixed some resource management bugs
[chaz/yoink] / src / Animation.cc
index 503f77a47c2eecf21a24a2986d082061358af829..fead5cab1697f67682d5df9546f14f7308356779 100644 (file)
@@ -137,12 +137,12 @@ public:
                void init(const std::string& name)
                {
                        moof::script script;
-                       std::string path(name);
+                       std::string path = moof::resource::find_file("animations/"+name, "lua");
                        
-                       if (!resource::find(path))
-                       {
-                               throw std::runtime_error("cannot find resource " + name);
-                       }
+                       //if (!resource::find(path))
+                       //{
+                               //throw std::runtime_error("cannot find resource " + name);
+                       //}
 
                        script.import_base_library();
                        moof::log::import(script);
@@ -214,7 +214,6 @@ public:
                std::map<std::string,Data::Sequence>::iterator it;
 
                it = mData->mSequences.find(name);
-
                if (it != mData->mSequences.end())
                {
                        mCurrentSequence = &(*it).second;
This page took 0.018136 seconds and 4 git commands to generate.