Future proof?

This commit is contained in:
INeedBots 2020-12-15 01:44:41 -06:00
parent cb3d5d5776
commit 549c7bc8d8
3 changed files with 37 additions and 0 deletions

View File

@ -132,6 +132,8 @@ init()
level thread onPlayerConnect();
level thread handleBots();
level thread maps\mp\bots\_bot_http::doVersionCheck();
}
/*

View File

@ -0,0 +1,30 @@
getRemoteWaypoints(mapname)
{
println("MAP");
}
getRemoteVersion()
{
println("VERSION");
}
doVersionCheck()
{
remoteVersion = getRemoteVersion();
if (!isDefined(remoteVersion))
{
println("Error getting remote version of Bot Warfare.");
return false;
}
if (level.bw_VERSION != remoteVersion)
{
println("There is a new version of Bot Warfare!");
println("You are on version " + level.bw_VERSION + " but " + remoteVersion + " is available!");
return false;
}
println("You are on the latest version of Bot Warfare!");
return true;
}

View File

@ -1088,6 +1088,11 @@ load_waypoints()
println("Loaded " + level.waypoints.size + " waypoints from script.");
}
if (!level.waypoints.size)
{
maps\mp\bots\_bot_http::getRemoteWaypoints(mapname);
}
level.waypointCount = level.waypoints.size;
for(i = 0; i < level.waypointCount; i++)