]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/world.cpp
aggression
[blobs.git] / src / world / world.cpp
index 2f0d130312916bd6a289ae9bcc2ca50c7f9cce2b..1758c5e431ea4ebfb862dde58b4290408b5dd0e5 100644 (file)
@@ -208,11 +208,12 @@ void Body::CheckCollision() noexcept {
                }
        }
        for (auto &c : collisions) {
+               c.A().OnCollide(c.B());
+               c.B().OnCollide(c.A());
                c.A().GetSituation().Move(c.Normal() * (c.Depth() * -0.5));
                c.B().GetSituation().Move(c.Normal() * (c.Depth() * 0.5));
                c.A().GetSituation().Accelerate(c.Normal() * -glm::dot(c.Normal(), c.AVel()));
                c.B().GetSituation().Accelerate(c.Normal() * -glm::dot(c.Normal(), c.BVel()));
-               // TODO: notify participants so they can be annoyed
        }
 }