Cleanup, relocate and split up GuiReplayOverlay

Merge gui resources into one texture
This commit is contained in:
johni0702
2015-05-26 01:07:30 +02:00
parent e031d32d7d
commit 9f3a97f65c
21 changed files with 1002 additions and 845 deletions

View File

@@ -176,6 +176,20 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
}
}
/**
* Set whether this replay sender to operate in sync mode.
* When in sync mode, it will send packets when {@link #sendPacketsTill(int)} is called.
* This call will block until the async worker thread has stopped.
*/
public void setSyncModeAndWait() {
if (!this.asyncMode) return;
this.asyncMode = false;
this.terminate = true;
synchronized (this) {
// This will wait for the worker thread to leave the synchronized code part
}
}
/**
* Return the timestamp of the last packet sent.
* @return The timestamp in milliseconds since the start of the replay