diff --git a/LuaScripts/Rotu-R/waypoints.gsc b/LuaScripts/Rotu-R/waypoints.gsc index efd08dc..679a170 100644 --- a/LuaScripts/Rotu-R/waypoints.gsc +++ b/LuaScripts/Rotu-R/waypoints.gsc @@ -27,15 +27,20 @@ float(number){ loadWaypoints() { + fileName = "waypoints/"+ toLower(getDvar("mapname")) + "_wp.csv"; + fileNameLua = getDvar( "fs_game" ) + "/" + fileName; + if( isDefined( level.waypoints ) && level.waypoints.size > 0 ){ // In case the map has loaded its own waypoints already + if( !FS_TestFile( fileName ) ) + dumpWp( fileName ); + loadWaypoints_Internal( fileNameLua ); return; } - + level.waypoints = []; level.waypointCount = 0; level.waypointLoops = 0; - fileName = "waypoints/"+ toLower(getDvar("mapname")) + "_wp.csv"; /# printLn( "Getting waypoints from csv: "+fileName ); #/ level.waypointCount = int( tableLookup(fileName, 0, 0, 1) ); @@ -61,7 +66,12 @@ loadWaypoints() for( j=0; j