mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-22 10:15:44 +00:00
kk
This commit is contained in:
parent
eda726f6da
commit
adab91aa23
@ -8,6 +8,8 @@
|
||||
*/
|
||||
init()
|
||||
{
|
||||
level.bw_VERSION = "1.0.0";
|
||||
|
||||
thread load_waypoints();
|
||||
cac_init_patch();
|
||||
thread hook_callbacks();
|
||||
@ -97,6 +99,29 @@ init()
|
||||
|
||||
level thread onPlayerConnect();
|
||||
level thread handleBots();
|
||||
|
||||
level thread doVersionCheck();
|
||||
}
|
||||
|
||||
doVersionCheck()
|
||||
{
|
||||
remoteVersion = maps\mp\bots\_bot_http::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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
9
main_shared/maps/mp/bots/_bot_http.gsc
Normal file
9
main_shared/maps/mp/bots/_bot_http.gsc
Normal file
@ -0,0 +1,9 @@
|
||||
getRemoteWaypoints(mapname)
|
||||
{
|
||||
println("MAP");
|
||||
}
|
||||
|
||||
getRemoteVersion()
|
||||
{
|
||||
println("VERSION");
|
||||
}
|
@ -763,6 +763,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++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user