Fix non-water translucent back faces disappearing when not in same chunk as the player even though the player may be able to see its back faces.

This commit is contained in:
UnknownShadow200 2016-05-11 17:50:32 +10:00
parent 91cfde2fca
commit 0ab4014001

View file

@ -100,8 +100,11 @@ namespace ClassicalSharp.Renderers {
// Render translucent(liquid) blocks. These 'blend' into other blocks.
void RenderTranslucent() {
Block block = game.LocalPlayer.BlockAtHead;
drawAllFaces = block == Block.Water || block == Block.StillWater;
Vector3 pos = game.CurrentCameraPos;
Vector3I coords = Vector3I.Floor( pos );
byte block = game.World.SafeGetBlock( coords );
drawAllFaces = game.BlockInfo.IsTranslucent[block];
// First fill depth buffer
int[] texIds = game.TerrainAtlas1D.TexIds;
api.SetBatchFormat( VertexFormat.P3fT2fC4b );