diff options
author | Novatux <nathanael.courant@laposte.net> | 2015-02-17 15:01:54 +0100 |
---|---|---|
committer | Novatux <nathanael.courant@laposte.net> | 2015-02-17 15:07:05 +0100 |
commit | 24315db6ef90125c3c62327f2ace654b548811ac (patch) | |
tree | 0aecaefd95d13b0cec9fe1df912ec9a46af1d2c5 | |
parent | 54487b3e70f01dc025816c87bbdbb511fb510719 (diff) | |
download | minetest-24315db6ef90125c3c62327f2ace654b548811ac.tar.gz minetest-24315db6ef90125c3c62327f2ace654b548811ac.tar.bz2 minetest-24315db6ef90125c3c62327f2ace654b548811ac.zip |
Ignore old entities from 0.3.
-rw-r--r-- | src/activeobject.h | 3 | ||||
-rw-r--r-- | src/serverobject.cpp | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/activeobject.h b/src/activeobject.h index 76893280a..48f078d3f 100644 --- a/src/activeobject.h +++ b/src/activeobject.h @@ -26,12 +26,13 @@ with this program; if not, write to the Free Software Foundation, Inc., enum ActiveObjectType { ACTIVEOBJECT_TYPE_INVALID = 0, ACTIVEOBJECT_TYPE_TEST = 1, +// Deprecated stuff ACTIVEOBJECT_TYPE_ITEM = 2, - // Compat layer, migrating objects from 0.3 to 0.4+ ACTIVEOBJECT_TYPE_RAT = 3, ACTIVEOBJECT_TYPE_OERKKI1 = 4, ACTIVEOBJECT_TYPE_FIREFLY = 5, ACTIVEOBJECT_TYPE_MOBV2 = 6, +// End deprecated stuff ACTIVEOBJECT_TYPE_LUAENTITY = 7, // Special type, not stored as a static object ACTIVEOBJECT_TYPE_PLAYER = 100, diff --git a/src/serverobject.cpp b/src/serverobject.cpp index 98d82550f..9cf817859 100644 --- a/src/serverobject.cpp +++ b/src/serverobject.cpp @@ -46,6 +46,11 @@ ServerActiveObject* ServerActiveObject::create(ActiveObjectType type, std::map<u16, Factory>::iterator n; n = m_types.find(type); if(n == m_types.end()) { + // These are 0.3 entity types, return without error. + if (ACTIVEOBJECT_TYPE_ITEM <= type && type <= ACTIVEOBJECT_TYPE_MOBV2) { + return NULL; + } + // If factory is not found, just return. dstream<<"WARNING: ServerActiveObject: No factory for type=" <<type<<std::endl; |