diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-06-14 12:04:46 +0000 |
---|---|---|
committer | RealBadAngel <mk@realbadangel.pl> | 2013-07-20 20:43:11 +0200 |
commit | 8cae65978611476d0da215acf61819a905c68267 (patch) | |
tree | 2fec7ef03de8946149c8d118b49ca472e0d048a6 /src/script | |
parent | 413f0d0353d49d7baed32540d73cbec99e35658a (diff) | |
download | minetest-8cae65978611476d0da215acf61819a905c68267.tar.gz minetest-8cae65978611476d0da215acf61819a905c68267.tar.bz2 minetest-8cae65978611476d0da215acf61819a905c68267.zip |
Add an option to disable object <-> object collision for Lua entities
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/common/c_content.cpp | 1 | ||||
-rw-r--r-- | src/script/cpp_api/s_entity.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 7d18454fd..dcffabb8b 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -123,6 +123,7 @@ void read_object_properties(lua_State *L, int index, prop->hp_max = getintfield_default(L, -1, "hp_max", 10); getboolfield(L, -1, "physical", prop->physical); + getboolfield(L, -1, "collide_with_objects", prop->collideWithObjects); getfloatfield(L, -1, "weight", prop->weight); diff --git a/src/script/cpp_api/s_entity.cpp b/src/script/cpp_api/s_entity.cpp index 2a5a6066d..c494e8232 100644 --- a/src/script/cpp_api/s_entity.cpp +++ b/src/script/cpp_api/s_entity.cpp @@ -169,6 +169,7 @@ void ScriptApiEntity::luaentity_GetProperties(u16 id, prop->hp_max = getintfield_default(L, -1, "hp_max", 10); getboolfield(L, -1, "physical", prop->physical); + getboolfield(L, -1, "collide_with_objects", prop->collideWithObjects); getfloatfield(L, -1, "weight", prop->weight); |