diff options
author | paramat <paramat@users.noreply.github.com> | 2018-02-24 15:57:34 +0000 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-06-03 17:32:00 +0200 |
commit | 79fde0dd52bbdeb705576a285c0da2519f948eb7 (patch) | |
tree | cc5a542b4cc59e4669436dd7feeb3c1d9454e638 /src | |
parent | 8aaf526730a621ae6d8d2839730437b605d892e7 (diff) | |
download | minetest-79fde0dd52bbdeb705576a285c0da2519f948eb7.tar.gz minetest-79fde0dd52bbdeb705576a285c0da2519f948eb7.tar.bz2 minetest-79fde0dd52bbdeb705576a285c0da2519f948eb7.zip |
CollisionMoveSimple: Collide with 'ignore' nodes
Diffstat (limited to 'src')
-rw-r--r-- | src/collision.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/collision.cpp b/src/collision.cpp index 4c3bd016d..8faf05f54 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -283,7 +283,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, bool is_position_valid; MapNode n = map->getNodeNoEx(p, &is_position_valid); - if (is_position_valid) { + if (is_position_valid && n.getContent() != CONTENT_IGNORE) { // Object collides into walkable nodes any_position_valid = true; @@ -333,7 +333,8 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, false, n_bouncy_value, p, box)); } } else { - // Collide with unloaded nodes + // Collide with unloaded nodes (position invalid) and loaded + // CONTENT_IGNORE nodes (position valid) aabb3f box = getNodeBox(p, BS); cinfo.push_back(NearbyCollisionInfo(true, false, 0, p, box)); } @@ -341,6 +342,8 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, // Do not move if world has not loaded yet, since custom node boxes // are not available for collision detection. + // This also intentionally occurs in the case of the object being positioned + // solely on loaded CONTENT_IGNORE nodes, no matter where they come from. if (!any_position_valid) { *speed_f = v3f(0, 0, 0); return result; |