[Download]: Update Download.cpp

This commit is contained in:
FutureRave 2022-11-26 19:28:49 +00:00
parent 3d1e354c14
commit 0b2cca4cb6
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31
4 changed files with 0 additions and 15 deletions

View File

@ -1,5 +1,4 @@
#include <STDInclude.hpp> #include <STDInclude.hpp>
#include "GSC/Script.hpp"
#include <mongoose.h> #include <mongoose.h>
@ -715,9 +714,6 @@ namespace Components
Dvar::Register<bool>("sv_wwwDownload", false, Game::DVAR_NONE, "Set to true to enable downloading maps/mods from an external server."); Dvar::Register<bool>("sv_wwwDownload", false, Game::DVAR_NONE, "Set to true to enable downloading maps/mods from an external server.");
Dvar::Register<const char*>("sv_wwwBaseUrl", "", Game::DVAR_NONE, "Set to the base url for the external map download."); Dvar::Register<const char*>("sv_wwwBaseUrl", "", Game::DVAR_NONE, "Set to the base url for the external map download.");
}, Scheduler::Pipeline::MAIN); }, Scheduler::Pipeline::MAIN);
Script::AddFunction("HttpGet", Script::ShowDeprecationWarning);
Script::AddFunction("HttpCancel", Script::ShowDeprecationWarning);
} }
Download::~Download() Download::~Download()

View File

@ -18,14 +18,6 @@ namespace Components
std::unordered_map<std::string, int> Script::ScriptMainHandles; std::unordered_map<std::string, int> Script::ScriptMainHandles;
std::unordered_map<std::string, int> Script::ScriptInitHandles; std::unordered_map<std::string, int> Script::ScriptInitHandles;
void Script::ShowDeprecationWarning()
{
Toast::Show("cardicon_gumby", "WARNING!", "You are using deprecated HttpGet/HttpCancel GSC function.", 2048);
Logger::Print(Game::CON_CHANNEL_SCRIPT, "*** DEPRECATION WARNING ***\n");
Logger::PrintError(Game::CON_CHANNEL_ERROR, "Attempted to execute deprecated built-in HttpGet/HttpCancel! These functions have been deemed unsafe and are scheduled for removal. Please update your mod!\n");
Logger::Print(Game::CON_CHANNEL_SCRIPT, "***************************\n");
}
void Script::FunctionError() void Script::FunctionError()
{ {
const auto* funcName = Game::SL_ConvertToString(FunctionName); const auto* funcName = Game::SL_ConvertToString(FunctionName);

View File

@ -14,8 +14,6 @@ namespace Components
static const char* GetCodePosForParam(int index); static const char* GetCodePosForParam(int index);
static void ShowDeprecationWarning();
// Probably a macro 'originally' but this is fine // Probably a macro 'originally' but this is fine
static Game::gentity_s* Scr_GetPlayerEntity(Game::scr_entref_t entref) static Game::gentity_s* Scr_GetPlayerEntity(Game::scr_entref_t entref)
{ {

View File

@ -1,5 +1,4 @@
#include <STDInclude.hpp> #include <STDInclude.hpp>
#include "Game/Engine/LargeLocal.hpp"
namespace Components namespace Components
{ {