The start time of the race is no longer scaled by the race speed scalar.

Changed the prestart time to 30 seconds (was 3 minutes).
Changed the preparatory time to 10 seconds (was 1 minute).
Phases: player list +prestart > warning > race view + preparatory + no more joining > started > finished.
This commit is contained in:
fjc40
2017-09-13 12:59:51 +12:00
parent ab96884dc6
commit 2ad947b57d
4 changed files with 9 additions and 13 deletions
@@ -78,8 +78,6 @@ public class Event {
*/
public Event(boolean singlePlayer, int mapIndex) throws EventConstructionException {
// System.out.println(XMLUtilities.validateXML(this.getClass().getClassLoader().getResource("mock/mockXML/iMapLayout.xml").toString()
// , this.getClass().getClassLoader().getResource("mock/mockXML/schema/raceSchema.xsd")));
this.mapIndex = mapIndex;
String raceXMLFile;
String boatsXMLFile = "mock/mockXML/boatTest.xml";
@@ -117,6 +115,7 @@ public class Event {
if(mapIndex==4){
this.raceXML = Event.setRaceXMLAtCurrentTimeToNow(XMLReader.readXMLFileToString(raceXMLFile, StandardCharsets.UTF_8), 1000, 5000);
}
this.boatXML = XMLReader.readXMLFileToString(boatsXMLFile, StandardCharsets.UTF_8);
this.regattaXML = XMLReader.readXMLFileToString(regattaXMLFile, StandardCharsets.UTF_8);
@@ -192,7 +191,6 @@ public class Event {
//TODO remove this after demo on 18th august!
/**
* Sets the xml description of the race to show the race was created now, and starts in 4 minutes
* @param raceXML The race.xml contents.
@@ -209,8 +207,6 @@ public class Event {
long secondsToAdd = millisecondsToAdd / 1000;
//Scale the time using our time scalar.
secondsToAdd = secondsToAdd / Constants.RaceTimeScale;
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
ZonedDateTime creationTime = ZonedDateTime.now();