summaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-06-14 12:04:46 +0000
committerRealBadAngel <mk@realbadangel.pl>2013-07-20 20:43:11 +0200
commit8cae65978611476d0da215acf61819a905c68267 (patch)
tree2fec7ef03de8946149c8d118b49ca472e0d048a6 /src/content_cao.cpp
parent413f0d0353d49d7baed32540d73cbec99e35658a (diff)
downloadminetest-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/content_cao.cpp')
-rw-r--r--src/content_cao.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index 7c7699242..925855288 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -661,6 +661,10 @@ public:
return false;
}
+ bool collideWithObjects() {
+ return m_prop.collideWithObjects;
+ }
+
void initialize(const std::string &data)
{
infostream<<"GenericCAO: Got init data"<<std::endl;
@@ -1152,7 +1156,8 @@ public:
v3f p_acceleration = m_acceleration;
moveresult = collisionMoveSimple(env,env->getGameDef(),
pos_max_d, box, stepheight, dtime,
- p_pos, p_velocity, p_acceleration,this);
+ p_pos, p_velocity, p_acceleration,
+ this, m_prop.collideWithObjects);
// Apply results
m_position = p_pos;
m_velocity = p_velocity;