Updated Box2D to 2.3.2-git.

This commit is contained in:
Alex Szpakowski
2015-11-30 23:55:50 -04:00
parent 5bdd858487
commit 0474f8167a
12 changed files with 87 additions and 51 deletions
@@ -22,6 +22,11 @@
#include <string.h>
b2ChainShape::~b2ChainShape()
{
Clear();
}
void b2ChainShape::Clear()
{
b2Free(m_vertices);
m_vertices = NULL;
@@ -56,10 +61,8 @@ void b2ChainShape::CreateChain(const b2Vec2* vertices, int32 count)
b2Assert(count >= 2);
for (int32 i = 1; i < count; ++i)
{
b2Vec2 v1 = vertices[i-1];
b2Vec2 v2 = vertices[i];
// If the code crashes here, it means your vertices are too close together.
b2Assert(b2DistanceSquared(v1, v2) > b2_linearSlop * b2_linearSlop);
b2Assert(b2DistanceSquared(vertices[i-1], vertices[i]) > b2_linearSlop * b2_linearSlop);
}
m_count = count;