summaryrefslogtreecommitdiff
path: root/Block.cpp
diff options
context:
space:
mode:
authorJapa2011-02-27 18:25:16 +0000
committerJapa2011-02-27 18:25:16 +0000
commitc7054ff4be0177fd32bd5283055463b6b800ef9c (patch)
tree00b7ed07e00a2aedc4100973f5aacbf5832290b9 /Block.cpp
parent663aa547439c9c2dc977bb3601d91f11e176b83a (diff)
downloadstonesense-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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Block.cpp b/Block.cpp
index 3a6d9bf..87b1905 100644
--- a/Block.cpp
+++ b/Block.cpp
@@ -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);
}
}