Commit 37d383eb authored by bogdanbear's avatar bogdanbear

Fixed non-starting singleplayer

parent 1c54937a
......@@ -109,21 +109,24 @@ public class LocalGameLoop extends Thread{
/**
* a separate thread which will verify periodically whether the network connection is still alive
* wakes up every 2 seconds, thus it is not a performance issue
* it would have been nice to not have this running when we are in Single Player
*/
private Runnable BrokenConnectionVerifier=new Runnable() {
@Override
public void run() {
while (true) {
if (LocalGameLoop.getInstance().isPlaying) {
//System.out.println("Broken Connection verifier!");
if (getNetworkConnection().isBroken())
GameStarter.initiateBrokenConnectionMeasures();
}
try {
sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (LocalGameLoop.getInstance().isPlaying) {
//System.out.println("Broken Connection verifier!");
if (getNetworkConnection().isBroken())
GameStarter.initiateBrokenConnectionMeasures();
}
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment