From 00aa4e3a23d55d090242ecc5e10bcfbdd6328595 Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 9 Nov 2022 22:22:26 -0800 Subject: [PATCH] TerrainShape mass fix; --- src/modules/physics/physics.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/physics/physics.c b/src/modules/physics/physics.c index 7071165a..04eebb6b 100644 --- a/src/modules/physics/physics.c +++ b/src/modules/physics/physics.c @@ -901,6 +901,10 @@ void lovrShapeGetMass(Shape* shape, float density, float* cx, float* cy, float* dMassTranslate(&m, -m.c[0], -m.c[1], -m.c[2]); break; } + + case SHAPE_TERRAIN: { + break; + } } const dReal* position = dGeomGetOffsetPosition(shape->id); @@ -1052,7 +1056,7 @@ MeshShape* lovrMeshShapeCreate(int vertexCount, float* vertices, int indexCount, return mesh; } -TerrainShape* lovrTerrainShapeCreate(float* vertices, int widthSamples, int depthSamples, float horizontalScale, float verticalScale) { +TerrainShape* lovrTerrainShapeCreate(float* vertices, uint32_t widthSamples, uint32_t depthSamples, float horizontalScale, float verticalScale) { const float thickness = 10.f; TerrainShape* terrain = calloc(1, sizeof(TerrainShape)); lovrAssert(terrain, "Out of memory");