]> git.localhorst.tv Git - blank.git/blobdiff - src/world/world.cpp
fix iteration in entity/world intersection
[blank.git] / src / world / world.cpp
index d933dc4ec77f86d913d2cd66de5ced6e4a19d65f..920313653ac1104ee91073a2d55df97462e2a4ed 100644 (file)
@@ -179,7 +179,6 @@ EntityDerivative Entity::CalculateStep(
        next.pos.block += delta.position * dt;
        next.velocity += delta.velocity * dt;
        limit(next.velocity, max_vel);
-       world.ResolveWorldCollision(*this, next);
        next.AdjustPosition();
 
        EntityDerivative out;
@@ -841,7 +840,7 @@ bool World::Intersection(const Entity &e, const EntityState &s, std::vector<Worl
        ExactLocation::Coarse end(reference + 2);
 
        bool any = false;
-       for (ExactLocation::Coarse pos(begin); pos.z < end.y; ++pos.z) {
+       for (ExactLocation::Coarse pos(begin); pos.z < end.z; ++pos.z) {
                for (pos.y = begin.y; pos.y < end.y; ++pos.y) {
                        for (pos.x = begin.x; pos.x < end.x; ++pos.x) {
                                Chunk *chunk = chunks.Get(pos);