aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorFoghrye4 <foghrye4@gmail.com>2016-10-08 16:51:25 +0400
committerNer'zhul <nerzhul@users.noreply.github.com>2016-10-08 14:51:25 +0200
commitad163ee5c3f7d6ca31e0add052fb76466a9bfcc8 (patch)
tree6eebdb83bb210f4f57caa4a0f57189d95666d9c2 /src/script/lua_api
parent9978d0796fa61eabb235d715a56ad6e5396d2e1e (diff)
downloadminetest-ad163ee5c3f7d6ca31e0add052fb76466a9bfcc8.tar.gz
minetest-ad163ee5c3f7d6ca31e0add052fb76466a9bfcc8.tar.bz2
minetest-ad163ee5c3f7d6ca31e0add052fb76466a9bfcc8.zip
Prevent attached models from disappearing during parent reload (#4128)
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 4e1a1c159..34e175ad0 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -137,8 +137,8 @@ int ObjectRef::l_remove(lua_State *L)
if (co->getType() == ACTIVEOBJECT_TYPE_PLAYER)
return 0;
- std::set<int> child_ids = co->getAttachmentChildIds();
- std::set<int>::iterator it;
+ UNORDERED_SET<int> child_ids = co->getAttachmentChildIds();
+ UNORDERED_SET<int>::iterator it;
for (it = child_ids.begin(); it != child_ids.end(); ++it) {
ServerActiveObject *child = env->getActiveObject(*it);
child->setAttachment(0, "", v3f(0, 0, 0), v3f(0, 0, 0));