Weapons are now displayed for players

This commit is contained in:
Anuken
2018-01-06 12:22:05 -05:00
parent 07bc8a04f6
commit 8045c6afb8
7 changed files with 56 additions and 4 deletions
@@ -88,15 +88,28 @@ public class Player extends DestructibleEntity implements Syncable{
}
if((Vars.debug && (!Vars.showPlayer || !Vars.showUI)) || (isAndroid && isLocal)) return;
boolean snap = Vars.snapCamera && Settings.getBool("smoothcam") && Settings.getBool("pixelate") && isLocal;
String part = isAndroid ? "ship" : "mech";
if(Vars.snapCamera && Settings.getBool("smoothcam") && Settings.getBool("pixelate") && isLocal){
if(snap){
Draw.rect(part + "-" + mech.name, (int)x, (int)y, angle-90);
}else{
Draw.rect(part + "-" + mech.name, x, y, angle-90);
}
if(!isAndroid) {
for (boolean b : new boolean[]{true, false}) {
Angles.translation(angle + Mathf.sign(b) * -50f, 3.5f);
String name = b ? weaponLeft.name : weaponRight.name;
float s = 5f;
if(snap){
Draw.rect(name, (int)x + Angles.x(), (int)y + Angles.y(), s, s, angle- 90);
}else{
Draw.rect(name, x + Angles.x(), y + Angles.y(), s, s, angle - 90);
}
}
}
}
@Override