1. Bryan Kadzban
  2. Frontier

Commits

Bryan Kadzban  committed 95c18be

Backport the logic parts of https://bitbucket.org/ecsirke/frontier/commits/a17df28f5badb66812ca582ed90cf7734e72d2f2 -- I don't see the effects, but either way it seems to work, so good enough.

  • Participants
  • Parent commits e5dc471
  • Branches default

Comments (0)

Files changed (1)

File Terrain/CTree.cpp

View file
       l.size = leaf_size * 0.5f;//  * (0.5f + WorldNoisef (_seed_current++);
       l.position.x = TEXTURE_HALF + (WorldNoisef (_seed_current++) - 0.5f) * (TEXTURE_HALF - l.size) * 2.0f;
       l.position.y = TEXTURE_HALF + (WorldNoisef (_seed_current++) - 0.5f) * (TEXTURE_HALF - l.size) * 2.0f;
-      delta = _leaf_list[i].position - glVector (TEXTURE_HALF, TEXTURE_HALF);
+      delta = l.position - glVector (TEXTURE_HALF, TEXTURE_HALF);
       l.dist = delta.Length ();
       //Leaves get smaller as we move from the center of the texture
       l.size = (0.25f + ((TEXTURE_HALF - l.dist) / TEXTURE_HALF) * 0.75f) * leaf_size;