Bugfixes
This commit is contained in:
@@ -612,6 +612,9 @@ public class NetServer implements ApplicationListener{
|
|||||||
unit.vel.set(xVelocity, yVelocity).limit(unit.type().speed);
|
unit.vel.set(xVelocity, yVelocity).limit(unit.type().speed);
|
||||||
long elapsed = Time.timeSinceMillis(con.lastReceivedClientTime);
|
long elapsed = Time.timeSinceMillis(con.lastReceivedClientTime);
|
||||||
float maxSpeed = (boosting ? player.unit().type().boostMultiplier : 1f) * player.unit().type().speed;
|
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;
|
float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.1f;
|
||||||
|
|
||||||
if(con.lastUnit != unit){
|
if(con.lastUnit != unit){
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import mindustry.core.GameState.*;
|
|||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
import mindustry.net.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
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 static class PlayerChatEvent{
|
||||||
public final Player player;
|
public final Player player;
|
||||||
public final String message;
|
public final String message;
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ public class LCanvas extends Table{
|
|||||||
pane.setScrollPercentY(s);
|
pane.setScrollPercentY(s);
|
||||||
pane.updateVisualScroll();
|
pane.updateVisualScroll();
|
||||||
pane.requestScroll();
|
pane.requestScroll();
|
||||||
Core.app.post(() -> pane.requestScroll());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if(toLoad != null){
|
if(toLoad != null){
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import arc.util.*;
|
|||||||
import arc.util.serialization.*;
|
import arc.util.serialization.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.io.legacy.*;
|
import mindustry.io.legacy.*;
|
||||||
@@ -108,6 +109,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
TextButton button = buttons[0] = remote.button("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
TextButton button = buttons[0] = remote.button("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
||||||
if(!buttons[0].childrenPressed()){
|
if(!buttons[0].childrenPressed()){
|
||||||
if(server.lastHost != null){
|
if(server.lastHost != null){
|
||||||
|
Events.fire(new ClientPreConnectEvent(server.lastHost));
|
||||||
safeConnect(server.ip, server.port, server.lastHost.version);
|
safeConnect(server.ip, server.port, server.lastHost.version);
|
||||||
}else{
|
}else{
|
||||||
connect(server.ip, server.port);
|
connect(server.ip, server.port);
|
||||||
|
|||||||
Reference in New Issue
Block a user