mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fix Fixture:getShape(), for real this time.
All the Memoizer stuff was pointless: when you create a Fixture, it clones the b2Shape, so there was never going to be a memoized Shape to find. And cloning the Shape is incorrect as well, since you should able to modify the Shape retrieved through getShape and have it affect the Fixture. Everything's much simpler now.
This commit is contained in:
@@ -33,16 +33,13 @@ namespace physics
|
||||
{
|
||||
namespace box2d
|
||||
{
|
||||
ChainShape::ChainShape(b2ChainShape * c, bool loop)
|
||||
: Shape(c), loop(loop)
|
||||
ChainShape::ChainShape(b2ChainShape * c, bool loop, bool own)
|
||||
: Shape(c, own), loop(loop)
|
||||
{
|
||||
}
|
||||
|
||||
ChainShape::~ChainShape()
|
||||
{
|
||||
Memoizer::remove(shape);
|
||||
delete shape;
|
||||
shape = NULL;
|
||||
}
|
||||
|
||||
void ChainShape::setNextVertex(float x, float y)
|
||||
|
||||
Reference in New Issue
Block a user