mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Various bug fixes
- Made canvas fill entire screen - Made window scale to screens that aren't 1920x1080 - Changed boat speeds in mock so they aren't too fast - Added command line options to switch server Tags: #story[829]
This commit is contained in:
@@ -57,7 +57,7 @@ public class StreamParser extends Thread{
|
||||
*/
|
||||
public void run(){
|
||||
try {
|
||||
System.out.println("START OF STREAM");
|
||||
System.out.println("[CLIENT] Start of stream");
|
||||
streamStatus = true;
|
||||
xmlObject = new XMLParser();
|
||||
while (StreamReceiver.packetBuffer == null || StreamReceiver.packetBuffer.size() < 1) {
|
||||
@@ -94,7 +94,7 @@ public class StreamParser extends Thread{
|
||||
*
|
||||
*/
|
||||
public void start () {
|
||||
System.out.println("Starting " + threadName );
|
||||
System.out.println("[CLIENT] Starting " + threadName );
|
||||
if (t == null) {
|
||||
t = new Thread (this, threadName);
|
||||
t.start ();
|
||||
@@ -181,18 +181,18 @@ public class StreamParser extends Thread{
|
||||
currentTimeString = format.format((new Date (currentTime)).getTime());
|
||||
if (timeTillStart > 0) {
|
||||
timeSinceStart = timeTillStart;
|
||||
System.out.println("Time till start: " + timeTillStart + " Seconds");
|
||||
//System.out.println("Time till start: " + timeTillStart + " Seconds");
|
||||
} else {
|
||||
if (raceStatus == 4 || raceStatus == 8){
|
||||
raceFinished = true;
|
||||
raceStarted = false;
|
||||
System.out.println("RACE HAS FINISHED");
|
||||
System.out.println("[CLIENT] Race has finished");
|
||||
} else if (!raceStarted){
|
||||
raceStarted = true;
|
||||
raceFinished = false;
|
||||
System.out.println("RACE HAS STARTED");
|
||||
System.out.println("[CLIENT] Race has started");
|
||||
}
|
||||
System.out.println("Time since start: " + -1 * timeTillStart + " Seconds");
|
||||
//System.out.println("Time since start: " + -1 * timeTillStart + " Seconds");
|
||||
timeSinceStart = timeTillStart;
|
||||
}
|
||||
long windDir = bytesToLong(Arrays.copyOfRange(payload,18,20));
|
||||
|
||||
@@ -24,6 +24,7 @@ public class StreamReceiver extends Thread {
|
||||
|
||||
public StreamReceiver(String hostAddress, int hostPort, String threadName) {
|
||||
this.threadName = threadName;
|
||||
this.setDaemon(true);
|
||||
try {
|
||||
host = new Socket(hostAddress, hostPort);
|
||||
} catch (IOException e) {
|
||||
@@ -44,7 +45,7 @@ public class StreamReceiver extends Thread {
|
||||
}
|
||||
|
||||
public void start () {
|
||||
System.out.println("Starting " + threadName );
|
||||
System.out.println("[CLIENT] Starting " + threadName );
|
||||
if (t == null) {
|
||||
t = new Thread (this, threadName);
|
||||
t.start ();
|
||||
@@ -95,7 +96,6 @@ public class StreamReceiver extends Thread {
|
||||
} catch (Exception e) {
|
||||
moreBytes = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user