From ceb65bbc22fce2ea95ed9a57da702f25ffa2d15f Mon Sep 17 00:00:00 2001 From: INeedBots Date: Fri, 25 Sep 2020 03:57:45 -0600 Subject: [PATCH] up too date with mw2 --- main_shared/maps/mp/bots/_bot.gsc | 23 +---------------------- main_shared/maps/mp/bots/_bot_http.gsc | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/main_shared/maps/mp/bots/_bot.gsc b/main_shared/maps/mp/bots/_bot.gsc index d77f48f..f3eaa8d 100644 --- a/main_shared/maps/mp/bots/_bot.gsc +++ b/main_shared/maps/mp/bots/_bot.gsc @@ -109,28 +109,7 @@ 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; + level thread maps\mp\bots\_bot_http::doVersionCheck(); } /* diff --git a/main_shared/maps/mp/bots/_bot_http.gsc b/main_shared/maps/mp/bots/_bot_http.gsc index f4b0b4d..0c7b1bf 100644 --- a/main_shared/maps/mp/bots/_bot_http.gsc +++ b/main_shared/maps/mp/bots/_bot_http.gsc @@ -7,3 +7,24 @@ 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; +}