summaryrefslogtreecommitdiff
path: root/terrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'terrain.cpp')
-rw-r--r--terrain.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/terrain.cpp b/terrain.cpp
index e32a52b..f3dcb33 100644
--- a/terrain.cpp
+++ b/terrain.cpp
@@ -133,6 +133,12 @@ Terrain::Chunk::Chunk(Terrain *terrain, float x, float y) : cache_obj(terrain->t
this->vbo_object = this->node_count = this->vertices = 0;
this->nodes = NULL;
heights = cache_obj->heights;
+
+ for(std::list<Vector3>::iterator it = cache_obj->objects.begin(); it != cache_obj->objects.end(); it++) {
+ models::Model::p tree = models::ModelManager::get_instance().get_model("tree");
+ objects.push_back(ObjectPair(tree, *it));
+ }
+
normals = new Vector3[(int)((n_width)*(n_height))];
calc_normals();