diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-03 12:28:55 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-03 12:28:55 +0300 |
commit | e4f7f97e6c79cda72dec7cd6fea5b85328b75894 (patch) | |
tree | fabb8e2c981e4052802d31787ea376fefd415267 /src/environment.cpp | |
parent | ee89e29ae10d58a2a3d00641f4e459600a49e09e (diff) | |
download | minetest-e4f7f97e6c79cda72dec7cd6fea5b85328b75894.tar.gz minetest-e4f7f97e6c79cda72dec7cd6fea5b85328b75894.tar.bz2 minetest-e4f7f97e6c79cda72dec7cd6fea5b85328b75894.zip |
Removed lua stuff
Diffstat (limited to 'src/environment.cpp')
-rw-r--r-- | src/environment.cpp | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index 7f3687c3c..8d9af480d 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -484,9 +484,6 @@ void ServerEnvironment::step(float dtime) { m_random_spawn_timer += myrand_range(2.0, 20.0); - /*TestSAO *obj = new TestSAO(0, - v3f(myrand_range(-2*BS,2*BS), BS*5, myrand_range(-2*BS,2*BS)));*/ - /* Find some position */ @@ -506,34 +503,14 @@ void ServerEnvironment::step(float dtime) ); /* - Create a LuaSAO (ServerActiveObject) - */ - - LuaSAO *obj = new LuaSAO(this, 0, pos); - - /* - Select a random type for it + Create a TestSAO object */ - std::string objectdir = porting::getDataPath("scripts/objects"); - std::vector<fs::DirListNode> dirlist = fs::GetDirListing(objectdir); - if(dirlist.size() > 0) - { - u32 selected_i = myrand_range(0, dirlist.size()-1); - std::string selected_name = ""; - selected_name = dirlist[selected_i].name; - /*for(u32 i=0; i<dirlist.size(); i++)*/ - - dstream<<"ServerEnvironment: Selected script name \""<<selected_name - <<"\" for new lua object"<<std::endl; - /* - Load the scripts for the type - */ - obj->initializeFromNothing(selected_name.c_str()); + TestSAO *obj = new TestSAO(this, 0, + v3f(myrand_range(-2*BS,2*BS), BS*5, myrand_range(-2*BS,2*BS))); - // Add the object to the environment - addActiveObject(obj); - } + // Add the object to the environment + addActiveObject(obj); } } // enable_experimental |