mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-09 11:28:33 +00:00
Fix build for tf2, css, dods, hl2dm
This commit is contained in:
parent
21ae73ce72
commit
8641223767
@ -178,6 +178,7 @@ class MMSConfig(object):
|
|||||||
'_CRT_SECURE_NO_DEPRECATE',
|
'_CRT_SECURE_NO_DEPRECATE',
|
||||||
'_CRT_SECURE_NO_WARNINGS',
|
'_CRT_SECURE_NO_WARNINGS',
|
||||||
'_CRT_NONSTDC_NO_DEPRECATE',
|
'_CRT_NONSTDC_NO_DEPRECATE',
|
||||||
|
'_ALLOW_KEYWORD_MACROS',
|
||||||
]
|
]
|
||||||
cxx.cflags += [
|
cxx.cflags += [
|
||||||
'/W3',
|
'/W3',
|
||||||
|
|||||||
34
core/metamod_convar.h
Normal file
34
core/metamod_convar.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* ======================================================
|
||||||
|
* Metamod:Source
|
||||||
|
* Copyright (C) 2004-2025 AlliedModders LLC and authors.
|
||||||
|
* All rights reserved.
|
||||||
|
* ======================================================
|
||||||
|
*
|
||||||
|
* This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
* In no event will the authors be held liable for any damages arising from
|
||||||
|
* the use of this software.
|
||||||
|
*
|
||||||
|
* Permission is granted to anyone to use this software for any purpose,
|
||||||
|
* including commercial applications, and to alter it and redistribute it
|
||||||
|
* freely, subject to the following restrictions:
|
||||||
|
*
|
||||||
|
* 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
* claim that you wrote the original software. If you use this software in a
|
||||||
|
* product, an acknowledgment in the product documentation would be
|
||||||
|
* appreciated but is not required.
|
||||||
|
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
* misrepresented as being the original software.
|
||||||
|
* 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define protected public
|
||||||
|
#define private public
|
||||||
|
#include <convar.h>
|
||||||
|
#undef protected
|
||||||
|
#undef private
|
||||||
@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <interface.h>
|
#include <interface.h>
|
||||||
#include <eiface.h>
|
#include <eiface.h>
|
||||||
#include <convar.h>
|
|
||||||
#include <sh_list.h>
|
#include <sh_list.h>
|
||||||
#include <sh_string.h>
|
#include <sh_string.h>
|
||||||
#include <IPluginManager.h>
|
#include <IPluginManager.h>
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include "../metamod_oslink.h"
|
#include "../metamod_oslink.h"
|
||||||
#include <sourcehook.h>
|
#include <sourcehook.h>
|
||||||
#include <convar.h>
|
|
||||||
#include <eiface.h>
|
#include <eiface.h>
|
||||||
#include <tier0/icommandline.h>
|
#include <tier0/icommandline.h>
|
||||||
#include "../metamod_util.h"
|
#include "../metamod_util.h"
|
||||||
|
|||||||
@ -26,6 +26,8 @@
|
|||||||
#ifndef _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_
|
#ifndef _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_
|
||||||
#define _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_
|
#define _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_
|
||||||
|
|
||||||
|
#include "../metamod_convar.h"
|
||||||
|
|
||||||
#if defined _DEBUG
|
#if defined _DEBUG
|
||||||
#define DEBUG2
|
#define DEBUG2
|
||||||
#undef _DEBUG
|
#undef _DEBUG
|
||||||
|
|||||||
@ -37,7 +37,7 @@ bool SourceProvider::SourceConVarAccessor::RegisterConCommandBase(ConCommandBase
|
|||||||
{
|
{
|
||||||
m_RegisteredCommands.push_back(pCommand);
|
m_RegisteredCommands.push_back(pCommand);
|
||||||
#if SOURCE_ENGINE < SE_ALIENSWARM
|
#if SOURCE_ENGINE < SE_ALIENSWARM
|
||||||
pCommand->SetNext(NULL);
|
pCommand->m_pNext = NULL;
|
||||||
#endif
|
#endif
|
||||||
icvar->RegisterConCommand(pCommand);
|
icvar->RegisterConCommand(pCommand);
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ bool SourceProvider::SourceConVarAccessor::RegisterConCommandBase(ConCommandBase
|
|||||||
bool SourceProvider::SourceConVarAccessor::Register(ConCommandBase *pCommand)
|
bool SourceProvider::SourceConVarAccessor::Register(ConCommandBase *pCommand)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE < SE_ALIENSWARM
|
#if SOURCE_ENGINE < SE_ALIENSWARM
|
||||||
pCommand->SetNext(NULL);
|
pCommand->m_pNext = NULL;
|
||||||
#endif
|
#endif
|
||||||
icvar->RegisterConCommand(pCommand);
|
icvar->RegisterConCommand(pCommand);
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ void SourceProvider::SourceConVarAccessor::Unregister(ConCommandBase *pCommand)
|
|||||||
if (pCur == pCommand)
|
if (pCur == pCommand)
|
||||||
{
|
{
|
||||||
*m_TopConCommandBase = const_cast<ConCommandBase *>(pCommand->GetNext());
|
*m_TopConCommandBase = const_cast<ConCommandBase *>(pCommand->GetNext());
|
||||||
pCommand->SetNext(NULL);
|
pCommand->m_pNext = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,8 +169,8 @@ void SourceProvider::SourceConVarAccessor::Unregister(ConCommandBase *pCommand)
|
|||||||
{
|
{
|
||||||
if (pCur == pCommand)
|
if (pCur == pCommand)
|
||||||
{
|
{
|
||||||
pPrev->SetNext(const_cast<ConCommandBase *>(pCommand->GetNext()));
|
pPrev->m_pNext = const_cast<ConCommandBase *>(pCommand->GetNext());
|
||||||
pCommand->SetNext(NULL);
|
pCommand->m_pNext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPrev = pCur;
|
pPrev = pCur;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user