Skip to content

Commit

Permalink
put this fix here
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtleP committed Dec 24, 2022
1 parent a52d821 commit ddaa346
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/objects/box2d/fixture/wrap_fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
#include "body.h"
#include "shape.h"

#include "chainshape/chainshape.h"
#include "circleshape/circleshape.h"
#include "edgeshape/edgeshape.h"
#include "polygonshape/polygonshape.h"

using namespace love;

Fixture* Wrap_Fixture::CheckFixture(lua_State* L, int index)
Expand Down Expand Up @@ -126,13 +131,25 @@ int Wrap_Fixture::GetShape(lua_State* L)
switch (shape->GetType())
{
case Shape::SHAPE_EDGE:
{
Luax::PushType(L, (EdgeShape*)shape);
break;
}
case Shape::SHAPE_CHAIN:
{
Luax::PushType(L, (ChainShape*)shape);
break;
}
case Shape::SHAPE_CIRCLE:
{
Luax::PushType(L, (CircleShape*)shape);
break;
}
case Shape::SHAPE_POLYGON:
{
Luax::PushType(L, (PolygonShape*)shape);
break;
}
default:
Luax::PushType(L, shape);
}
Expand Down

0 comments on commit ddaa346

Please sign in to comment.