diff --git a/Model/SkeletonModel.cs b/Model/SkeletonModel.cs index 9cee4e2bb..36e85a643 100644 --- a/Model/SkeletonModel.cs +++ b/Model/SkeletonModel.cs @@ -63,8 +63,8 @@ namespace ClassicalSharp.Model { Set.Torso.Render(); DrawRotate( 0, 0.75f, 0, leftLegXRot, 0, 0, Set.LeftLeg ); DrawRotate( 0, 0.75f, 0, rightLegXRot, 0, 0, Set.RightLeg ); - DrawRotate( 0, 1.375f, 0, 90f, 0, leftArmZRot, Set.LeftArm ); - DrawRotate( 0, 1.375f, 0, 90f, 0, rightArmZRot, Set.RightArm ); + DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, leftArmZRot, Set.LeftArm ); + DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, rightArmZRot, Set.RightArm ); } public override void Dispose() { diff --git a/Model/ZombieModel.cs b/Model/ZombieModel.cs index 86e11892b..974a5c544 100644 --- a/Model/ZombieModel.cs +++ b/Model/ZombieModel.cs @@ -62,8 +62,8 @@ namespace ClassicalSharp.Model { Set.Torso.Render(); DrawRotate( 0, 0.75f, 0, leftLegXRot, 0, 0, Set.LeftLeg ); DrawRotate( 0, 0.75f, 0, rightLegXRot, 0, 0, Set.RightLeg ); - DrawRotate( 0, 1.375f, 0, 90f, 0, leftArmZRot, Set.LeftArm ); - DrawRotate( 0, 1.375f, 0, 90f, 0, rightArmZRot, Set.RightArm ); + DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, leftArmZRot, Set.LeftArm ); + DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, rightArmZRot, Set.RightArm ); graphics.AlphaTest = true; } diff --git a/Rendering/MapRenderer.cs b/Rendering/MapRenderer.cs index 097de2826..42f1be310 100644 --- a/Rendering/MapRenderer.cs +++ b/Rendering/MapRenderer.cs @@ -216,10 +216,14 @@ namespace ClassicalSharp { // Render translucent(liquid) blocks. These 'blend' into other blocks. Graphics.BeginIndexedVbBatch(); - Graphics.Texturing = false; - Graphics.AlphaBlending = false; + bool canCullTranslucent = !Window.BlockInfo.IsTranslucent( + (byte)Window.LocalPlayer.BlockAtHead ); + if( canCullTranslucent ) + Graphics.FaceCulling = true; // First fill depth buffer + Graphics.Texturing = false; + Graphics.AlphaBlending = false; Graphics.ColourWrite = false; for( int batch = 0; batch < _1Dcount; batch++ ) { RenderTranslucentBatchDepthPass( batch ); @@ -237,6 +241,8 @@ namespace ClassicalSharp { Graphics.AlphaTest = false; Graphics.AlphaBlending = false; Graphics.Texturing = false; + if( canCullTranslucent ) + Graphics.FaceCulling = false; Graphics.EndIndexedVbBatch(); } @@ -321,7 +327,6 @@ namespace ClassicalSharp { for( int i = 0; i < chunks.Length; i++ ) { ChunkInfo info = chunks[i]; if( info.TranslucentParts == null || !info.Visible ) continue; - ChunkPartInfo part = info.TranslucentParts[batch]; if( part.IndicesCount > 0 ) { if( part.IndicesCount > maxIndices ) {