diff options
| author | Japa | 2011-02-27 18:25:16 +0000 |
|---|---|---|
| committer | Japa | 2011-02-27 18:25:16 +0000 |
| commit | c7054ff4be0177fd32bd5283055463b6b800ef9c (patch) | |
| tree | 00b7ed07e00a2aedc4100973f5aacbf5832290b9 /Block.cpp | |
| parent | 663aa547439c9c2dc977bb3601d91f11e176b83a (diff) | |
| download | stonesense-c7054ff4be0177fd32bd5283055463b6b800ef9c.tar.gz stonesense-c7054ff4be0177fd32bd5283055463b6b800ef9c.tar.bz2 stonesense-c7054ff4be0177fd32bd5283055463b6b800ef9c.tar.xz | |
Made the tops of the trees not get shaded when the bottoms aren't.
Diffstat (limited to 'Block.cpp')
| -rw-r--r-- | Block.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -43,6 +43,7 @@ Block::Block(WorldSegment* ownerSegment) building.info.type = BUILDINGTYPE_NA;
building.index = -1;
+ building.parent = 0;
this->material.type = INVALID_INDEX;
this->material.index = INVALID_INDEX;
@@ -272,7 +273,10 @@ void Block::Draw(){ for(uint32_t i=0; i < building.sprites.size(); i++)
{
spriteobject = &building.sprites[i];
- spriteobject->draw_world(x, y, z, this);
+ if(building.parent)
+ spriteobject->draw_world(x, y, z, building.parent);
+ else
+ spriteobject->draw_world(x, y, z, this);
}
}
|
