This commit is contained in:
Anuken
2022-10-01 18:03:47 -04:00
parent f89e69b2f6
commit 48f143a530
2 changed files with 23 additions and 7 deletions

View File

@@ -338,7 +338,7 @@ public class Weapon implements Cloneable{
mount.bullet.set(bulletX, bulletY);
mount.reload = reload;
mount.recoil = 1f;
unit.vel.add(Tmp.v1.trns(unit.rotation + 180f, mount.bullet.type.recoil));
unit.vel.add(Tmp.v1.trns(unit.rotation + 180f, mount.bullet.type.recoil * Time.delta));
if(shootSound != Sounds.none && !headless){
if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f);
mount.sound.update(bulletX, bulletY, true);

View File

@@ -4,6 +4,9 @@ import arc.*;
import arc.scene.ui.layout.*;
import mindustry.gen.*;
import mindustry.net.Administration.*;
import mindustry.ui.*;
import static mindustry.Vars.*;
public class TraceDialog extends BaseDialog{
@@ -22,12 +25,20 @@ public class TraceDialog extends BaseDialog{
table.defaults().pad(1);
table.defaults().left();
table.add(Core.bundle.format("trace.playername", player.name));
table.row();
table.add(Core.bundle.format("trace.ip", info.ip));
table.row();
table.add(Core.bundle.format("trace.id", info.uuid));
table.row();
var style = Styles.emptyi;
float s = 28f;
table.table(c -> {
c.left().defaults().left();
c.button(Icon.copySmall, style, () -> copy(player.name)).size(s).padRight(4f);
c.add(Core.bundle.format("trace.playername", player.name)).row();
c.button(Icon.copySmall, style, () -> copy(info.ip)).size(s).padRight(4f);
c.add(Core.bundle.format("trace.ip", info.ip)).row();
c.button(Icon.copySmall, style, () -> copy(info.uuid)).size(s).padRight(4f);
c.add(Core.bundle.format("trace.id", info.uuid)).row();
}).row();
table.add(Core.bundle.format("trace.modclient", info.modded));
table.row();
table.add(Core.bundle.format("trace.mobile", info.mobile));
@@ -44,4 +55,9 @@ public class TraceDialog extends BaseDialog{
show();
}
private void copy(String content){
Core.app.setClipboardText(content);
ui.showInfoFade("@copied");
}
}