Added extra checks to see if they help server duplication
This commit is contained in:
@@ -4279,7 +4279,7 @@ public class Blocks{
|
|||||||
hitSize = 7f;
|
hitSize = 7f;
|
||||||
shootEffect = sfe;
|
shootEffect = sfe;
|
||||||
smokeEffect = Fx.shootBigSmoke;
|
smokeEffect = Fx.shootBigSmoke;
|
||||||
ammoMultiplier = 1;
|
ammoMultiplier = 2;
|
||||||
reloadMultiplier = 1f;
|
reloadMultiplier = 1f;
|
||||||
pierceCap = 4;
|
pierceCap = 4;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
|
|||||||
@@ -680,6 +680,8 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
Http.get(urls[index])
|
Http.get(urls[index])
|
||||||
.error(t -> {
|
.error(t -> {
|
||||||
|
if(fetchedServers) return;
|
||||||
|
|
||||||
if(index < urls.length - 1){
|
if(index < urls.length - 1){
|
||||||
//attempt fetching from the next URL upon failure
|
//attempt fetching from the next URL upon failure
|
||||||
fetchServers(urls, index + 1);
|
fetchServers(urls, index + 1);
|
||||||
@@ -688,10 +690,14 @@ public class JoinDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.submit(result -> {
|
.submit(result -> {
|
||||||
|
if(fetchedServers) return;
|
||||||
|
|
||||||
String text = result.getResultAsString();
|
String text = result.getResultAsString();
|
||||||
Seq<ServerGroup> servers = parseServerString(text);
|
Seq<ServerGroup> servers = parseServerString(text);
|
||||||
//modify default servers on main thread
|
//modify default servers on main thread
|
||||||
Core.app.post(() -> {
|
Core.app.post(() -> {
|
||||||
|
if(fetchedServers) return;
|
||||||
|
|
||||||
//cache the server list to a file, so it can be loaded in case of an outage later
|
//cache the server list to a file, so it can be loaded in case of an outage later
|
||||||
try{
|
try{
|
||||||
serverCacheFile.writeString(text);
|
serverCacheFile.writeString(text);
|
||||||
|
|||||||
Reference in New Issue
Block a user