From 552a1d1bb4592d9824e92a3d608a9e86286dc056 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Thu, 14 Jul 2016 23:02:33 +0700 Subject: [PATCH] Fix compile --- regamedll/dlls/cbase.h | 7 ++++++- regamedll/dlls/mapinfo.cpp | 2 +- regamedll/regamedll/precompiled.h | 5 +---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/regamedll/dlls/cbase.h b/regamedll/dlls/cbase.h index a71e02fb..1e483b58 100644 --- a/regamedll/dlls/cbase.h +++ b/regamedll/dlls/cbase.h @@ -275,7 +275,7 @@ public: virtual void Blocked(CBaseEntity *pOther) { if (m_pfnBlocked) (this->*m_pfnBlocked)(pOther); } virtual CBaseEntity *Respawn() { return NULL; } -#ifndef REGAMEDLL_FIXES +#ifndef REGAMEDLL_ADD // used by monsters that are created by the MonsterMaker virtual void UpdateOwner() {} #else @@ -313,7 +313,12 @@ public: public: // allow engine to allocate instance data void *operator new(size_t stAllocateBlock, entvars_t *pevnew) { return ALLOC_PRIVATE(ENT(pevnew), stAllocateBlock); } + + // don't use this. +#if _MSC_VER >= 1200 // only build this code if MSVC++ 6.0 or higher void operator delete(void *pMem, entvars_t *pevnew) { pevnew->flags |= FL_KILLME; } +#endif + void UpdateOnRemove(); void EXPORT SUB_Remove(); void EXPORT SUB_DoNothing(); diff --git a/regamedll/dlls/mapinfo.cpp b/regamedll/dlls/mapinfo.cpp index 9a0d3c3b..577add50 100644 --- a/regamedll/dlls/mapinfo.cpp +++ b/regamedll/dlls/mapinfo.cpp @@ -13,8 +13,8 @@ CMapInfo::CMapInfo() // Should only be one of these. ALERT(at_warning, "Warning: Multiple info_map_parameters entities in map!\n"); } -#endif else +#endif { g_pMapInfo = this; } diff --git a/regamedll/regamedll/precompiled.h b/regamedll/regamedll/precompiled.h index 7c33a434..f32c4fe5 100644 --- a/regamedll/regamedll/precompiled.h +++ b/regamedll/regamedll/precompiled.h @@ -3,6 +3,7 @@ #include "version/appversion.h" #include "osconfig.h" +#include "basetypes.h" #include "asmlib.h" #include "sse_mathfun.h" @@ -26,12 +27,8 @@ #include "tier0/dbg.h" #include "dlls.h" -#include "basetypes.h" - #include "interface.h" - #include "hookchains_impl.h" - #include "regamedll.h" #include "regamedll_interfaces.h"