add debug control
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
8ddb35d0f8
commit
ed9dac0b80
@ -1324,6 +1324,8 @@ Fix entity swap button resetting position
|
|||||||
|
|
||||||
(03/26/2025)
|
(03/26/2025)
|
||||||
Fix block meshgen not incrementing indices correctly
|
Fix block meshgen not incrementing indices correctly
|
||||||
|
Fix block meshgen algorithm iteration bug
|
||||||
|
Add debug control to swap first/third person
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ public class ControlCategoryInGameDebug {
|
|||||||
|
|
||||||
public static final String DEBUG_FRAMESTEP = "framestep";
|
public static final String DEBUG_FRAMESTEP = "framestep";
|
||||||
public static final String DEBUG_SWAP_EDITOR_MODE = "swapEditorMode";
|
public static final String DEBUG_SWAP_EDITOR_MODE = "swapEditorMode";
|
||||||
|
public static final String DEBUG_SWITCH_FIRST_THIRD = "switchFirstThird";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps the controls
|
* Maps the controls
|
||||||
@ -30,6 +31,7 @@ public class ControlCategoryInGameDebug {
|
|||||||
public static void mapControls(ControlHandler handler){
|
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_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_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());
|
Globals.clientConnection.queueOutgoingMessage(CharacterMessage.constructEditorSwapMessage());
|
||||||
}});
|
}});
|
||||||
controlMap.get(DEBUG_SWAP_EDITOR_MODE).setRepeatTimeout(0.5f * Main.targetFrameRate);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user