1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Add an option to disable object <-> object collision for Lua entities

This commit is contained in:
PilzAdam 2013-06-14 12:04:46 +00:00 committed by RealBadAngel
parent 413f0d0353
commit 8cae659786
14 changed files with 50 additions and 5 deletions

View file

@ -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;