mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-23 14:30:51 +00:00
Merge pull request #1346 from MellowArpeggiation/master
Improve SSG animations
This commit is contained in:
commit
17adce20bc
@ -26,6 +26,7 @@ public class CommonConfig {
|
|||||||
public static final String CATEGORY_STRUCTURES = "15_structures";
|
public static final String CATEGORY_STRUCTURES = "15_structures";
|
||||||
public static final String CATEGORY_POLLUTION = "16_pollution";
|
public static final String CATEGORY_POLLUTION = "16_pollution";
|
||||||
public static final String CATEGORY_BIOMES = "17_biomes";
|
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_528 = "528";
|
||||||
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";
|
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";
|
||||||
|
|||||||
@ -16,6 +16,8 @@ public class WeaponConfig {
|
|||||||
public static boolean dropCrys = true;
|
public static boolean dropCrys = true;
|
||||||
public static boolean dropDead = true;
|
public static boolean dropDead = true;
|
||||||
|
|
||||||
|
public static boolean linearAnimations = false;
|
||||||
|
|
||||||
public static void loadFromConfig(Configuration config) {
|
public static void loadFromConfig(Configuration config) {
|
||||||
|
|
||||||
final String CATEGORY_MISSILE = CommonConfig.CATEGORY_MISSILE;
|
final String CATEGORY_MISSILE = CommonConfig.CATEGORY_MISSILE;
|
||||||
@ -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);
|
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);
|
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);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.render.item.weapon;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.config.WeaponConfig;
|
||||||
import com.hbm.items.weapon.ItemGunBase;
|
import com.hbm.items.weapon.ItemGunBase;
|
||||||
import com.hbm.main.ResourceManager;
|
import com.hbm.main.ResourceManager;
|
||||||
import com.hbm.render.anim.HbmAnimations;
|
import com.hbm.render.anim.HbmAnimations;
|
||||||
@ -50,15 +51,17 @@ public class ItemRenderWeaponShotty implements IItemRenderer {
|
|||||||
|
|
||||||
case EQUIPPED_FIRST_PERSON:
|
case EQUIPPED_FIRST_PERSON:
|
||||||
|
|
||||||
|
String animSuffix = WeaponConfig.linearAnimations ? "Lame" : "";
|
||||||
|
|
||||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||||
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||||
GL11.glRotatef(-95F, 0.0F, 1.0F, 0.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");
|
ResourceManager.shotty.renderPart("Body");
|
||||||
|
|
||||||
HbmAnimations.applyRelevantTransformation("Barrel");
|
HbmAnimations.applyRelevantTransformation("Barrel" + animSuffix);
|
||||||
ResourceManager.shotty.renderPart("Barrel");
|
ResourceManager.shotty.renderPart("Barrel");
|
||||||
|
|
||||||
// If we've run out of ammo, stop drawing the shells after ejection has completed
|
// If we've run out of ammo, stop drawing the shells after ejection has completed
|
||||||
@ -67,12 +70,12 @@ public class ItemRenderWeaponShotty implements IItemRenderer {
|
|||||||
|
|
||||||
if(ItemGunBase.getBeltSize(player, ItemGunBase.getBeltType(player, item, true)) > 0 || millis < 1000) {
|
if(ItemGunBase.getBeltSize(player, ItemGunBase.getBeltType(player, item, true)) > 0 || millis < 1000) {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
HbmAnimations.applyRelevantTransformation("ShellL");
|
HbmAnimations.applyRelevantTransformation("ShellL" + animSuffix);
|
||||||
ResourceManager.shotty.renderPart("ShellL");
|
ResourceManager.shotty.renderPart("ShellL");
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
HbmAnimations.applyRelevantTransformation("ShellR");
|
HbmAnimations.applyRelevantTransformation("ShellR" + animSuffix);
|
||||||
ResourceManager.shotty.renderPart("ShellR");
|
ResourceManager.shotty.renderPart("ShellR");
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user