Skip to content

Commit

Permalink
Remove remenants of mob code
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
neoascetic authored and ShadowNinja committed Oct 24, 2014
1 parent 737cce5 commit 73bf791
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions minetest.conf.example
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/defaultsettings.cpp
Expand Up @@ -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", "");
Expand Down
5 changes: 0 additions & 5 deletions src/environment.cpp
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/serverobject.h
Expand Up @@ -97,8 +97,6 @@ class ServerActiveObject : public ActiveObject
// 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";}

Expand Down

0 comments on commit 73bf791

Please sign in to comment.