mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Updated Box2D to 2.3.2-git.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user