Update #40 - FPS boost and fixed IndexOutOfBoundsException

This commit is contained in:
lax1dude
2024-10-19 16:52:27 -07:00
parent 85f4db5ac6
commit bcd575e87e
79 changed files with 1054 additions and 448 deletions

View File

@ -126,7 +126,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
connectState = SENT_DESCRIPTION;
continue mainLoop;
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}while(EagRuntime.steadyTimeMillis() - lm < 5000l);
// no description was sent
@ -163,7 +163,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
return new LANClientNetworkManager(displayCode, displayRelay);
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}while(EagRuntime.steadyTimeMillis() - lm < 5000l);
// no channel was opened
@ -202,7 +202,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
connectState = SENT_ICE_CANDIDATE;
continue mainLoop;
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}while(EagRuntime.steadyTimeMillis() - lm < 5000l);
// no ice candidates were sent
@ -237,7 +237,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
return null;
}
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}
return null;
}

View File

@ -64,7 +64,7 @@ class LANClientPeer {
disconnect();
return;
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}while(EagRuntime.steadyTimeMillis() - millis < 5000l);
logger.error("Getting server ICE candidates for '{}' timed out!", clientId);
disconnect();
@ -92,7 +92,7 @@ class LANClientPeer {
disconnect();
return;
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}while(EagRuntime.steadyTimeMillis() - millis < 5000l);
logger.error("Getting server description for '{}' timed out!", clientId);
disconnect();
@ -122,7 +122,7 @@ class LANClientPeer {
disconnect();
return;
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}while(EagRuntime.steadyTimeMillis() - millis < 5000l);
logger.error("Getting server description for '{}' timed out!", clientId);
disconnect();

View File

@ -81,7 +81,7 @@ public class LANServerController {
return null;
}
}
EagUtils.sleep(50l);
EagUtils.sleep(50);
}while(EagRuntime.steadyTimeMillis() - millis < 1000l);
logger.info("Relay [{}] relay provide ICE servers timeout", sock.getURI());
closeLAN();

View File

@ -298,10 +298,10 @@ public class RelayManager {
return null;
}
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}
}
EagUtils.sleep(20l);
EagUtils.sleep(20);
}
logger.error("Relay [{}] connection failed!", relay.address);
Throwable t;

View File

@ -81,7 +81,7 @@ public class RelayServer {
public void pingBlocking() {
ping();
while(getPing() < 0l) {
EagUtils.sleep(250l);
EagUtils.sleep(250);
update();
}
}

View File

@ -468,7 +468,7 @@ public class EaglerIntegratedServerWorker {
}
}else {
if(!singleThreadMode) {
EagUtils.sleep(50l);
EagUtils.sleep(50);
}
}
}