Skip to content

Commit

Permalink
Introduce a little bit of variation in block break particle sizes. (s…
Browse files Browse the repository at this point in the history
…till not right sizes and random)
  • Loading branch information
UnknownShadow200 committed Nov 16, 2017
1 parent a457166 commit ac35685
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ClassicalSharp/Particles/ParticleManager.cs
Expand Up @@ -217,7 +217,8 @@ public sealed class ParticleManager : IGameComponent {

p.texLoc = (byte)texLoc;
p.block = block;
p.Size = 8;
int type = rnd.Next(0, 30);
p.Size = (byte)(type >= 28 ? 12 : (type >= 25 ? 10 : 8));
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/Client/Particle.c
Expand Up @@ -386,7 +386,8 @@ void Particles_BreakBlockEffect(Vector3I coords, BlockID oldBlock, BlockID block
p->Rec = rec;
p->TexLoc = (TextureLoc)texLoc;
p->Block = block;
p->Base.Size = 8;
Int32 type = Random_Range(&rnd, 0, 30);
p->Base.Size = (UInt8)(type >= 28 ? 12 : (type >= 25 ? 10 : 8));
}
}

Expand Down

0 comments on commit ac35685

Please sign in to comment.