control repeat fix + data tweaks
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
2fbfaf4887
commit
45bb4a44e0
@ -162,7 +162,7 @@
|
|||||||
{
|
{
|
||||||
"type" : "JUMP",
|
"type" : "JUMP",
|
||||||
"jumpFrames" : 3,
|
"jumpFrames" : 3,
|
||||||
"jumpForce" : 1000,
|
"jumpForce" : 500,
|
||||||
"animationJump" : {
|
"animationJump" : {
|
||||||
"name" : "Jump",
|
"name" : "Jump",
|
||||||
"length" : 1,
|
"length" : 1,
|
||||||
|
|||||||
@ -244,6 +244,11 @@ Make cursor less jittery (ie always up to date with where the camera is facing)
|
|||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
Character movement in particular feels off
|
||||||
|
- Bring back strafing
|
||||||
|
|
||||||
|
Fix grass not generating for closest tiles
|
||||||
|
|
||||||
Data Cleanup
|
Data Cleanup
|
||||||
- Clean up creatures
|
- Clean up creatures
|
||||||
- Remove unused ones
|
- Remove unused ones
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class CollisionEngine {
|
|||||||
public static final float ENGINE_STEP_SIZE = 0.01f;
|
public static final float ENGINE_STEP_SIZE = 0.01f;
|
||||||
|
|
||||||
//gravity constant
|
//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
|
//world data that the collision engine leverages for position correction and the like
|
||||||
CollisionWorldData collisionWorldData;
|
CollisionWorldData collisionWorldData;
|
||||||
|
|||||||
@ -1368,10 +1368,10 @@ public class ControlHandler {
|
|||||||
if(!control.isState()){
|
if(!control.isState()){
|
||||||
//on press
|
//on press
|
||||||
control.onPress();
|
control.onPress();
|
||||||
control.setPressFrame((float)Globals.timekeeper.getMostRecentRawFrametime());
|
control.setPressFrame((float)Globals.timekeeper.getNumberOfRenderFramesElapsed());
|
||||||
} else {
|
} else {
|
||||||
//on repeat
|
//on repeat
|
||||||
if((float)Globals.timekeeper.getMostRecentRawFrametime() - control.getPressFrame() > control.getRepeatTimeout()){
|
if((float)Globals.timekeeper.getNumberOfRenderFramesElapsed() - control.getPressFrame() > control.getRepeatTimeout()){
|
||||||
control.onRepeat();
|
control.onRepeat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1381,7 +1381,7 @@ public class ControlHandler {
|
|||||||
//on release
|
//on release
|
||||||
control.onRelease();
|
control.onRelease();
|
||||||
//on click
|
//on click
|
||||||
if((float)Globals.timekeeper.getMostRecentRawFrametime() - control.getPressFrame() < control.getRepeatTimeout()){
|
if((float)Globals.timekeeper.getNumberOfRenderFramesElapsed() - control.getPressFrame() < control.getRepeatTimeout()){
|
||||||
control.onClick();
|
control.onClick();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1394,7 +1394,7 @@ public class ControlHandler {
|
|||||||
if(!control.isState()){
|
if(!control.isState()){
|
||||||
//on press
|
//on press
|
||||||
control.onPress();
|
control.onPress();
|
||||||
control.setPressFrame((float)Globals.timekeeper.getMostRecentRawFrametime());
|
control.setPressFrame((float)Globals.timekeeper.getNumberOfRenderFramesElapsed());
|
||||||
} else {
|
} else {
|
||||||
//on repeat
|
//on repeat
|
||||||
control.onRepeat();
|
control.onRepeat();
|
||||||
@ -1404,7 +1404,7 @@ public class ControlHandler {
|
|||||||
if(control.isState()){
|
if(control.isState()){
|
||||||
//on release
|
//on release
|
||||||
control.onRelease();
|
control.onRelease();
|
||||||
if((float)Globals.timekeeper.getMostRecentRawFrametime() - control.getPressFrame() < control.getRepeatTimeout()){
|
if((float)Globals.timekeeper.getNumberOfRenderFramesElapsed() - control.getPressFrame() < control.getRepeatTimeout()){
|
||||||
control.onClick();
|
control.onClick();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -240,6 +240,7 @@ public class ImGuiWindowMacros {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mainDebugWindow.setOpen(false);
|
||||||
RenderingEngine.addImGuiWindow(mainDebugWindow);
|
RenderingEngine.addImGuiWindow(mainDebugWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user