Fix missing terrain bounds update after modifying terrain

Fixes #5
This commit is contained in:
Wojtek Figat
2021-02-07 21:11:04 +01:00
parent 96f1d9e820
commit 2325de3ddc
3 changed files with 6 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ Terrain::~Terrain()
void Terrain::UpdateBounds()
{
PROFILE_CPU();
_box = BoundingBox(_transform.Translation, _transform.Translation);
for (int32 i = 0; i < _patches.Count(); i++)
{
@@ -48,6 +49,7 @@ void Terrain::UpdateBounds()
void Terrain::CacheNeighbors()
{
PROFILE_CPU();
for (int32 pathIndex = 0; pathIndex < _patches.Count(); pathIndex++)
{
const auto patch = _patches[pathIndex];