Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created February 17, 2015 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahrl/046fe79cb014b26bc6db to your computer and use it in GitHub Desktop.
Save kahrl/046fe79cb014b26bc6db to your computer and use it in GitHub Desktop.
diff --git a/src/environment.cpp b/src/environment.cpp
index 166523a..56e7f5b 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -1698,6 +1698,9 @@ void ServerEnvironment::activateObjects(MapBlock *block, u32 dtime_s)
/*infostream<<"Server: Creating an active object from "
<<"static data"<<std::endl;*/
StaticObject &s_obj = *i;
+ // Ignore objects of obsolete types (e.g. mobs from 0.3 era)
+ if (ServerActiveObject::isObsoleteType((ActiveObjectType) s_obj.type))
+ continue;
// Create an active object from the data
ServerActiveObject *obj = ServerActiveObject::create
((ActiveObjectType) s_obj.type, this, 0, s_obj.pos, s_obj.data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment