From b3f3d16f1364c1d9146f26384c92554cbc3d6d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Mon, 16 Oct 2017 11:57:23 +0200 Subject: [PATCH] Physics2D: Fix DebugDraw of polygons --- src/Nazara/Physics2D/PhysWorld2D.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Nazara/Physics2D/PhysWorld2D.cpp b/src/Nazara/Physics2D/PhysWorld2D.cpp index b880de113..67e1f479a 100644 --- a/src/Nazara/Physics2D/PhysWorld2D.cpp +++ b/src/Nazara/Physics2D/PhysWorld2D.cpp @@ -44,11 +44,11 @@ namespace Nz { //TODO: constexpr if to prevent copy/cast if sizeof(cpVect) == sizeof(Vector2f) - StackArray vertices = NazaraStackAllocation(Vector2f, vertexCount); + StackArray nVertices = NazaraStackAllocation(Vector2f, vertexCount); for (int i = 0; i < vertexCount; ++i) - vertices[i].Set(float(vertices[i].x), float(vertices[i].y)); + nVertices[i].Set(float(vertices[i].x), float(vertices[i].y)); - drawOptions->polygonCallback(vertices.data(), vertexCount, float(radius), CpDebugColorToColor(outlineColor), CpDebugColorToColor(fillColor), drawOptions->userdata); + drawOptions->polygonCallback(nVertices.data(), vertexCount, float(radius), CpDebugColorToColor(outlineColor), CpDebugColorToColor(fillColor), drawOptions->userdata); } };