mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-27 16:00:51 -07:00
Bugfixes
This commit is contained in:
parent
69c04ea90d
commit
7e0391a8a0
4 changed files with 14 additions and 1 deletions
|
|
@ -612,6 +612,9 @@ public class NetServer implements ApplicationListener{
|
|||
unit.vel.set(xVelocity, yVelocity).limit(unit.type().speed);
|
||||
long elapsed = Time.timeSinceMillis(con.lastReceivedClientTime);
|
||||
float maxSpeed = (boosting ? player.unit().type().boostMultiplier : 1f) * player.unit().type().speed;
|
||||
if(unit.isGrounded()){
|
||||
maxSpeed *= unit.floorSpeedMultiplier();
|
||||
}
|
||||
float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.1f;
|
||||
|
||||
if(con.lastUnit != unit){
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import mindustry.core.GameState.*;
|
|||
import mindustry.ctype.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.net.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
|
|
@ -87,6 +88,14 @@ public class EventType{
|
|||
}
|
||||
}
|
||||
|
||||
public static class ClientPreConnectEvent{
|
||||
public final Host host;
|
||||
|
||||
public ClientPreConnectEvent(Host host){
|
||||
this.host = host;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerChatEvent{
|
||||
public final Player player;
|
||||
public final String message;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ public class LCanvas extends Table{
|
|||
pane.setScrollPercentY(s);
|
||||
pane.updateVisualScroll();
|
||||
pane.requestScroll();
|
||||
Core.app.post(() -> pane.requestScroll());
|
||||
});
|
||||
|
||||
if(toLoad != null){
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import arc.util.*;
|
|||
import arc.util.serialization.*;
|
||||
import mindustry.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.io.legacy.*;
|
||||
|
|
@ -108,6 +109,7 @@ public class JoinDialog extends BaseDialog{
|
|||
TextButton button = buttons[0] = remote.button("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
||||
if(!buttons[0].childrenPressed()){
|
||||
if(server.lastHost != null){
|
||||
Events.fire(new ClientPreConnectEvent(server.lastHost));
|
||||
safeConnect(server.ip, server.port, server.lastHost.version);
|
||||
}else{
|
||||
connect(server.ip, server.port);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue