diff --git a/ClassicalSharp/Entities/Model/HumanModels.cs b/ClassicalSharp/Entities/Model/HumanModels.cs index 511a1e990..c71ca38c9 100644 --- a/ClassicalSharp/Entities/Model/HumanModels.cs +++ b/ClassicalSharp/Entities/Model/HumanModels.cs @@ -10,19 +10,14 @@ namespace ClassicalSharp.Model { public ChibiModel( Game window ) : base( window ) { } + const float size = 0.5f; protected override void MakeDescriptions() { + base.MakeDescriptions(); head = MakeBoxBounds( -4, 12, -4, 4, 20, 4 ).RotOrigin( 0, 13, 0 ); - torso = MakeBoxBounds( -4, -6, -2, 4, 6, 2 ) - .SetModelBounds( -2, 6, -1, 2, 12, 1 ); - lLeg = MakeBoxBounds( -2, -6, -2, 2, 6, 2 ).RotOrigin( 0, 6, 0 ) - .SetModelBounds( -2, 0, -1, 0, 6, 1 ); - rLeg = MakeBoxBounds( -2, -6, -2, 2, 6, 2 ).RotOrigin( 0, 6, 0 ) - .SetModelBounds( 0, 0, -1, 2, 6, 1 ); - lArm = MakeBoxBounds( -2, -6, -2, 2, 6, 2 ).RotOrigin( -3, 11, 0 ) - .SetModelBounds( -4, 6, -1, -2, 12, 1 ); - rArm = MakeBoxBounds( -2, -6, -2, 2, 6, 2 ).RotOrigin( 3, 11, 0 ) - .SetModelBounds( 2, 6, -1, 4, 12, 1 ); - offset = 0.5f * 0.5f; + torso = torso.Scale( size ); + lLeg = lLeg.Scale( size ); rLeg = rLeg.Scale( size ); + lArm = lArm.Scale( size ); rArm = rArm.Scale( size ); + offset = 0.5f * size; } public override float MaxScale { get { return 3; } } diff --git a/ClassicalSharp/Generator/NotchyGenerator.cs b/ClassicalSharp/Generator/NotchyGenerator.cs index bba3e85f4..88080b923 100644 --- a/ClassicalSharp/Generator/NotchyGenerator.cs +++ b/ClassicalSharp/Generator/NotchyGenerator.cs @@ -87,11 +87,11 @@ namespace ClassicalSharp.Generator { blocks[mapIndex] = Block.Lava; mapIndex += oneY; for( int y = 1; y < height; y++ ) { - byte type = 0; - if( y <= stoneHeight ) type = Block.Stone; - else if( y <= dirtHeight ) type = Block.Dirt; + byte block = 0; + if( y <= stoneHeight ) block = Block.Stone; + else if( y <= dirtHeight ) block = Block.Dirt; - blocks[mapIndex] = type; + blocks[mapIndex] = block; mapIndex += oneY; } } diff --git a/ClassicalSharp/Network/Utils/AsyncDownloader.cs b/ClassicalSharp/Network/Utils/AsyncDownloader.cs index 72072e163..ff7e22d4c 100644 --- a/ClassicalSharp/Network/Utils/AsyncDownloader.cs +++ b/ClassicalSharp/Network/Utils/AsyncDownloader.cs @@ -234,8 +234,7 @@ namespace ClassicalSharp.Network { } Bitmap oldBmp = oldItem.Data as Bitmap; - if( oldBmp != null ) - oldBmp.Dispose(); + if( oldBmp != null ) oldBmp.Dispose(); } downloaded[request.Identifier] = newItem; } diff --git a/ClassicalSharp/Utils/StringBuffer.cs b/ClassicalSharp/Utils/StringBuffer.cs index dee5c3909..9a01a02c7 100644 --- a/ClassicalSharp/Utils/StringBuffer.cs +++ b/ClassicalSharp/Utils/StringBuffer.cs @@ -97,8 +97,7 @@ namespace ClassicalSharp { public bool Empty { get { for( int i = 0; i < Capacity; i++ ) { - if( value[i] != '\0' ) - return false; + if( value[i] != '\0' ) return false; } return true; } @@ -108,8 +107,7 @@ namespace ClassicalSharp { get { int len = Capacity; for( int i = Capacity - 1; i >= 0; i-- ) { - if( value[i] != '\0' ) - break; + if( value[i] != '\0' ) break; len--; } return len;