From ff713d10bd3c83a1788511d5c83fcfee9c7f8b4a Mon Sep 17 00:00:00 2001 From: George Paton Date: Tue, 20 Feb 2024 09:42:38 +1100 Subject: [PATCH 1/2] Improve SSG animations --- .../render/item/weapon/ItemRenderWeaponShotty.java | 14 +++++++++----- .../hbm/models/weapons/animations/supershotty.json | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java b/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java index b48f78a84..022a0a8a4 100644 --- a/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java +++ b/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java @@ -49,16 +49,20 @@ public class ItemRenderWeaponShotty implements IItemRenderer { switch(type) { case EQUIPPED_FIRST_PERSON: + + boolean linear = false; // TODO: Config option + + String animSuffix = linear ? "Lame" : ""; GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-95F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-2.0F, 0.5F, -2.0F); + GL11.glTranslatef(-2.0F, 0.25F, -2.5F); - HbmAnimations.applyRelevantTransformation("Body"); + HbmAnimations.applyRelevantTransformation("Body" + animSuffix); ResourceManager.shotty.renderPart("Body"); - HbmAnimations.applyRelevantTransformation("Barrel"); + HbmAnimations.applyRelevantTransformation("Barrel" + animSuffix); ResourceManager.shotty.renderPart("Barrel"); // If we've run out of ammo, stop drawing the shells after ejection has completed @@ -67,12 +71,12 @@ public class ItemRenderWeaponShotty implements IItemRenderer { if(ItemGunBase.getBeltSize(player, ItemGunBase.getBeltType(player, item, true)) > 0 || millis < 1000) { GL11.glPushMatrix(); - HbmAnimations.applyRelevantTransformation("ShellL"); + HbmAnimations.applyRelevantTransformation("ShellL" + animSuffix); ResourceManager.shotty.renderPart("ShellL"); GL11.glPopMatrix(); GL11.glPushMatrix(); - HbmAnimations.applyRelevantTransformation("ShellR"); + HbmAnimations.applyRelevantTransformation("ShellR" + animSuffix); ResourceManager.shotty.renderPart("ShellR"); GL11.glPopMatrix(); } diff --git a/src/main/resources/assets/hbm/models/weapons/animations/supershotty.json b/src/main/resources/assets/hbm/models/weapons/animations/supershotty.json index a03ff1ab5..fc1287ec3 100644 --- a/src/main/resources/assets/hbm/models/weapons/animations/supershotty.json +++ b/src/main/resources/assets/hbm/models/weapons/animations/supershotty.json @@ -1 +1 @@ -{"anim": {"Fire": {"Barrel": {"rotation_euler": {"x": [[0.0, 0.0, "CONSTANT"], [-60.019016916301425, 583.3333333333334, "CONSTANT"], [0.0, 816.6666666666666, "CONSTANT"]]}}, "Body": {"location": {"x": [[0.0, 0.0], [-0.03072790987789631, 66.66666666666667], [-0.015153210610151291, 50.0], [0.022971127182245255, 49.999999999999986], [0.0, 133.33333333333334], [-0.07112908363342285, 283.33333333333337], [-0.21566513180732727, 166.66666666666663], [-0.30311062932014465, 166.66666666666663], [0.09931233525276184, 200.0000000000001], [0.09931233525276184, 99.99999999999977], [0.1618872582912445, 33.333333333333485], [0.16223274171352386, 33.33333333333326], [0.08028656989336014, 183.33333333333326], [0.0, 150.00000000000023]], "z": [[-0.0, 0.0], [0.6719817519187927, 66.66666666666667], [0.7913707494735718, 50.0], [0.4098809063434601, 49.999999999999986], [-0.0, 133.33333333333334], [-0.0558139905333519, 283.33333333333337], [-0.33660149574279785, 166.66666666666663], [-0.3699745833873749, 166.66666666666663], [-0.27975839376449585, 200.0000000000001], [-0.27975839376449585, 99.99999999999977], [-0.3401995301246643, 33.333333333333485], [-0.3562721014022827, 33.33333333333326], [-0.2893483638763428, 183.33333333333326], [-0.0, 150.00000000000023]], "y": [[0.0, 0.0], [0.04576312005519867, 66.66666666666667], [-0.05352889001369476, 50.0], [0.05586424842476845, 49.999999999999986], [0.0, 133.33333333333334], [-0.19011610746383667, 283.33333333333337], [-0.17373046278953552, 166.66666666666663], [-0.2395477145910263, 166.66666666666663], [-0.318528413772583, 200.0000000000001], [-0.318528413772583, 99.99999999999977], [-0.5854879021644592, 33.333333333333485], [-0.6872552037239075, 33.33333333333326], [-0.08996553719043732, 183.33333333333326], [0.0, 150.00000000000023]]}, "rotation_euler": {"x": [[0.0, 0.0, "CONSTANT"], [18.96056586236767, 33.333333333333336, "CONSTANT"], [0.0, 200.0, "CONSTANT"], [4.2845085106836525, 350.0, "CONSTANT"], [-4.00202896208485, 699.9999999999999, "CONSTANT"], [29.908722186758006, 116.66666666666674, "CONSTANT"], [0.0, 216.66666666666674, "CONSTANT"]], "z": [[-0.0, 0.0, "CONSTANT"], [-8.923772777989535, 33.333333333333336, "CONSTANT"], [-0.0, 200.0, "CONSTANT"], [1.6447364460089273, 350.0, "CONSTANT"], [-0.729462122284099, 699.9999999999999, "CONSTANT"], [-10.496272716449585, 116.66666666666674, "CONSTANT"], [-0.0, 216.66666666666674, "CONSTANT"]], "y": [[0.0, 0.0, "CONSTANT"], [1.9835915222433687, 33.333333333333336, "CONSTANT"], [0.0, 200.0, "CONSTANT"], [26.651758433868473, 350.0, "CONSTANT"], [17.920975212198584, 699.9999999999999, "CONSTANT"], [19.204354096865643, 116.66666666666674, "CONSTANT"], [0.0, 216.66666666666674, "CONSTANT"]]}}, "ShellL": {"location": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [0.09376272559165955, 49.999999999999886], [0.1621313840150833, 83.33333333333337], [0.17189833521842957, 33.33333333333337], [0.17189833521842957, 50.0], [-0.25194650888442993, 66.66666666666674], [-0.7040476202964783, 149.9999999999999, "CONSTANT"], [-1.641493320465088, 16.66666666666663], [-0.48360228538513184, 66.66666666666674], [-0.0976385846734047, 66.66666666666674], [0.0, 116.66666666666652]], "z": [[-0.0, 0.0], [-0.0, 583.3333333333334], [1.188506007194519, 49.999999999999886], [2.0551249980926514, 83.33333333333337], [2.1789276599884033, 33.33333333333337], [2.1789276599884033, 50.0], [0.6366069316864014, 66.66666666666674], [-1.0085352659225464, 149.9999999999999, "CONSTANT"], [-1.0141838788986206, 16.66666666666663], [0.6391998529434204, 66.66666666666674], [1.1903276443481445, 66.66666666666674], [-0.0, 116.66666666666652]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [0.6720442175865173, 49.999999999999886], [1.162076473236084, 83.33333333333337], [1.2320810556411743, 33.33333333333337], [1.2320810556411743, 50.0], [0.4826660752296448, 66.66666666666674], [-0.3167097568511963, 149.9999999999999, "CONSTANT"], [-1.3532683849334717, 16.66666666666663], [-0.3891531825065613, 66.66666666666674], [-0.0677814781665802, 66.66666666666674], [0.0, 116.66666666666652]]}, "rotation_euler": {"x": [[0.0, 0.0], [0.0, 583.3333333333334, "CONSTANT"], [-5.534420749078115, 166.66666666666663, "CONSTANT"], [7.606445291826578, 166.66666666666663, "CONSTANT"], [0.0, 116.66666666666663, "CONSTANT"]], "z": [[0.0, 0.0], [0.0, 583.3333333333334, "CONSTANT"], [28.371060481933252, 166.66666666666663, "CONSTANT"], [59.14797655182804, 166.66666666666663, "CONSTANT"], [-0.0, 116.66666666666663, "CONSTANT"]], "y": [[0.0, 0.0], [0.0, 583.3333333333334, "CONSTANT"], [-42.628757647896585, 166.66666666666663, "CONSTANT"], [-85.51808701262917, 166.66666666666663, "CONSTANT"], [0.0, 116.66666666666663, "CONSTANT"]]}}, "ShellR": {"location": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [0.16738982498645782, 33.33333333333337], [0.3459389805793762, 66.66666666666663], [0.368257611989975, 33.33333333333326], [0.368257611989975, 66.66666666666674], [0.37765786051750183, 66.66666666666663], [0.3922804296016693, 116.66666666666663, "CONSTANT"], [-1.7031582593917847, 16.66666666666663], [-0.576391339302063, 66.66666666666674], [-0.20080244541168213, 66.66666666666674], [0.0, 116.66666666666674]], "z": [[-0.0, 0.0], [-0.0, 583.3333333333334], [0.7584316730499268, 33.33333333333337], [1.5674254894256592, 66.66666666666663], [1.668549656867981, 33.33333333333326], [1.668549656867981, 66.66666666666674], [0.5923407077789307, 66.66666666666663], [-1.0817619562149048, 116.66666666666663, "CONSTANT"], [-1.004889726638794, 16.66666666666663], [0.6418739557266235, 66.66666666666674], [1.1907953023910522, 66.66666666666674], [-0.0, 116.66666666666674]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [0.45365622639656067, 33.33333333333337], [0.9375561475753784, 66.66666666666663], [0.9980437159538269, 33.33333333333326], [0.9980437159538269, 66.66666666666674], [0.2533489465713501, 66.66666666666663], [-0.9050651788711548, 116.66666666666663, "CONSTANT"], [-1.431460976600647, 16.66666666666663], [-0.5393484830856323, 66.66666666666674], [-0.24197767674922943, 66.66666666666674], [0.0, 116.66666666666674]]}, "rotation_euler": {"x": [[0.0, 0.0], [0.0, 583.3333333333334, "CONSTANT"], [7.528320734326326, 133.33333333333326, "CONSTANT"], [45.55883366975119, 166.66666666666663, "CONSTANT"], [0.0, 100.0, "CONSTANT"]], "z": [[0.0, 0.0], [0.0, 583.3333333333334, "CONSTANT"], [-10.561780207005532, 133.33333333333326, "CONSTANT"], [-11.69752028389453, 166.66666666666663, "CONSTANT"], [-0.0, 100.0, "CONSTANT"]], "y": [[0.0, 0.0], [0.0, 583.3333333333334, "CONSTANT"], [18.100727008133102, 133.33333333333326, "CONSTANT"], [65.2065046097911, 166.66666666666663, "CONSTANT"], [0.0, 100.0, "CONSTANT"]]}}}}, "offset": {}} \ No newline at end of file +{"anim": {"Fire": {"Barrel": {"rotation_euler": {"x": [[0.0, 0.0, "CONSTANT"], [0.0, 466.6666666666667, "CONSTANT"], [-19.363289183757253, 49.99999999999994, "CONSTANT"], [-60.019016916301425, 66.66666666666674, "CONSTANT"], [-60.019016916301425, 683.3333333333331, "CONSTANT"], [-38.91348307905732, 83.33333333333348, "CONSTANT"], [0.0, 50.0, "CONSTANT"]]}}, "BarrelLame": {"rotation_euler": {"x": [[0.0, 0.0], [0.0, 466.6666666666667], [-19.363289183757253, 49.99999999999994], [-60.019016916301425, 66.66666666666674], [-60.019016916301425, 683.3333333333331], [-38.91348307905732, 83.33333333333348], [0.0, 50.0]]}}, "Body": {"location": {"x": [[0.0, 0.0], [-0.03072790987789631, 66.66666666666667], [-0.015153210610151291, 50.0], [0.022971127182245255, 49.999999999999986], [0.0, 133.33333333333334], [-0.07112908363342285, 283.33333333333337], [-0.21566513180732727, 166.66666666666663], [-0.30311062932014465, 166.66666666666663], [0.09931233525276184, 200.0000000000001], [0.09931233525276184, 99.99999999999977], [0.1618872582912445, 33.333333333333485], [0.16223274171352386, 33.33333333333326], [0.08028656989336014, 183.33333333333326], [0.0, 150.00000000000023]], "z": [[-0.0, 0.0], [0.6719817519187927, 66.66666666666667], [0.7913707494735718, 50.0], [0.4098809063434601, 49.999999999999986], [-0.0, 133.33333333333334], [-0.0558139905333519, 283.33333333333337], [-0.33660149574279785, 166.66666666666663], [-0.3699745833873749, 166.66666666666663], [-0.27975839376449585, 200.0000000000001], [-0.27975839376449585, 99.99999999999977], [-0.3401995301246643, 33.333333333333485], [-0.3562721014022827, 33.33333333333326], [-0.2893483638763428, 183.33333333333326], [-0.0, 150.00000000000023]], "y": [[0.0, 0.0], [0.04576312005519867, 66.66666666666667], [-0.05352889001369476, 50.0], [0.05586424842476845, 49.999999999999986], [0.0, 133.33333333333334], [-0.19011610746383667, 283.33333333333337], [-0.17373046278953552, 166.66666666666663], [-0.2395477145910263, 166.66666666666663], [-0.318528413772583, 200.0000000000001], [-0.318528413772583, 99.99999999999977], [-0.5854879021644592, 33.333333333333485], [-0.6872552037239075, 33.33333333333326], [-0.08996553719043732, 183.33333333333326], [0.0, 150.00000000000023]]}, "rotation_euler": {"x": [[0.0, 0.0, "CONSTANT"], [18.96056586236767, 33.333333333333336, "CONSTANT"], [9.480282931183835, 100.0, "CONSTANT"], [0.0, 100.0, "CONSTANT"], [3.672435622364946, 300.0, "CONSTANT"], [4.2845085106836525, 50.0, "CONSTANT"], [1.1277323204173937, 266.66666666666663, "CONSTANT"], [-4.00202896208485, 433.33333333333326, "CONSTANT"], [29.908722186758006, 116.66666666666674, "CONSTANT"], [16.10469643075067, 100.0, "CONSTANT"], [0.0, 116.66666666666674, "CONSTANT"]], "z": [[-0.0, 0.0, "CONSTANT"], [-8.923772777989535, 33.333333333333336, "CONSTANT"], [-4.461886388994768, 100.0, "CONSTANT"], [-0.0, 100.0, "CONSTANT"], [1.4097740965790806, 300.0, "CONSTANT"], [1.6447364460089273, 50.0, "CONSTANT"], [0.7402799146297828, 266.66666666666663, "CONSTANT"], [-0.729462122284099, 433.33333333333326, "CONSTANT"], [-10.496272716449585, 116.66666666666674, "CONSTANT"], [-5.6518389579866275, 100.0, "CONSTANT"], [-0.0, 116.66666666666674, "CONSTANT"]], "y": [[0.0, 0.0, "CONSTANT"], [1.9835915222433687, 33.333333333333336, "CONSTANT"], [0.9917957611216843, 100.0, "CONSTANT"], [0.0, 100.0, "CONSTANT"], [22.84436339614595, 300.0, "CONSTANT"], [26.651758433868473, 50.0, "CONSTANT"], [23.325744883564695, 266.66666666666663, "CONSTANT"], [17.920975212198584, 433.33333333333326, "CONSTANT"], [19.204354096865643, 116.66666666666674, "CONSTANT"], [10.340805658109048, 100.0, "CONSTANT"], [0.0, 116.66666666666674, "CONSTANT"]]}}, "BodyLame": {"location": {"x": [[0.0, 0.0], [-0.03072790987789631, 66.66666666666667], [-0.015153210610151291, 50.0], [0.022971127182245255, 49.999999999999986], [0.0, 133.33333333333334], [-0.07112908363342285, 283.33333333333337], [-0.21566513180732727, 166.66666666666663], [-0.30311062932014465, 166.66666666666663], [0.09931233525276184, 200.0000000000001], [0.09931233525276184, 99.99999999999977], [0.1618872582912445, 33.333333333333485], [0.16223274171352386, 33.33333333333326], [0.08028656989336014, 183.33333333333326], [0.0, 150.00000000000023]], "z": [[-0.0, 0.0], [0.6719817519187927, 66.66666666666667], [0.7913707494735718, 50.0], [0.4098809063434601, 49.999999999999986], [-0.0, 133.33333333333334], [-0.0558139905333519, 283.33333333333337], [-0.33660149574279785, 166.66666666666663], [-0.3699745833873749, 166.66666666666663], [-0.27975839376449585, 200.0000000000001], [-0.27975839376449585, 99.99999999999977], [-0.3401995301246643, 33.333333333333485], [-0.3562721014022827, 33.33333333333326], [-0.2893483638763428, 183.33333333333326], [-0.0, 150.00000000000023]], "y": [[0.0, 0.0], [0.04576312005519867, 66.66666666666667], [-0.05352889001369476, 50.0], [0.05586424842476845, 49.999999999999986], [0.0, 133.33333333333334], [-0.19011610746383667, 283.33333333333337], [-0.17373046278953552, 166.66666666666663], [-0.2395477145910263, 166.66666666666663], [-0.318528413772583, 200.0000000000001], [-0.318528413772583, 99.99999999999977], [-0.5854879021644592, 33.333333333333485], [-0.6872552037239075, 33.33333333333326], [-0.08996553719043732, 183.33333333333326], [0.0, 150.00000000000023]]}, "rotation_euler": {"x": [[0.0, 0.0], [18.96056586236767, 33.333333333333336], [9.480282931183835, 100.0], [0.0, 100.0], [3.672435622364946, 300.0], [4.2845085106836525, 50.0], [1.1277323204173937, 266.66666666666663], [-4.00202896208485, 433.33333333333326], [29.908722186758006, 116.66666666666674], [16.10469643075067, 100.0], [0.0, 116.66666666666674]], "z": [[-0.0, 0.0], [-8.923772777989535, 33.333333333333336], [-4.461886388994768, 100.0], [-0.0, 100.0], [1.4097740965790806, 300.0], [1.6447364460089273, 50.0], [0.7402799146297828, 266.66666666666663], [-0.729462122284099, 433.33333333333326], [-10.496272716449585, 116.66666666666674], [-5.6518389579866275, 100.0], [-0.0, 116.66666666666674]], "y": [[0.0, 0.0], [1.9835915222433687, 33.333333333333336], [0.9917957611216843, 100.0], [0.0, 100.0], [22.84436339614595, 300.0], [26.651758433868473, 50.0], [23.325744883564695, 266.66666666666663], [17.920975212198584, 433.33333333333326], [19.204354096865643, 116.66666666666674], [10.340805658109048, 100.0], [0.0, 116.66666666666674]]}}, "ShellL": {"location": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [0.09376272559165955, 49.999999999999886], [0.1621313840150833, 83.33333333333337], [0.17189833521842957, 33.33333333333337], [0.17189833521842957, 50.0], [-0.25194650888442993, 66.66666666666674], [-0.7040476202964783, 149.9999999999999, "CONSTANT"], [-1.641493320465088, 16.66666666666663], [-0.48360228538513184, 66.66666666666674], [-0.0976385846734047, 66.66666666666674], [0.0, 116.66666666666652]], "z": [[-0.0, 0.0], [-0.0, 583.3333333333334], [1.188506007194519, 49.999999999999886], [2.0551249980926514, 83.33333333333337], [2.1789276599884033, 33.33333333333337], [2.1789276599884033, 50.0], [0.6366069316864014, 66.66666666666674], [-1.0085352659225464, 149.9999999999999, "CONSTANT"], [-1.0141838788986206, 16.66666666666663], [0.6391998529434204, 66.66666666666674], [1.1903276443481445, 66.66666666666674], [-0.0, 116.66666666666652]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [0.6720442175865173, 49.999999999999886], [1.162076473236084, 83.33333333333337], [1.2320810556411743, 33.33333333333337], [1.2320810556411743, 50.0], [0.4826660752296448, 66.66666666666674], [-0.3167097568511963, 149.9999999999999, "CONSTANT"], [-1.3532683849334717, 16.66666666666663], [-0.3891531825065613, 66.66666666666674], [-0.0677814781665802, 66.66666666666674], [0.0, 116.66666666666652]]}, "rotation_euler": {"x": [[0.0, 0.0, "CONSTANT"], [0.0, 583.3333333333334, "CONSTANT"], [-5.534420749078115, 166.66666666666663, "CONSTANT"], [7.606445291826578, 166.66666666666663, "CONSTANT"], [0.0, 116.66666666666663, "CONSTANT"]], "z": [[0.0, 0.0, "CONSTANT"], [0.0, 583.3333333333334, "CONSTANT"], [28.371060481933252, 166.66666666666663, "CONSTANT"], [59.14797655182804, 166.66666666666663, "CONSTANT"], [-0.0, 116.66666666666663, "CONSTANT"]], "y": [[0.0, 0.0, "CONSTANT"], [0.0, 583.3333333333334, "CONSTANT"], [-42.628757647896585, 166.66666666666663, "CONSTANT"], [-85.51808701262917, 166.66666666666663, "CONSTANT"], [0.0, 116.66666666666663, "CONSTANT"]]}}, "ShellLLame": {"location": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [0.09376272559165955, 49.999999999999886], [0.1621313840150833, 83.33333333333337], [0.17189833521842957, 33.33333333333337], [0.17189833521842957, 50.0], [-0.25194650888442993, 66.66666666666674], [-0.7040476202964783, 149.9999999999999, "CONSTANT"], [-1.641493320465088, 16.66666666666663], [-0.48360228538513184, 66.66666666666674], [-0.0976385846734047, 66.66666666666674], [0.0, 116.66666666666652]], "z": [[-0.0, 0.0], [-0.0, 583.3333333333334], [1.188506007194519, 49.999999999999886], [2.0551249980926514, 83.33333333333337], [2.1789276599884033, 33.33333333333337], [2.1789276599884033, 50.0], [0.6366069316864014, 66.66666666666674], [-1.0085352659225464, 149.9999999999999, "CONSTANT"], [-1.0141838788986206, 16.66666666666663], [0.6391998529434204, 66.66666666666674], [1.1903276443481445, 66.66666666666674], [-0.0, 116.66666666666652]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [0.6720442175865173, 49.999999999999886], [1.162076473236084, 83.33333333333337], [1.2320810556411743, 33.33333333333337], [1.2320810556411743, 50.0], [0.4826660752296448, 66.66666666666674], [-0.3167097568511963, 149.9999999999999, "CONSTANT"], [-1.3532683849334717, 16.66666666666663], [-0.3891531825065613, 66.66666666666674], [-0.0677814781665802, 66.66666666666674], [0.0, 116.66666666666652]]}, "rotation_euler": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [-5.534420749078115, 166.66666666666663], [7.606445291826578, 166.66666666666663, "CONSTANT"], [0.0, 116.66666666666663]], "z": [[0.0, 0.0], [0.0, 583.3333333333334], [28.371060481933252, 166.66666666666663], [59.14797655182804, 166.66666666666663, "CONSTANT"], [-0.0, 116.66666666666663]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [-42.628757647896585, 166.66666666666663], [-85.51808701262917, 166.66666666666663, "CONSTANT"], [0.0, 116.66666666666663]]}}, "ShellR": {"location": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [0.16738982498645782, 33.33333333333337], [0.3459389805793762, 66.66666666666663], [0.368257611989975, 33.33333333333326], [0.368257611989975, 66.66666666666674], [0.37765786051750183, 66.66666666666663], [0.3922804296016693, 116.66666666666663, "CONSTANT"], [-1.7031582593917847, 16.66666666666663], [-0.576391339302063, 66.66666666666674], [-0.20080244541168213, 66.66666666666674], [0.0, 116.66666666666674]], "z": [[-0.0, 0.0], [-0.0, 583.3333333333334], [0.7584316730499268, 33.33333333333337], [1.5674254894256592, 66.66666666666663], [1.668549656867981, 33.33333333333326], [1.668549656867981, 66.66666666666674], [0.5923407077789307, 66.66666666666663], [-1.0817619562149048, 116.66666666666663, "CONSTANT"], [-1.004889726638794, 16.66666666666663], [0.6418739557266235, 66.66666666666674], [1.1907953023910522, 66.66666666666674], [-0.0, 116.66666666666674]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [0.45365622639656067, 33.33333333333337], [0.9375561475753784, 66.66666666666663], [0.9980437159538269, 33.33333333333326], [0.9980437159538269, 66.66666666666674], [0.2533489465713501, 66.66666666666663], [-0.9050651788711548, 116.66666666666663, "CONSTANT"], [-1.431460976600647, 16.66666666666663], [-0.5393484830856323, 66.66666666666674], [-0.24197767674922943, 66.66666666666674], [0.0, 116.66666666666674]]}, "rotation_euler": {"x": [[0.0, 0.0, "CONSTANT"], [0.0, 583.3333333333334, "CONSTANT"], [7.528320734326326, 133.33333333333326, "CONSTANT"], [45.55883366975119, 166.66666666666663, "CONSTANT"], [0.0, 100.0, "CONSTANT"]], "z": [[0.0, 0.0, "CONSTANT"], [0.0, 583.3333333333334, "CONSTANT"], [-10.561780207005532, 133.33333333333326, "CONSTANT"], [-11.69752028389453, 166.66666666666663, "CONSTANT"], [-0.0, 100.0, "CONSTANT"]], "y": [[0.0, 0.0, "CONSTANT"], [0.0, 583.3333333333334, "CONSTANT"], [18.100727008133102, 133.33333333333326, "CONSTANT"], [65.2065046097911, 166.66666666666663, "CONSTANT"], [0.0, 100.0, "CONSTANT"]]}}, "ShellRLame": {"location": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [0.16738982498645782, 33.33333333333337], [0.3459389805793762, 66.66666666666663], [0.368257611989975, 33.33333333333326], [0.368257611989975, 66.66666666666674], [0.37765786051750183, 66.66666666666663], [0.3922804296016693, 116.66666666666663, "CONSTANT"], [-1.7031582593917847, 16.66666666666663], [-0.576391339302063, 66.66666666666674], [-0.20080244541168213, 66.66666666666674], [0.0, 116.66666666666674]], "z": [[-0.0, 0.0], [-0.0, 583.3333333333334], [0.7584316730499268, 33.33333333333337], [1.5674254894256592, 66.66666666666663], [1.668549656867981, 33.33333333333326], [1.668549656867981, 66.66666666666674], [0.5923407077789307, 66.66666666666663], [-1.0817619562149048, 116.66666666666663, "CONSTANT"], [-1.004889726638794, 16.66666666666663], [0.6418739557266235, 66.66666666666674], [1.1907953023910522, 66.66666666666674], [-0.0, 116.66666666666674]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [0.45365622639656067, 33.33333333333337], [0.9375561475753784, 66.66666666666663], [0.9980437159538269, 33.33333333333326], [0.9980437159538269, 66.66666666666674], [0.2533489465713501, 66.66666666666663], [-0.9050651788711548, 116.66666666666663, "CONSTANT"], [-1.431460976600647, 16.66666666666663], [-0.5393484830856323, 66.66666666666674], [-0.24197767674922943, 66.66666666666674], [0.0, 116.66666666666674]]}, "rotation_euler": {"x": [[0.0, 0.0], [0.0, 583.3333333333334], [7.528320734326326, 133.33333333333326], [45.55883366975119, 166.66666666666663, "CONSTANT"], [0.0, 100.0]], "z": [[0.0, 0.0], [0.0, 583.3333333333334], [-10.561780207005532, 133.33333333333326], [-11.69752028389453, 166.66666666666663, "CONSTANT"], [-0.0, 100.0]], "y": [[0.0, 0.0], [0.0, 583.3333333333334], [18.100727008133102, 133.33333333333326], [65.2065046097911, 166.66666666666663, "CONSTANT"], [0.0, 100.0]]}}}}, "offset": {}} \ No newline at end of file From 5fce05e5ce31e927114fabca3a77a736de797602 Mon Sep 17 00:00:00 2001 From: George Paton Date: Tue, 20 Feb 2024 10:11:15 +1100 Subject: [PATCH 2/2] Actually add the config option (here is the olive branch. Love ya, even if yer a dingbat) --- src/main/java/com/hbm/config/CommonConfig.java | 1 + src/main/java/com/hbm/config/WeaponConfig.java | 6 ++++++ .../com/hbm/render/item/weapon/ItemRenderWeaponShotty.java | 5 ++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hbm/config/CommonConfig.java b/src/main/java/com/hbm/config/CommonConfig.java index 8d809ccf4..46acd791a 100644 --- a/src/main/java/com/hbm/config/CommonConfig.java +++ b/src/main/java/com/hbm/config/CommonConfig.java @@ -26,6 +26,7 @@ public class CommonConfig { public static final String CATEGORY_STRUCTURES = "15_structures"; public static final String CATEGORY_POLLUTION = "16_pollution"; public static final String CATEGORY_BIOMES = "17_biomes"; + public static final String CATEGORY_WEAPONS = "18_weapons"; public static final String CATEGORY_528 = "528"; public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE"; diff --git a/src/main/java/com/hbm/config/WeaponConfig.java b/src/main/java/com/hbm/config/WeaponConfig.java index 88c3dbdae..290641f86 100644 --- a/src/main/java/com/hbm/config/WeaponConfig.java +++ b/src/main/java/com/hbm/config/WeaponConfig.java @@ -15,6 +15,8 @@ public class WeaponConfig { public static boolean dropStar = true; public static boolean dropCrys = true; public static boolean dropDead = true; + + public static boolean linearAnimations = false; public static void loadFromConfig(Configuration config) { @@ -38,5 +40,9 @@ public class WeaponConfig { dropStar = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.02_dropStar", "Whether rigged star blaster cells should explode when dropped", true); dropCrys = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.04_dropCrys", "Whether xen crystals should move blocks when dropped", true); dropDead = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.05_dropDead", "Whether dead man's explosives should explode when dropped", true); + + final String CATEGORY_WEAPONS = CommonConfig.CATEGORY_WEAPONS; + linearAnimations = CommonConfig.createConfigBool(config, CATEGORY_WEAPONS, "18.00_linearAnimations", "Should heavily stylised weapon animations be replaced with more conventional ones?", false); + } } diff --git a/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java b/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java index 022a0a8a4..bcf4670e2 100644 --- a/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java +++ b/src/main/java/com/hbm/render/item/weapon/ItemRenderWeaponShotty.java @@ -2,6 +2,7 @@ package com.hbm.render.item.weapon; import org.lwjgl.opengl.GL11; +import com.hbm.config.WeaponConfig; import com.hbm.items.weapon.ItemGunBase; import com.hbm.main.ResourceManager; import com.hbm.render.anim.HbmAnimations; @@ -50,9 +51,7 @@ public class ItemRenderWeaponShotty implements IItemRenderer { case EQUIPPED_FIRST_PERSON: - boolean linear = false; // TODO: Config option - - String animSuffix = linear ? "Lame" : ""; + String animSuffix = WeaponConfig.linearAnimations ? "Lame" : ""; GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);