X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fworld%2Fworld.cpp;h=1758c5e431ea4ebfb862dde58b4290408b5dd0e5;hp=2f0d130312916bd6a289ae9bcc2ca50c7f9cce2b;hb=cead4f0686af352cdbac1f2c2df9b6a21ad9faec;hpb=7e02b21428efa3ebec14a34d0c1f81e81d362bfc diff --git a/src/world/world.cpp b/src/world/world.cpp index 2f0d130..1758c5e 100644 --- a/src/world/world.cpp +++ b/src/world/world.cpp @@ -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 } }