Added in windangle for rotated map as it had been lost through merge. #story[1188]

main
Fan-Wu Yang 8 years ago
parent 1b946b6807
commit 92500e13ee

@ -108,6 +108,8 @@ public class Event {
boatsXMLFile = "mock/mockXML/boatsSinglePlayer.xml";
}
double windAngle = 300;
//Read XML files.
try {
//this.raceXML = RaceXMLCreator.alterRaceToWind(raceXMLFile, 90);
@ -116,7 +118,7 @@ public class Event {
//this.raceXML = Event.setRaceXMLAtCurrentTimeToNow(XMLReader.readXMLFileToString(raceXMLFile, StandardCharsets.UTF_8), 1000, 5000);
this.raceXML = RaceXMLCreator.alterRaceToWind(this.raceXML, XMLFileType.Contents, -1, true);
} else {
this.raceXML = RaceXMLCreator.alterRaceToWind(this.raceXML, XMLFileType.Contents, 300, false);
this.raceXML = RaceXMLCreator.alterRaceToWind(this.raceXML, XMLFileType.Contents, windAngle, false);
}
this.boatXML = XMLReader.readXMLFileToString(boatsXMLFile, StandardCharsets.UTF_8);
@ -149,7 +151,7 @@ public class Event {
this.latestMessages = new LatestMessages();
WindGenerator windGenerator = new ShiftingWindGenerator(
Bearing.fromDegrees(225),
Bearing.fromDegrees(windAngle),
12
);

Loading…
Cancel
Save