This commit is contained in:
ineed bots 2023-12-02 16:34:15 -06:00
parent 5ceeabcc2a
commit 119a8f8639

View File

@ -895,34 +895,6 @@ Round( x )
return y; return y;
} }
/*
Tokenizes a string (strtok has limits...) (only one char tok)
*/
tokenizeLine( line, tok )
{
tokens = [];
token = "";
for ( i = 0; i < line.size; i++ )
{
c = line[i];
if ( c == tok )
{
tokens[tokens.size] = token;
token = "";
continue;
}
token += c;
}
tokens[tokens.size] = token;
return tokens;
}
/* /*
If the string starts with If the string starts with
*/ */
@ -1028,7 +1000,7 @@ readWpsFromFile( mapname )
for ( i = 1; i <= waypointCount; i++ ) for ( i = 1; i <= waypointCount; i++ )
{ {
tokens = tokenizeLine( res.lines[i], "," ); tokens = strtok( res.lines[i], "," );
waypoint = parseTokensIntoWaypoint( tokens ); waypoint = parseTokensIntoWaypoint( tokens );