]> git.lizzy.rs Git - minetest.git/blobdiff - src/environment.cpp
Initially add small and tight logging facility
[minetest.git] / src / environment.cpp
index 28a2ff339ccf63072a4d2517117cbcb64a4abc91..f6b9b0a22c8fa36aa7a541d2c405fc4993b61a3a 100644 (file)
@@ -647,7 +647,7 @@ static void getMob_dungeon_master(Settings &properties)
 {
        properties.set("looks", "dungeon_master");
        properties.setFloat("yaw", 1.57);
-       properties.setFloat("hp", 20);
+       properties.setFloat("hp", 30);
        properties.setBool("bright_shooting", true);
        properties.set("shoot_type", "fireball");
        properties.set("shoot_y", "0.7");
@@ -1039,6 +1039,11 @@ void ServerEnvironment::step(float dtime)
                                i.atEnd()==false; i++)
                {
                        ServerActiveObject* obj = i.getNode()->getValue();
+                       // Remove non-peaceful mobs on peaceful mode
+                       if(g_settings->getBool("only_peaceful_mobs")){
+                               if(!obj->isPeaceful())
+                                       obj->m_removed = true;
+                       }
                        // Don't step if is to be removed or stored statically
                        if(obj->m_removed || obj->m_pending_deactivation)
                                continue;