From 13c8816f9e4385a589fb49a9cbdae6c3e386a3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 20 Aug 2015 23:11:07 +0200 Subject: [PATCH] Fixed water height not resetting when creating new scene --- src/definition/TerrainDefinition.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/definition/TerrainDefinition.cpp b/src/definition/TerrainDefinition.cpp index 2cad3ab..52f87c7 100644 --- a/src/definition/TerrainDefinition.cpp +++ b/src/definition/TerrainDefinition.cpp @@ -15,7 +15,7 @@ TerrainDefinition::TerrainDefinition(DefinitionNode* parent): height_map = new TerrainHeightMap(this); addChild(height_map); - water_height = new FloatNode(this, "water_height", -0.3); + water_height = new FloatNode(this, "water_height"); _height_noise = new NoiseGenerator; } @@ -156,6 +156,8 @@ void TerrainDefinition::applyPreset(TerrainPreset preset) ; } + water_height->setValue(-0.3); + height_map->clearPainting(); validate(); }