control repeat fix + data tweaks
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-04-21 23:19:56 -04:00
parent 2fbfaf4887
commit 45bb4a44e0
5 changed files with 13 additions and 7 deletions

View File

@ -162,7 +162,7 @@
{
"type" : "JUMP",
"jumpFrames" : 3,
"jumpForce" : 1000,
"jumpForce" : 500,
"animationJump" : {
"name" : "Jump",
"length" : 1,

View File

@ -244,6 +244,11 @@ Make cursor less jittery (ie always up to date with where the camera is facing)
# TODO
Character movement in particular feels off
- Bring back strafing
Fix grass not generating for closest tiles
Data Cleanup
- Clean up creatures
- Remove unused ones

View File

@ -67,7 +67,7 @@ public class CollisionEngine {
public static final float ENGINE_STEP_SIZE = 0.01f;
//gravity constant
public static final float GRAVITY_MAGNITUDE = 9.8f;
public static final float GRAVITY_MAGNITUDE = 9.8f * 2;
//world data that the collision engine leverages for position correction and the like
CollisionWorldData collisionWorldData;

View File

@ -1368,10 +1368,10 @@ public class ControlHandler {
if(!control.isState()){
//on press
control.onPress();
control.setPressFrame((float)Globals.timekeeper.getMostRecentRawFrametime());
control.setPressFrame((float)Globals.timekeeper.getNumberOfRenderFramesElapsed());
} else {
//on repeat
if((float)Globals.timekeeper.getMostRecentRawFrametime() - control.getPressFrame() > control.getRepeatTimeout()){
if((float)Globals.timekeeper.getNumberOfRenderFramesElapsed() - control.getPressFrame() > control.getRepeatTimeout()){
control.onRepeat();
}
}
@ -1381,7 +1381,7 @@ public class ControlHandler {
//on release
control.onRelease();
//on click
if((float)Globals.timekeeper.getMostRecentRawFrametime() - control.getPressFrame() < control.getRepeatTimeout()){
if((float)Globals.timekeeper.getNumberOfRenderFramesElapsed() - control.getPressFrame() < control.getRepeatTimeout()){
control.onClick();
}
} else {
@ -1394,7 +1394,7 @@ public class ControlHandler {
if(!control.isState()){
//on press
control.onPress();
control.setPressFrame((float)Globals.timekeeper.getMostRecentRawFrametime());
control.setPressFrame((float)Globals.timekeeper.getNumberOfRenderFramesElapsed());
} else {
//on repeat
control.onRepeat();
@ -1404,7 +1404,7 @@ public class ControlHandler {
if(control.isState()){
//on release
control.onRelease();
if((float)Globals.timekeeper.getMostRecentRawFrametime() - control.getPressFrame() < control.getRepeatTimeout()){
if((float)Globals.timekeeper.getNumberOfRenderFramesElapsed() - control.getPressFrame() < control.getRepeatTimeout()){
control.onClick();
}
} else {

View File

@ -240,6 +240,7 @@ public class ImGuiWindowMacros {
}
}
});
mainDebugWindow.setOpen(false);
RenderingEngine.addImGuiWindow(mainDebugWindow);
}