From ac356859e5acab96ed45bd8bb32014664a6d4f44 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 17 Nov 2017 00:05:10 +1100 Subject: [PATCH] Introduce a little bit of variation in block break particle sizes. (still not right sizes and random) --- ClassicalSharp/Particles/ParticleManager.cs | 3 ++- src/Client/Particle.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ClassicalSharp/Particles/ParticleManager.cs b/ClassicalSharp/Particles/ParticleManager.cs index 1f37e817d..89a75fb4c 100644 --- a/ClassicalSharp/Particles/ParticleManager.cs +++ b/ClassicalSharp/Particles/ParticleManager.cs @@ -217,7 +217,8 @@ namespace ClassicalSharp.Particles { 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)); } } diff --git a/src/Client/Particle.c b/src/Client/Particle.c index 265d5e92a..623c3fa1e 100644 --- a/src/Client/Particle.c +++ b/src/Client/Particle.c @@ -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)); } }