From fc3de3302e7b99d9a1bb695441f3f35b56845bd0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 28 Feb 2016 16:47:41 +0100 Subject: [PATCH] Create a collision shape for the default terrain --- apps/openmw/mwworld/scene.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 63bb4758a..65348763a 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -268,6 +268,13 @@ namespace MWWorld mPhysics->addHeightField (data->mHeights, cell->getCell()->getGridX(), cell->getCell()->getGridY(), worldsize / (verts-1), verts); } + else + { + static std::vector defaultHeight; + defaultHeight.resize(verts*verts, -2048.f); + mPhysics->addHeightField (&defaultHeight[0], cell->getCell()->getGridX(), cell->getCell()->getGridY(), + worldsize / (verts-1), verts); + } } // register local scripts