diff --git a/1.4 release notes.txt b/1.4 release notes.txt index 46d4df2f8..f7f0670a9 100644 Binary files a/1.4 release notes.txt and b/1.4 release notes.txt differ diff --git a/src/main/java/com/seibel/lod/objects/LodRegion.java b/src/main/java/com/seibel/lod/objects/LodRegion.java index f76178a03..0aa5e3d52 100644 --- a/src/main/java/com/seibel/lod/objects/LodRegion.java +++ b/src/main/java/com/seibel/lod/objects/LodRegion.java @@ -606,8 +606,8 @@ public class LodRegion implements Serializable //i'm doing a upper limit of the minimum //Color should be just 3 byte but i'm gonna calculate as 12 byte //Height and depth should be just 4 byte but i'm gonna calculate as 8 byte - //count += Math.pow(2,LodUtil.REGION_DETAIL_LEVEL-tempLod) * (8 + 3 + 2 + 2 + 1 + 1) - count += Math.pow(2, LodUtil.REGION_DETAIL_LEVEL - tempLod) * (24 + 8 + 8 + 8 + 8 + 8); + count += Math.pow(2,LodUtil.REGION_DETAIL_LEVEL-tempLod) * (8 + 3 + 2 + 2 + 1); + //count += Math.pow(2, LodUtil.REGION_DETAIL_LEVEL - tempLod) * (24 + 8 + 8 + 8 + 8); } return count; } diff --git a/src/main/java/com/seibel/lod/proxy/ClientProxy.java b/src/main/java/com/seibel/lod/proxy/ClientProxy.java index 9d10dcd08..fbc0777ee 100644 --- a/src/main/java/com/seibel/lod/proxy/ClientProxy.java +++ b/src/main/java/com/seibel/lod/proxy/ClientProxy.java @@ -18,6 +18,7 @@ package com.seibel.lod.proxy; import com.seibel.lod.util.DetailDistanceUtil; +import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -299,6 +300,14 @@ public class ClientProxy DetailDistanceUtil.updateSettings(); } + @SubscribeEvent + public void onKeyInput(InputEvent.KeyInputEvent event) { + //f4 is key 293, the 1 action mean that the key just got pressed + if(event.getKey() == 293 && event.getAction() == 1) + { + LodConfig.CLIENT.debugMode.set(!LodConfig.CLIENT.debugMode.get()); + } + } //================// // public getters // diff --git a/src/main/java/com/seibel/lod/render/LodRenderer.java b/src/main/java/com/seibel/lod/render/LodRenderer.java index 22375940b..46d127d67 100644 --- a/src/main/java/com/seibel/lod/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/render/LodRenderer.java @@ -275,7 +275,11 @@ public class LodRenderer //===========================// // set the required open GL settings - GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); + if(LodConfig.CLIENT.debugMode.get()){ + GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE); + }else{ + GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); + } //GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE); //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDisable(GL11.GL_TEXTURE_2D);