diff --git a/core/LibrarySys.cpp b/core/LibrarySys.cpp index 3615298f..23fefc25 100644 --- a/core/LibrarySys.cpp +++ b/core/LibrarySys.cpp @@ -285,14 +285,16 @@ void LibrarySystem::GetPlatformErrorEx(int code, char *error, size_t maxlength) if (error && maxlength) { #if defined PLATFORM_WINDOWS - FormatMessageA( - FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - (DWORD)code, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)error, - maxlength, - NULL); + if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + (DWORD)code, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)error, + maxlength, + NULL) == 0) + { + UTIL_Format(error, maxlength, "error code %08x", code); + } #elif defined PLATFORM_LINUX const char *ae = strerror_r(code, error, maxlength); if (ae != error) diff --git a/core/Makefile b/core/Makefile index d68423c5..2ba4c8b8 100644 --- a/core/Makefile +++ b/core/Makefile @@ -19,7 +19,7 @@ OBJECTS = AdminCache.cpp CDataPack.cpp ConCmdManager.cpp ConVarManager.cpp CoreC sourcemm_api.cpp sourcemod.cpp MenuStyle_Base.cpp MenuStyle_Valve.cpp MenuManager.cpp \ MenuStyle_Radio.cpp ChatTriggers.cpp ADTFactory.cpp MenuVoting.cpp sm_crc32.cpp \ frame_hooks.cpp concmd_cleaner.cpp Profiler.cpp PhraseCollection.cpp NextMap.cpp \ - NativeOwner.cpp TagsSystem.cpp + NativeOwner.cpp OBJECTS += smn_admin.cpp smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \ smn_datapacks.cpp smn_entities.cpp smn_events.cpp smn_fakenatives.cpp \ smn_filesystem.cpp smn_float.cpp smn_functions.cpp smn_gameconfigs.cpp smn_halflife.cpp \ diff --git a/core/TagsSystem.cpp b/core/TagsSystem.cpp deleted file mode 100644 index 93615368..00000000 --- a/core/TagsSystem.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/** -* vim: set ts=4 : -* ============================================================================= -* SourceMod -* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. -* ============================================================================= -* -* This program is free software; you can redistribute it and/or modify it under -* the terms of the GNU General Public License, version 3.0, as published by the -* Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -* details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see . -* -* As a special exception, AlliedModders LLC gives you permission to link the -* code of this program (as well as its derivative works) to "Half-Life 2," the -* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software -* by the Valve Corporation. You must obey the GNU General Public License in -* all respects for all other code used. Additionally, AlliedModders LLC grants -* this exception to all derivative works. AlliedModders LLC defines further -* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), -* or . -* -* Version: $Id$ -*/ - -#include "TagsSystem.h" -#include "sourcemod.h" -#include "sourcemm_api.h" -#include "sm_stringutil.h" -#include "PluginSys.h" -#include "compat_wrappers.h" - -TagHandler g_Tags; - -TagHandler::TagHandler() -{ - m_SvTags = NULL; -} - -TagHandler::~TagHandler() -{ - SourceHook::List::iterator iter = m_TagList.begin(); - - while (iter != m_TagList.end()) - { - g_pMemAlloc->Free(*iter); - iter = m_TagList.erase(iter); - } -} - -void TagHandler::OnSourceModAllInitialized_Post() -{ - g_PluginSys.AddPluginsListener(this); - - m_SvTags = icvar->FindVar("sv_tags"); - AddTag("sourcemod"); -} - -void TagHandler::OnSourceModLevelActivated() -{ - SourceHook::List::iterator iter = m_TagList.begin(); - - while (iter != m_TagList.end()) - { - ApplyTag(*iter); - iter++; - } -} - -void TagHandler::OnSourceModShutdown() -{ - RemoveTag("sourcemod"); -} - -void TagHandler::OnPluginDestroyed(IPlugin *plugin) -{ - SourceHook::List *pList = NULL; - - if (!plugin->GetProperty("ServerTags", (void **)&pList, false) || !pList) - { - return; - } - - SourceHook::List::iterator iter = pList->begin(); - - while (iter != pList->end()) - { - RemoveTag(*iter); - g_pMemAlloc->Free(*iter); - iter = pList->erase(iter); - } - - delete pList; -} - -bool TagHandler::AddTag(const char *addTag) -{ - SourceHook::List::iterator iter = m_TagList.begin(); - - while (iter != m_TagList.end()) - { - if (strcmp(*iter, addTag) == 0) - { - return false; - } - } - - m_TagList.push_back(strdup(addTag)); - ApplyTag(addTag); - - return true; -} - -bool TagHandler::RemoveTag(const char *removeTag) -{ - SourceHook::List::iterator iter = m_TagList.begin(); - - while (iter != m_TagList.end()) - { - if (strcmp(*iter, removeTag) == 0) - { - g_pMemAlloc->Free(*iter); - m_TagList.erase(iter); - StripTag(removeTag); - - return true; - } - } - - return false; -} - -void TagHandler::ApplyTag(const char *addTag) -{ - if (m_SvTags == NULL) - { - return; - } - - const char *curTags = m_SvTags->GetString(); - - if (strstr(curTags, addTag) != NULL) - { - /* Already tagged */ - return; - } - - if (curTags[0] == '\0') - { - m_SvTags->SetValue(addTag); - return; - } - - /* New tags buffer (+2 for , and null char) */ - size_t newLen = strlen(curTags) + strlen(addTag) + 2; - char *newTags = (char *)alloca(newLen); - - g_SourceMod.Format(newTags, newLen, "%s,%s", curTags, addTag); - - m_SvTags->SetValue(newTags); -} - -void TagHandler::StripTag(const char *removeTag) -{ - if (m_SvTags == NULL) - { - return; - } - - const char *curTags = m_SvTags->GetString(); - - if (strcmp(curTags, removeTag) == 0) - { - m_SvTags->SetValue(""); - return; - } - - char *newTags = strdup(curTags); - size_t searchLen = strlen(removeTag) + 2; - char *search = (char *)alloca(searchLen); - - if (strncmp(curTags, removeTag, strlen(removeTag)) == 0) - { - strcpy(search, removeTag); - search[searchLen-2] = ','; - search[searchLen-1] = '\0'; - } - else - { - strcpy(search+1, removeTag); - search[0] = ','; - search[searchLen-1] = '\0'; - } - - UTIL_ReplaceAll(newTags, strlen(newTags) + 1, search, "" , true); - - m_SvTags->SetValue(newTags); - - g_pMemAlloc->Free(newTags); -} diff --git a/core/TagsSystem.h b/core/TagsSystem.h deleted file mode 100644 index 2f8337a8..00000000 --- a/core/TagsSystem.h +++ /dev/null @@ -1,71 +0,0 @@ -/** -* vim: set ts=4 : -* ============================================================================= -* SourceMod -* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. -* ============================================================================= -* -* This program is free software; you can redistribute it and/or modify it under -* the terms of the GNU General Public License, version 3.0, as published by the -* Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -* details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see . -* -* As a special exception, AlliedModders LLC gives you permission to link the -* code of this program (as well as its derivative works) to "Half-Life 2," the -* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software -* by the Valve Corporation. You must obey the GNU General Public License in -* all respects for all other code used. Additionally, AlliedModders LLC grants -* this exception to all derivative works. AlliedModders LLC defines further -* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), -* or . -* -* Version: $Id$ -*/ - -#ifndef _INCLUDE_SOURCEMOD_TAGSSYSTEM_H_ -#define _INCLUDE_SOURCEMOD_TAGSSYSTEM_H_ - -#include "sm_globals.h" -#include "sh_list.h" -#include "convar.h" -#include "IPluginSys.h" - -class TagHandler : - public SMGlobalClass, - public IPluginsListener -{ -public: - TagHandler(); - ~TagHandler(); - -public: // SMGlobalClass - void OnSourceModAllInitialized_Post(); - void OnSourceModLevelActivated(); - void OnSourceModShutdown(); - -public: // IPluginsListener - void OnPluginDestroyed(IPlugin *plugin); - -public: - bool AddTag(const char *addTag); - bool RemoveTag(const char *removeTag); - -private: - void ApplyTag(const char *addTag); - void StripTag(const char *removeTag); - -private: - SourceHook::Listm_TagList; - ConVar *m_SvTags; -}; - -extern TagHandler g_Tags; - -#endif // _INCLUDE_SOURCEMOD_TAGSSYSTEM_H_ diff --git a/core/msvc9/sourcemod_mm.vcproj b/core/msvc9/sourcemod_mm.vcproj index 2da543f3..2f939677 100644 --- a/core/msvc9/sourcemod_mm.vcproj +++ b/core/msvc9/sourcemod_mm.vcproj @@ -1512,10 +1512,6 @@ RelativePath="..\sourcemod.cpp" > - - @@ -1754,10 +1750,6 @@ RelativePath="..\sourcemod.h" > - - diff --git a/core/smn_console.cpp b/core/smn_console.cpp index 19d9d5ef..0b3ad242 100644 --- a/core/smn_console.cpp +++ b/core/smn_console.cpp @@ -43,7 +43,6 @@ #include #include #include -#include "TagsSystem.h" #if SOURCE_ENGINE == SE_LEFT4DEAD #define NET_SETCONVAR 6 @@ -1307,55 +1306,11 @@ static cell_t SendConVarValue(IPluginContext *pContext, const cell_t *params) static cell_t AddServerTag(IPluginContext *pContext, const cell_t *params) { - char *value; - pContext->LocalToString(params[1], &value); - - if (!g_Tags.AddTag(value)) - { - return 0; - } - - IPlugin *pPlugin = g_PluginSys.FindPluginByContext(pContext->GetContext()); - SourceHook::List *pList = NULL; - - if (!pPlugin->GetProperty("ServerTags", (void **)&pList, false) || !pList) - { - pList = new SourceHook::List; - pPlugin->SetProperty("ServerTags", pList); - } - - pList->push_back(strdup(value)); - - return 1; + return 0; } static cell_t RemoveServerTag(IPluginContext *pContext, const cell_t *params) { - char *value; - pContext->LocalToString(params[1], &value); - - IPlugin *pPlugin = g_PluginSys.FindPluginByContext(pContext->GetContext()); - SourceHook::List *pList = NULL; - - if (!pPlugin->GetProperty("ServerTags", (void **)&pList, false) || !pList) - { - pList = new SourceHook::List; - pPlugin->SetProperty("ServerTags", pList); - } - - SourceHook::List::iterator iter = pList->begin(); - - while (iter != pList->end()) - { - if (strcmp(*iter, value) == 0) - { - g_pMemAlloc->Free(*iter); - pList->erase(iter); - - return g_Tags.RemoveTag(value); - } - } - return 0; } diff --git a/extensions/bintools/msvc9/bintools.vcproj b/extensions/bintools/msvc9/bintools.vcproj index 7688b363..8043ea47 100644 --- a/extensions/bintools/msvc9/bintools.vcproj +++ b/extensions/bintools/msvc9/bintools.vcproj @@ -47,7 +47,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -127,7 +127,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook";"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;SOURCE_ENGINE=3" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -209,7 +209,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" WarningLevel="3" DebugInformationFormat="4" /> @@ -282,7 +282,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" WarningLevel="3" DebugInformationFormat="4" /> @@ -355,7 +355,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" WarningLevel="3" DebugInformationFormat="4" /> @@ -428,7 +428,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook";"$(HL2SDKL4D)\public";"$(HL2SDKL4D)\public\tier0";"$(HL2SDKL4D)\public\tier1"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;SOURCE_ENGINE=4" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -510,7 +510,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;"$(MMSOURCE17)\core\sourcehook";"$(HL2SDK)\public";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -592,7 +592,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook";"$(HL2SDK)\public";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -674,7 +674,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" WarningLevel="3" DebugInformationFormat="4" /> @@ -747,7 +747,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\jit;..\..\..\public\jit\x86;..\..\..\public\extensions;..\..\..\public\sourcepawn;"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook";"$(HL2SDK-DARKM)\public";"$(HL2SDK-DARKM)\public\tier0";"$(HL2SDK-DARKM)\public\tier1"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BINTOOLS_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;HOOKING_ENABLED;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/extensions/clientprefs/msvc9/clientprefs.vcproj b/extensions/clientprefs/msvc9/clientprefs.vcproj index fb2429ba..005fa16f 100644 --- a/extensions/clientprefs/msvc9/clientprefs.vcproj +++ b/extensions/clientprefs/msvc9/clientprefs.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -124,7 +124,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/extensions/cstrike/msvc9/cstrike.vcproj b/extensions/cstrike/msvc9/cstrike.vcproj index e5d130ea..1a6c04e8 100644 --- a/extensions/cstrike/msvc9/cstrike.vcproj +++ b/extensions/cstrike/msvc9/cstrike.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -125,7 +125,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -207,7 +207,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -286,7 +286,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -368,7 +368,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -447,7 +447,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/extensions/curl/curl-src/lib/build_libcurl.vcproj b/extensions/curl/curl-src/lib/build_libcurl.vcproj index 5597940f..2ab26d4d 100644 --- a/extensions/curl/curl-src/lib/build_libcurl.vcproj +++ b/extensions/curl/curl-src/lib/build_libcurl.vcproj @@ -136,7 +136,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".,..\include" - PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;CURL_DISABLE_LDAP" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" diff --git a/extensions/curl/msvc9/curl.vcproj b/extensions/curl/msvc9/curl.vcproj index a2a55b84..780607c9 100644 --- a/extensions/curl/msvc9/curl.vcproj +++ b/extensions/curl/msvc9/curl.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -64,7 +64,7 @@ /> AddDependency(myself, "webternet.ext", true, true); SM_GET_IFACE(WEBTERNET, webternet); + + const char *url = smutils->GetCoreConfigValue("AutoUpdateURL"); + if (url == NULL) + { + url = DEFAULT_UPDATE_URL; + } + update_url.assign(url); ThreadParams params; params.flags = Thread_Default; @@ -67,13 +74,6 @@ bool SmUpdater::SDK_OnLoad(char *error, size_t maxlength, bool late) return false; } - const char *url = smutils->GetCoreConfigValue("AutoUpdateURL"); - if (url == NULL) - { - url = DEFAULT_UPDATE_URL; - } - update_url.assign(url); - return true; } @@ -139,7 +139,7 @@ static void PumpUpdate(void *data) smutils->BuildPath(Path_SM, path, sizeof(path), "gamedata/%s", part->file); if (libsys->IsPathDirectory(path)) { - continue; + goto skip_create; } if (!libsys->CreateFolder(path)) { @@ -157,7 +157,7 @@ static void PumpUpdate(void *data) if (fp == NULL) { AddUpdateError("Could not open %s for writing", path); - return; + goto skip_create; } if (fwrite(part->data, 1, part->length, fp) != part->length) { diff --git a/extensions/updater/msvc9/updater.vcproj b/extensions/updater/msvc9/updater.vcproj index 20d0cef5..46d62536 100644 --- a/extensions/updater/msvc9/updater.vcproj +++ b/extensions/updater/msvc9/updater.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -124,7 +124,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;ORANGEBOX_BUILD;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -206,7 +206,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -286,7 +286,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -369,7 +369,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -449,7 +449,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -532,7 +532,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -612,7 +612,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDKL4D)\public";"$(HL2SDKL4D)\public\engine";"$(HL2SDKL4D)\public\game\server";"$(HL2SDKL4D)\public\tier0";"$(HL2SDKL4D)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -695,7 +695,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -775,7 +775,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/loader/msvc9/loader.vcproj b/loader/msvc9/loader.vcproj index 095c7b03..0d0fb1e3 100644 --- a/loader/msvc9/loader.vcproj +++ b/loader/msvc9/loader.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -124,7 +124,7 @@ AdditionalIncludeDirectories="..;"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LOADER_EXPORTS;_CRT_SECURE_NO_DEPRECATE" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/plugins/include/console.inc b/plugins/include/console.inc index 2130c30e..9d710e50 100644 --- a/plugins/include/console.inc +++ b/plugins/include/console.inc @@ -817,9 +817,11 @@ native bool:FindNextConCommand(Handle:search, String:buffer[], max_size, &bool:i native bool:SendConVarValue(client, Handle:convar, const String:value[]); /** - * Appends a string to Valve's sv_tags convar and makes sure it remains after mapchanges. + * Adds an informational string to the server's public "tags". + * This string should be a short, unique identifier. * - * Note: Tags are automatically removed on plugin unload + * Note: Tags are automatically removed when a plugin unloads. + * Note: Currently, this function does nothing because of bugs in the Valve master. * * @param tag Tag string to append. * @noreturn @@ -827,9 +829,7 @@ native bool:SendConVarValue(client, Handle:convar, const String:value[]); native AddServerTag(const String:tag[]); /** - * Removes a string from valve's sv_tags convar. - * - * Note: You can only remove tags created by you. + * Removes a tag previously added by the calling plugin. * * @param tag Tag string to remove. * @noreturn diff --git a/public/sample_ext/msvc9/sdk.vcproj b/public/sample_ext/msvc9/sdk.vcproj index 9a0a159f..f18f6699 100644 --- a/public/sample_ext/msvc9/sdk.vcproj +++ b/public/sample_ext/msvc9/sdk.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -124,7 +124,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;ORANGEBOX_BUILD" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -206,7 +206,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -286,7 +286,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core-legacy";"$(MMSOURCE17)\core-legacy\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -369,7 +369,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -449,7 +449,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDK-DARKM)\public";"$(HL2SDK-DARKM)\public\dlls";"$(HL2SDK-DARKM)\public\engine";"$(HL2SDK-DARKM)\public\tier0";"$(HL2SDK-DARKM)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -532,7 +532,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -612,7 +612,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDKOB)\public";"$(HL2SDKOB)\public\engine";"$(HL2SDKOB)\public\game\server";"$(HL2SDKOB)\public\tier0";"$(HL2SDKOB)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=3" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -695,7 +695,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -775,7 +775,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDKL4D)\public";"$(HL2SDKL4D)\public\engine";"$(HL2SDKL4D)\public\game\server";"$(HL2SDKL4D)\public\tier0";"$(HL2SDKL4D)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=4" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -858,7 +858,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" @@ -938,7 +938,7 @@ AdditionalIncludeDirectories="..;..\sdk;..\..;..\..\sourcepawn;"$(HL2SDK)\public";"$(HL2SDK)\public\dlls";"$(HL2SDK)\public\engine";"$(HL2SDK)\public\tier0";"$(HL2SDK)\public\tier1";"$(MMSOURCE17)\core";"$(MMSOURCE17)\core\sourcehook"" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SOURCE_ENGINE=2" RuntimeLibrary="0" - EnableEnhancedInstructionSet="1" + EnableEnhancedInstructionSet="0" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/tools/builder/LinuxBuilder.cs b/tools/builder/LinuxBuilder.cs index 6f79f537..ea32d8da 100644 --- a/tools/builder/LinuxBuilder.cs +++ b/tools/builder/LinuxBuilder.cs @@ -75,11 +75,11 @@ namespace builder } else if (lib.build_mode == BuildMode.BuildMode_OldMetamod) { - makefile_args = "ENGINE=\"original\""; + makefile_args += "ENGINE=\"original\""; } else if (lib.build_mode == BuildMode.BuildMode_Left4Dead) { - makefile_args = "ENGINE=\"left4dead\""; + makefile_args += "ENGINE=\"left4dead\""; } /* Clean the project first */