sf::ConvexShape was not updated when SetPointsCount or SetPoint was called

This commit is contained in:
Laurent Gomila 2011-12-03 14:24:26 +01:00
parent eeff685255
commit 6034b80ddf

View File

@ -45,6 +45,7 @@ ConvexShape::ConvexShape()
void ConvexShape::SetPointsCount(unsigned int count) void ConvexShape::SetPointsCount(unsigned int count)
{ {
myPoints.resize(count); myPoints.resize(count);
Update();
} }
@ -59,6 +60,7 @@ unsigned int ConvexShape::GetPointsCount() const
void ConvexShape::SetPoint(unsigned int index, const Vector2f& point) void ConvexShape::SetPoint(unsigned int index, const Vector2f& point)
{ {
myPoints[index] = point; myPoints[index] = point;
Update();
} }