Skip to content

Commit

Permalink
Sprite offset doesn't change on Y axis now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Goodlyay committed Nov 21, 2017
1 parent b24d843 commit b4cebac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ClassicalSharp/MeshBuilder/TileDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected virtual void DrawSprite(int count) {

byte offsetType = BlockInfo.SpriteOffset[curBlock];
if (offsetType >= 6 && offsetType <= 7) {
spriteRng.SetSeed((X + 1217 * Y + 4751 * Z) & 0x7fffffff);
spriteRng.SetSeed((X + 1217 * Z) & 0x7fffffff);
float valX = spriteRng.Next(-3, 3 + 1) / 16.0f;
float valY = spriteRng.Next(0, 3 + 1) / 16.0f;
float valZ = spriteRng.Next(-3, 3 + 1) / 16.0f;
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void Builder_DrawSprite(Int32 count) {

UInt8 offsetType = Block_SpriteOffset[Builder_Block];
if (offsetType >= 6 && offsetType <= 7) {
Random_SetSeed(&spriteRng, (Builder_X + 1217 * Builder_Y + 4751 * Builder_Z) & 0x7fffffff);
Random_SetSeed(&spriteRng, (Builder_X + 1217 * Builder_Z) & 0x7fffffff);
Real32 valX = Random_Range(&spriteRng, -3, 3 + 1) / 16.0f;
Real32 valY = Random_Range(&spriteRng, 0, 3 + 1) / 16.0f;
Real32 valZ = Random_Range(&spriteRng, -3, 3 + 1) / 16.0f;
Expand Down

0 comments on commit b4cebac

Please sign in to comment.