Minor time update

This commit is contained in:
austin 2022-04-23 22:10:14 -04:00
parent d4513b84a4
commit c0c0e81327
3 changed files with 9 additions and 9 deletions

View File

@ -272,7 +272,7 @@ public class GroundMovementTree {
Globals.dataCellManager.sendNetworkMessageToChunk( Globals.dataCellManager.sendNetworkMessageToChunk(
EntityMessage.constructmoveUpdateMessage( EntityMessage.constructmoveUpdateMessage(
parent.getId(), parent.getId(),
System.currentTimeMillis(), Main.getCurrentFrame(),
(float)position.x, (float)position.x,
(float)position.y, (float)position.y,
(float)position.z, (float)position.z,
@ -289,7 +289,7 @@ public class GroundMovementTree {
Globals.clientConnection.queueOutgoingMessage( Globals.clientConnection.queueOutgoingMessage(
EntityMessage.constructmoveUpdateMessage( EntityMessage.constructmoveUpdateMessage(
parent.getId(), parent.getId(),
System.currentTimeMillis(), Main.getCurrentFrame(),
(float)position.x, (float)position.x,
(float)position.y, (float)position.y,
(float)position.z, (float)position.z,
@ -352,7 +352,7 @@ public class GroundMovementTree {
Globals.dataCellManager.sendNetworkMessageToChunk( Globals.dataCellManager.sendNetworkMessageToChunk(
EntityMessage.constructmoveUpdateMessage( EntityMessage.constructmoveUpdateMessage(
parent.getId(), parent.getId(),
System.currentTimeMillis(), Main.getCurrentFrame(),
(float)position.x, (float)position.x,
(float)position.y, (float)position.y,
(float)position.z, (float)position.z,
@ -369,7 +369,7 @@ public class GroundMovementTree {
Globals.clientConnection.queueOutgoingMessage( Globals.clientConnection.queueOutgoingMessage(
EntityMessage.constructmoveUpdateMessage( EntityMessage.constructmoveUpdateMessage(
parent.getId(), parent.getId(),
System.currentTimeMillis(), Main.getCurrentFrame(),
(float)position.x, (float)position.x,
(float)position.y, (float)position.y,
(float)position.z, (float)position.z,
@ -440,7 +440,7 @@ public class GroundMovementTree {
Globals.dataCellManager.sendNetworkMessageToChunk( Globals.dataCellManager.sendNetworkMessageToChunk(
EntityMessage.constructmoveUpdateMessage( EntityMessage.constructmoveUpdateMessage(
parent.getId(), parent.getId(),
System.currentTimeMillis(), Main.getCurrentFrame(),
(float)position.x, (float)position.x,
(float)position.y, (float)position.y,
(float)position.z, (float)position.z,
@ -457,7 +457,7 @@ public class GroundMovementTree {
Globals.clientConnection.queueOutgoingMessage( Globals.clientConnection.queueOutgoingMessage(
EntityMessage.constructmoveUpdateMessage( EntityMessage.constructmoveUpdateMessage(
parent.getId(), parent.getId(),
System.currentTimeMillis(), Main.getCurrentFrame(),
(float)position.x, (float)position.x,
(float)position.y, (float)position.y,
(float)position.z, (float)position.z,

View File

@ -68,7 +68,7 @@ public class Main {
//These are used in calculating the time between frames for visualization (camera) control and such //These are used in calculating the time between frames for visualization (camera) control and such
static double deltaTime = 0.0f; static double deltaTime = 0.0f;
static double lastFrame = 0.0f; static double lastFrame = 0.0f;
public static long frameCount = 0; static long frameCount = 0;
public static float deltaFrames = 0; public static float deltaFrames = 0;
//View Controls //View Controls
public static float view_Range = 200000.0f; public static float view_Range = 200000.0f;

View File

@ -866,8 +866,8 @@ public class Mesh {
glUniformMatrix4fv(Globals.renderingEngine.getActiveShader().shaderVertexProjectionLoc, false, Globals.projectionMatrix.get(new float[16])); glUniformMatrix4fv(Globals.renderingEngine.getActiveShader().shaderVertexProjectionLoc, false, Globals.projectionMatrix.get(new float[16]));
glUniform3fv(Globals.renderingEngine.getActiveShader().shaderVertexViewPosLoc, CameraEntityUtils.getCameraEye(Globals.playerCamera).get(BufferUtils.createFloatBuffer(3))); glUniform3fv(Globals.renderingEngine.getActiveShader().shaderVertexViewPosLoc, CameraEntityUtils.getCameraEye(Globals.playerCamera).get(BufferUtils.createFloatBuffer(3)));
glUniformMatrix4fv(glGetUniformLocation(Globals.renderingEngine.getActiveShader().shaderProgram, "lightSpaceMatrix"), false, Globals.lightDepthMatrix.get(new float[16])); glUniformMatrix4fv(glGetUniformLocation(Globals.renderingEngine.getActiveShader().shaderProgram, "lightSpaceMatrix"), false, Globals.lightDepthMatrix.get(new float[16]));
glUniform1i(glGetUniformLocation(Globals.renderingEngine.getActiveShader().shaderProgram, "frame"), (int)Main.frameCount); glUniform1i(glGetUniformLocation(Globals.renderingEngine.getActiveShader().shaderProgram, "frame"), (int)Main.getCurrentFrame());
glUniform1f(glGetUniformLocation(Globals.renderingEngine.getActiveShader().shaderProgram, "time"), (float)Main.frameCount); glUniform1f(glGetUniformLocation(Globals.renderingEngine.getActiveShader().shaderProgram, "time"), (float)Main.getCurrentFrame());
} }
if(bufferNonStandardUniforms){ if(bufferNonStandardUniforms){