Skip to content

Commit

Permalink
fix hotbar z-fighting
Browse files Browse the repository at this point in the history
fix pause hand item glitching
  • Loading branch information
Pannoniae committed Oct 2, 2024
1 parent f38485d commit a5aed54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/GUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ public Vector2 measureStringSmall(ReadOnlySpan<char> text) {
public void drawBlock(Block block, int x, int y, int size) {
//GD.Clear(ClearBuffers.Color);
var viewport = GD.Viewport;
var dt = GD.DepthTestingEnabled;
GD.DepthTestingEnabled = true;
//var dt = GD.DepthTestingEnabled;
//GD.DepthTestingEnabled = true;
GD.VertexArray = buffer;
GD.ShaderProgram = guiBlockShader;
WorldRenderer.meshBlockTinted(block, ref guiBlock, ref guiBlockI, 15);
Expand Down Expand Up @@ -391,7 +391,7 @@ public void drawBlock(Block block, int x, int y, int size) {
GD.DrawElements(PrimitiveType.Triangles, 0, (uint)spI.Length);

// restore
GD.DepthTestingEnabled = dt;
//GD.DepthTestingEnabled = dt;
GD.Viewport = viewport;
}

Expand Down
1 change: 1 addition & 0 deletions src/world/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public void setPrevVars() {
prevTotalTraveled = totalTraveled;
wasInLiquid = inLiquid;
prevSwingProgress = swingProgress;
renderer.prevLower = renderer.lower;
}
// before pausing, all vars need to be updated SO THERE IS NO FUCKING JITTER ON THE PAUSE MENU
public void catchUpOnPrevVars() {
Expand Down

0 comments on commit a5aed54

Please sign in to comment.