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 /SpriteObjects.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 'SpriteObjects.cpp')
| -rw-r--r-- | SpriteObjects.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SpriteObjects.cpp b/SpriteObjects.cpp index 28ff1a3..cc50ede 100644 --- a/SpriteObjects.cpp +++ b/SpriteObjects.cpp @@ -562,7 +562,7 @@ void c_sprite::draw_world_offset(int x, int y, int z, Block * b, int tileoffset, if(defaultsheet == 0) defaultsheet = IMGObjectSheet;
//sprites can be offset by a random amount, both animationwise, and just variationwise.
//the base offset is set here.
- int rando = randomCube[x%RANDOM_CUBE][y%RANDOM_CUBE][z%RANDOM_CUBE];
+ int rando = randomCube[(b->x)%RANDOM_CUBE][(b->y)%RANDOM_CUBE][(b->z)%RANDOM_CUBE];
//and the random offset of the animation frame is set here, provided the sprite iis set to use random animation frames.
int offsetAnimFrame = ((randomanimation?rando:0) + currentAnimationFrame) % MAX_ANIMFRAME;
//the following stuff is only bothered with if the animation frames say it should be drawn. this can be over-ridden
|
