mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
Port S1 tf2/css/dods/hl2dm build fixes from master
This commit is contained in:
parent
117ba23eb1
commit
e5de18eadd
@ -121,6 +121,7 @@ class MMSConfig(object):
|
||||
'-Wall',
|
||||
'-Werror',
|
||||
'-Wno-uninitialized',
|
||||
'-Wno-sign-compare',
|
||||
'-Wno-unused',
|
||||
'-Wno-switch',
|
||||
'-Wno-unknown-pragmas',
|
||||
@ -142,6 +143,7 @@ class MMSConfig(object):
|
||||
'-fno-threadsafe-statics',
|
||||
'-Wno-non-virtual-dtor',
|
||||
'-Wno-overloaded-virtual',
|
||||
'-Wno-register',
|
||||
]
|
||||
if (cxx.version >= 'gcc-4.7' or cxx.family == 'clang'):
|
||||
cxx.cxxflags += ['-Wno-delete-non-virtual-dtor']
|
||||
@ -225,7 +227,7 @@ class MMSConfig(object):
|
||||
|
||||
# Platform-specifics
|
||||
if cxx.target.platform == 'linux':
|
||||
cxx.defines += ['_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64']
|
||||
cxx.defines += ['LINUX', '_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64']
|
||||
if cxx.family == 'gcc':
|
||||
cxx.linkflags += ['-static-libgcc']
|
||||
elif cxx.family == 'clang':
|
||||
|
@ -25,6 +25,7 @@ for sdk_target in MMS.sdk_targets:
|
||||
'gamedll_bridge.cpp',
|
||||
'vsp_bridge.cpp'
|
||||
]
|
||||
binary.compiler.defines += ['_ALLOW_KEYWORD_MACROS']
|
||||
|
||||
if binary.compiler.target.arch == 'x86':
|
||||
binary.sources += ['sourcehook/sourcehook_hookmangen_x86.cpp']
|
||||
|
36
core/metamod_convar.h
Normal file
36
core/metamod_convar.h
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
* 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 <eiface.h>
|
||||
#include <convar.h>
|
||||
#include <sh_list.h>
|
||||
#include <sh_string.h>
|
||||
#include <IPluginManager.h>
|
||||
|
@ -42,7 +42,7 @@ bool SMConVarAccessor::RegisterConCommandBase(ConCommandBase *pCommand)
|
||||
{
|
||||
m_RegisteredCommands.push_back(pCommand);
|
||||
#if SOURCE_ENGINE < SE_ALIENSWARM
|
||||
pCommand->SetNext(NULL);
|
||||
pCommand->m_pNext = NULL;
|
||||
#endif
|
||||
icvar->RegisterConCommand(pCommand);
|
||||
|
||||
@ -52,7 +52,7 @@ bool SMConVarAccessor::RegisterConCommandBase(ConCommandBase *pCommand)
|
||||
bool SMConVarAccessor::Register(ConCommandBase *pCommand)
|
||||
{
|
||||
#if SOURCE_ENGINE < SE_ALIENSWARM
|
||||
pCommand->SetNext(NULL);
|
||||
pCommand->m_pNext = NULL;
|
||||
#endif
|
||||
icvar->RegisterConCommand(pCommand);
|
||||
|
||||
@ -163,7 +163,7 @@ void SMConVarAccessor::Unregister(ConCommandBase *pCommand)
|
||||
if (pCur == pCommand)
|
||||
{
|
||||
*m_TopConCommandBase = const_cast<ConCommandBase *>(pCommand->GetNext());
|
||||
pCommand->SetNext(NULL);
|
||||
pCommand->m_pNext = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -174,8 +174,8 @@ void SMConVarAccessor::Unregister(ConCommandBase *pCommand)
|
||||
{
|
||||
if (pCur == pCommand)
|
||||
{
|
||||
pPrev->SetNext(const_cast<ConCommandBase *>(pCommand->GetNext()));
|
||||
pCommand->SetNext(NULL);
|
||||
pPrev->m_pNext = const_cast<ConCommandBase *>(pCommand->GetNext());
|
||||
pCommand->m_pNext = NULL;
|
||||
}
|
||||
|
||||
pPrev = pCur;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#define _INCLUDE_CONSOLE_MMS_H_
|
||||
|
||||
#include <interface.h>
|
||||
#include "convar.h"
|
||||
#include "../metamod_convar.h"
|
||||
#include <eiface.h>
|
||||
#include <sh_list.h>
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
#ifndef _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_
|
||||
#define _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_
|
||||
|
||||
#include "../metamod_convar.h"
|
||||
|
||||
#if defined _DEBUG
|
||||
#define DEBUG2
|
||||
#undef _DEBUG
|
||||
|
@ -51,7 +51,7 @@ def output_version_header():
|
||||
|
||||
with open(os.path.join(SourceFolder, 'product.version')) as fp:
|
||||
contents = fp.read()
|
||||
m = re.match('(\d+)\.(\d+)\.(\d+)-?(.*)', contents)
|
||||
m = re.match(r'(\d+)\.(\d+)\.(\d+)-?(.*)', contents)
|
||||
if m == None:
|
||||
raise Exception('Could not detremine product version')
|
||||
major, minor, release, tag = m.groups()
|
||||
|
Loading…
x
Reference in New Issue
Block a user