mirror of
https://github.com/nzp-team/Waypoint-Converter.git
synced 2024-11-10 06:31:47 +00:00
Round origin coordinates to 1dp when converting from PC
Fixes incorrect loading of waypoints converted to PSP
This commit is contained in:
parent
e5250b209f
commit
7ee994a55c
1 changed files with 4 additions and 0 deletions
|
@ -131,6 +131,10 @@ def parsePC(oldWayFile):
|
|||
# Replace links to waypoint 0
|
||||
"targets": ["255" if value == "0" else value for value in tempArray[7:-2]]
|
||||
}
|
||||
# Round origin coords to 1 decimal place
|
||||
originCoords = waydict["origin"].strip("'").split()
|
||||
originCoords = [round(float(coord), 1) for coord in originCoords]
|
||||
waydict["origin"] = str(originCoords[0]) + " " + str(originCoords[1]) + " " + str(originCoords[2])
|
||||
# Replace id 0
|
||||
if waydict["id"] == "0":
|
||||
waydict["id"] = "255" # I sure do hope nobody has this many waypoints
|
||||
|
|
Loading…
Reference in a new issue