diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 774b4561..7e1b4645 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -1324,6 +1324,8 @@ Fix entity swap button resetting position (03/26/2025) Fix block meshgen not incrementing indices correctly +Fix block meshgen algorithm iteration bug +Add debug control to swap first/third person diff --git a/src/main/java/electrosphere/controls/categories/ControlCategoryInGameDebug.java b/src/main/java/electrosphere/controls/categories/ControlCategoryInGameDebug.java index 21e17304..5ef329c0 100644 --- a/src/main/java/electrosphere/controls/categories/ControlCategoryInGameDebug.java +++ b/src/main/java/electrosphere/controls/categories/ControlCategoryInGameDebug.java @@ -22,6 +22,7 @@ public class ControlCategoryInGameDebug { public static final String DEBUG_FRAMESTEP = "framestep"; public static final String DEBUG_SWAP_EDITOR_MODE = "swapEditorMode"; + public static final String DEBUG_SWITCH_FIRST_THIRD = "switchFirstThird"; /** * Maps the controls @@ -30,6 +31,7 @@ public class ControlCategoryInGameDebug { public static void mapControls(ControlHandler handler){ handler.addControl(DEBUG_FRAMESTEP, new Control(ControlType.KEY, GLFW.GLFW_KEY_P,false,"Framesetp","Steps the engine forward one frame")); handler.addControl(DEBUG_SWAP_EDITOR_MODE, new Control(ControlType.KEY, GLFW.GLFW_KEY_F4,false,"Swap Editor Mode","Swaps to/from the editor entity")); + handler.addControl(DEBUG_SWITCH_FIRST_THIRD, new Control(ControlType.KEY, GLFW.GLFW_KEY_F5,false,"Switch First/Third Person","Swaps between first and third person")); } /** @@ -61,6 +63,16 @@ public class ControlCategoryInGameDebug { Globals.clientConnection.queueOutgoingMessage(CharacterMessage.constructEditorSwapMessage()); }}); controlMap.get(DEBUG_SWAP_EDITOR_MODE).setRepeatTimeout(0.5f * Main.targetFrameRate); + + // + //Swap first/third person + // + alwaysOnDebugControlList.add(controlMap.get(DEBUG_SWITCH_FIRST_THIRD)); + controlMap.get(DEBUG_SWITCH_FIRST_THIRD).setOnPress(new ControlMethod(){public void execute(MouseState mouseState){ + LoggerInterface.loggerEngine.INFO("Swaps between first and third person"); + Globals.controlHandler.setIsThirdPerson(!Globals.controlHandler.cameraIsThirdPerson()); + }}); + controlMap.get(DEBUG_SWITCH_FIRST_THIRD).setRepeatTimeout(0.5f * Main.targetFrameRate); } }