|
@@ -640,6 +640,8 @@ void Terrain::CreateGeometry()
|
|
|
|
|
|
|
|
patches_.Reserve(numPatches_.x_ * numPatches_.y_);
|
|
patches_.Reserve(numPatches_.x_ * numPatches_.y_);
|
|
|
|
|
|
|
|
|
|
+ bool enabled = IsEnabledEffective();
|
|
|
|
|
+
|
|
|
// Create patches and set node transforms
|
|
// Create patches and set node transforms
|
|
|
for (int z = 0; z < numPatches_.y_; ++z)
|
|
for (int z = 0; z < numPatches_.y_; ++z)
|
|
|
{
|
|
{
|
|
@@ -657,8 +659,6 @@ void Terrain::CreateGeometry()
|
|
|
patch->SetOwner(this);
|
|
patch->SetOwner(this);
|
|
|
patch->SetCoordinates(IntVector2(x, z));
|
|
patch->SetCoordinates(IntVector2(x, z));
|
|
|
|
|
|
|
|
- bool enabled = IsEnabledEffective();
|
|
|
|
|
-
|
|
|
|
|
// Copy initial drawable parameters
|
|
// Copy initial drawable parameters
|
|
|
patch->SetEnabled(enabled);
|
|
patch->SetEnabled(enabled);
|
|
|
patch->SetMaterial(material_);
|
|
patch->SetMaterial(material_);
|