X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FCreatureCreatureCollision.hpp;h=0a907952fcc6ed2938243576a96485ac2733972a;hb=HEAD;hp=1a903ec54428b516eb59efe9224001fde2b8cdb5;hpb=f5fc0c2bd1c0d1e2737d2b4ed49c3de16aa67c67;p=blobs.git diff --git a/src/world/CreatureCreatureCollision.hpp b/src/world/CreatureCreatureCollision.hpp index 1a903ec..0a90795 100644 --- a/src/world/CreatureCreatureCollision.hpp +++ b/src/world/CreatureCreatureCollision.hpp @@ -19,7 +19,7 @@ public: const glm::dvec3 &n, double depth ) : a(&a), b(&b), normal(n), depth(depth) { - if (dot(normal, BPos() - APos()) < 0.0) { + if (glm::dot(normal, BPos() - APos()) < 0.0) { // make sure normal always is in direction from A to B normal *= -1.0; } @@ -30,10 +30,12 @@ public: creature::Creature &A() noexcept { return *a; } const creature::Creature &A() const noexcept { return *a; } const glm::dvec3 &APos() const noexcept; + const glm::dvec3 &AVel() const noexcept; creature::Creature &B() noexcept { return *b; } const creature::Creature &B() const noexcept { return *b; } const glm::dvec3 &BPos() const noexcept; + const glm::dvec3 &BVel() const noexcept; const glm::dvec3 &Normal() const noexcept { return normal; } double Depth() const noexcept { return depth; }