aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Puchkin <i@neoascetic.me>2014-10-23 22:17:47 +0300
committerShadowNinja <shadowninja@minetest.net>2014-10-23 20:54:33 -0400
commit73bf791fe12d4214d29b6b872940ede634651ce8 (patch)
tree1c68478f2b5aec6257a44138e693e0ae6b36541a
parent737cce5f2b8409ec7cc9b73b9cf4b6d572b54e63 (diff)
downloadminetest-73bf791fe12d4214d29b6b872940ede634651ce8.tar.gz
minetest-73bf791fe12d4214d29b6b872940ede634651ce8.tar.bz2
minetest-73bf791fe12d4214d29b6b872940ede634651ce8.zip
Remove remenants of mob code
Since minetest has no mobs within the core anymore, I suppose these settings and code should go. Any mod that uses `minetest.setting_getbool` will work with no problem since the default return value is `false`.
-rw-r--r--minetest.conf.example2
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/environment.cpp5
-rw-r--r--src/serverobject.h2
4 files changed, 0 insertions, 10 deletions
diff --git a/minetest.conf.example b/minetest.conf.example
index 3e7689c76..2ceb0a142 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -283,8 +283,6 @@
#creative_mode = false
# Enable players getting damage and dying
#enable_damage = false
-# Despawn all non-peaceful mobs
-#only_peaceful_mobs = false
# A chosen map seed for a new map, leave empty for random
#fixed_map_seed =
# Gives some stuff to players at the beginning
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index dc4a59be3..2d6851c2c 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -197,7 +197,6 @@ void set_default_settings(Settings *settings)
settings->setDefault("strict_protocol_version_checking", "false");
settings->setDefault("creative_mode", "false");
settings->setDefault("enable_damage", "true");
- settings->setDefault("only_peaceful_mobs", "false");
settings->setDefault("fixed_map_seed", "");
settings->setDefault("give_initial_stuff", "false");
settings->setDefault("default_password", "");
diff --git a/src/environment.cpp b/src/environment.cpp
index 8977ee673..64c998671 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -1225,11 +1225,6 @@ void ServerEnvironment::step(float dtime)
i != m_active_objects.end(); ++i)
{
ServerActiveObject* obj = i->second;
- // 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;
diff --git a/src/serverobject.h b/src/serverobject.h
index 13a075a25..b57d3a2ba 100644
--- a/src/serverobject.h
+++ b/src/serverobject.h
@@ -97,8 +97,6 @@ public:
// If object has moved less than this and data has not changed,
// saving to disk may be omitted
virtual float getMinimumSavedMovement();
-
- virtual bool isPeaceful(){return true;}
virtual std::string getDescription(){return "SAO";}