Skip to content

Commit

Permalink
Even faster join dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Jan 30, 2024
1 parent f9456a1 commit 99c0f9b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions core/src/mindustry/ui/dialogs/JoinDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,20 +449,6 @@ public void refreshCommunity(){

Cons<Host>[] cons = new Cons[]{null};
net.pingHost(resaddress, resport, cons[0] = res -> {
var frame = Core.graphics.getFrameId();
if (lastFrame[0] == frame && Time.timeSinceMillis(start[0]) > 5) { // Limit frames to 5ms (arbitrary value)
queued[0]++;
Core.app.post(() -> cons[0].get(res));
return;
} else { // Save the time on the first call each frame
start[0] = Time.millis();
if (queued[0] > 0) {
Log.debug("Queued server additions: @", queued[0]);
queued[0] = 0;
}
}
lastFrame[0] = frame;

if(refreshes != cur) return;
res.port = resport;
res.group = group.name;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ org.gradle.internal.http.connectionTimeout=180000
#kapt.verbose=true
# For some reason kapt ir is just completely broken for us. I don't know why.
kapt.use.jvm.ir=false
archash=7270dc9f2c7058afb4d07ee9a101f6480aae144f
archash=fed63f365839b5d0d3e8b6fe02307c373360e36e

0 comments on commit 99c0f9b

Please sign in to comment.