Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
the_dungeon_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
37d383eb
Commit
37d383eb
authored
Jan 06, 2016
by
bogdanbear
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed non-starting singleplayer
parent
1c54937a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/gameloop/LocalGameLoop.java
src/gameloop/LocalGameLoop.java
+8
-5
No files found.
src/gameloop/LocalGameLoop.java
View file @
37d383eb
...
...
@@ -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
();
}
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment