From 515eee1f413da4e4dda4c6278b5933062b006d67 Mon Sep 17 00:00:00 2001 From: Asser Fahrenholz Date: Sun, 26 Feb 2023 14:11:13 +0100 Subject: [PATCH] Fixed an error. This shader isn't used yet, but could be in the future. --- infinity/assets/MatDefs/AnimateOnceSpriteShader.vert | 2 +- .../java/infinity/client/AvatarMovementFunctions.java | 8 -------- .../main/java/infinity/client/AvatarMovementState.java | 8 ++++---- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/infinity/assets/MatDefs/AnimateOnceSpriteShader.vert b/infinity/assets/MatDefs/AnimateOnceSpriteShader.vert index 6d229981..625fa0e3 100644 --- a/infinity/assets/MatDefs/AnimateOnceSpriteShader.vert +++ b/infinity/assets/MatDefs/AnimateOnceSpriteShader.vert @@ -21,7 +21,7 @@ void main(){ int selectedTileX = int(mod(float(tileDistance), m_numTilesX)); int selectedTileY = int(mod(float(tileDistance), m_numTilesY)); - completed = (tileDistance / m_numTilesX ; + completed = (tileDistance / m_numTilesX); texCoordAni.x = (float(float(inTexCoord.x/m_numTilesX) + float(selectedTileX)/float(m_numTilesX))); texCoordAni.y = (float(float(inTexCoord.y/m_numTilesY) + float(selectedTileY)/float(m_numTilesY))); diff --git a/infinity/src/main/java/infinity/client/AvatarMovementFunctions.java b/infinity/src/main/java/infinity/client/AvatarMovementFunctions.java index 3e4b04e1..587aa993 100644 --- a/infinity/src/main/java/infinity/client/AvatarMovementFunctions.java +++ b/infinity/src/main/java/infinity/client/AvatarMovementFunctions.java @@ -180,14 +180,6 @@ public static void initializeDefaultMappings(final InputMapper inputMapper) { inputMapper.map(F_GRAVBOMB, KeyInput.KEY_BACKSLASH); } - if (!inputMapper.hasMappings(F_GRAVBOMB)) { - inputMapper.map(F_GRAVBOMB, KeyInput.KEY_BACKSLASH); - } - - if (!inputMapper.hasMappings(F_MINE)) { - inputMapper.map(F_MINE, KeyInput.KEY_TAB); - } - if (!inputMapper.hasMappings(F_SHOOT)) { inputMapper.map(F_SHOOT, KeyInput.KEY_LCONTROL); } diff --git a/infinity/src/main/java/infinity/client/AvatarMovementState.java b/infinity/src/main/java/infinity/client/AvatarMovementState.java index 373597cb..6fb2f1b6 100644 --- a/infinity/src/main/java/infinity/client/AvatarMovementState.java +++ b/infinity/src/main/java/infinity/client/AvatarMovementState.java @@ -296,7 +296,9 @@ private void setLocation(Vector3f loc) { public void valueActive(FunctionId func, double value, double tpf) { if (func == AvatarMovementFunctions.F_GRAVBOMB) { session.attack(WeaponsSystem.GRAVBOMB); - } else if (func == AvatarMovementFunctions.F_MINE && shiftPressed) { + } else if (func == AvatarMovementFunctions.F_BOMB && !shiftPressed) { + session.attack(WeaponsSystem.BOMB); + } else if (func == AvatarMovementFunctions.F_BOMB && shiftPressed) { session.attack(WeaponsSystem.MINE); } else if (func == AvatarMovementFunctions.F_THOR) { session.action(ActionSystem.FIRETHOR); @@ -304,9 +306,7 @@ public void valueActive(FunctionId func, double value, double tpf) { session.action(ActionSystem.REPEL); } else if (func == AvatarMovementFunctions.F_BURST) { session.action(ActionSystem.FIREBURST); - } else if (func == AvatarMovementFunctions.F_BOMB && !shiftPressed) { - session.attack(WeaponsSystem.BOMB); - } else if (func == AvatarMovementFunctions.F_SHOOT && !shiftPressed) { + } else if (func == AvatarMovementFunctions.F_SHOOT && !shiftPressed) { session.attack(WeaponsSystem.GUN); } }