Improve SSG animations

This commit is contained in:
George Paton 2024-02-20 09:42:38 +11:00
parent 211028b4ef
commit ff713d10bd
2 changed files with 10 additions and 6 deletions

View File

@ -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();
}

File diff suppressed because one or more lines are too long