Speed scale is 2, rather than 10.
Server simulates frames every 16ms rather than 50ms.
This commit is contained in:
@@ -91,7 +91,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
|||||||
server.parseSnapshot();
|
server.parseSnapshot();
|
||||||
|
|
||||||
|
|
||||||
waitForFramePeriod(previousFrameTime, currentTime, 50);
|
waitForFramePeriod(previousFrameTime, currentTime, 16);
|
||||||
previousFrameTime = currentTime;
|
previousFrameTime = currentTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
|||||||
race.setBoatsStatusToRacing();
|
race.setBoatsStatusToRacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForFramePeriod(previousFrameTime, currentTime, 50);
|
waitForFramePeriod(previousFrameTime, currentTime, 16);
|
||||||
previousFrameTime = currentTime;
|
previousFrameTime = currentTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -206,7 +206,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
|||||||
previousFrameTime = currentTime;
|
previousFrameTime = currentTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForFramePeriod(previousFrameTime, currentTime, 50);
|
waitForFramePeriod(previousFrameTime, currentTime, 16);
|
||||||
previousFrameTime = currentTime;
|
previousFrameTime = currentTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class Constants {
|
|||||||
* Frame periods are multiplied by this to get the amount of time a single frame represents.
|
* Frame periods are multiplied by this to get the amount of time a single frame represents.
|
||||||
* E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred.
|
* E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred.
|
||||||
*/
|
*/
|
||||||
public static final int RaceTimeScale = 10;
|
public static final int RaceTimeScale = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The race pre-start time, in milliseconds. 30 seconds.
|
* The race pre-start time, in milliseconds. 30 seconds.
|
||||||
|
|||||||
Reference in New Issue
Block a user