aboutsummaryrefslogtreecommitdiff
path: root/src/collision.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/collision.cpp')
-rw-r--r--src/collision.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/collision.cpp b/src/collision.cpp
index cd170196f..673966b6e 100644
--- a/src/collision.cpp
+++ b/src/collision.cpp
@@ -192,7 +192,7 @@ bool wouldCollideWithCeiling(
collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
f32 pos_max_d, const aabb3f &box_0,
f32 stepheight, f32 dtime,
- v3f &pos_f, v3f &speed_f, v3f &accel_f)
+ v3f &pos_f, v3f &speed_f, v3f &accel_f,ActiveObject* self)
{
Map *map = &env->getMap();
//TimeTaker tt("collisionMoveSimple");
@@ -300,7 +300,9 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
c_env->getActiveObjects(pos_f,distance * 1.5,clientobjects);
for (int i=0; i < clientobjects.size(); i++)
{
- objects.push_back((ActiveObject*)clientobjects[i].obj);
+ if ((self == 0) || (self != clientobjects[i].obj)) {
+ objects.push_back((ActiveObject*)clientobjects[i].obj);
+ }
}
}
else
@@ -314,7 +316,9 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
for (std::set<u16>::iterator iter = s_objects.begin(); iter != s_objects.end(); iter++)
{
ServerActiveObject *current = s_env->getActiveObject(*iter);
- objects.push_back((ActiveObject*)current);
+ if ((self == 0) || (self != current)) {
+ objects.push_back((ActiveObject*)current);
+ }
}
}
}
@@ -458,8 +462,9 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
if (is_object[nearest_boxindex]) {
info.type = COLLISION_OBJECT;
}
- else
+ else {
info.type = COLLISION_NODE;
+ }
info.node_p = node_positions[nearest_boxindex];
info.bouncy = bouncy;
info.old_speed = speed_f;