mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:43:31 +02:00
Fixing warnings and out-of-range index.
This commit is contained in:
parent
343998a4a8
commit
e22e022252
1 changed files with 1 additions and 2 deletions
|
@ -273,7 +273,6 @@ bool capsuleCapsule(const CapsuleShape* capsuleA, const CapsuleShape* capsuleB,
|
||||||
// capsules are approximiately parallel but might still collide
|
// capsules are approximiately parallel but might still collide
|
||||||
glm::vec3 BA = centerB - centerA;
|
glm::vec3 BA = centerB - centerA;
|
||||||
float axialDistance = glm::dot(BA, axisB);
|
float axialDistance = glm::dot(BA, axisB);
|
||||||
float maxAxialDistance = totalRadius + capsuleA->getHalfHeight() + capsuleB->getHalfHeight();
|
|
||||||
if (axialDistance > totalRadius + capsuleA->getHalfHeight() + capsuleB->getHalfHeight()) {
|
if (axialDistance > totalRadius + capsuleA->getHalfHeight() + capsuleB->getHalfHeight()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -315,7 +314,7 @@ bool capsuleCapsule(const CapsuleShape* capsuleA, const CapsuleShape* capsuleB,
|
||||||
// Since there are only three comparisons to do we unroll the sort algorithm...
|
// Since there are only three comparisons to do we unroll the sort algorithm...
|
||||||
// and use a fifth slot as temp during swap.
|
// and use a fifth slot as temp during swap.
|
||||||
if (points[4] > points[2]) {
|
if (points[4] > points[2]) {
|
||||||
points[5] = points[1];
|
points[4] = points[1];
|
||||||
points[1] = points[2];
|
points[1] = points[2];
|
||||||
points[2] = points[4];
|
points[2] = points[4];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue