diff --git a/.hgignore b/.hgignore index 4b97af97..5fdc865a 100644 --- a/.hgignore +++ b/.hgignore @@ -13,3 +13,10 @@ /CrazyDebug.* /Debug.* /Release.* + +# Files generated by Mac OS X Finder +(^|/)\.DS_Store$ + +# Files generated by Windows Explorer +(^|/)Desktop\.ini$ +(^|/)Thumbs\.db$ diff --git a/core/sourcemm_api.cpp b/core/sourcemm_api.cpp index 385fc220..edaa615b 100644 --- a/core/sourcemm_api.cpp +++ b/core/sourcemm_api.cpp @@ -87,7 +87,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen ismm->AddListener(this, this); -#if defined METAMOD_PLAPI_VERSION +#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11 if ((vsp_interface = g_SMAPI->GetVSPInfo(&vsp_version)) == NULL) #endif { @@ -177,7 +177,7 @@ void SourceMod_Core::OnVSPListening(IServerPluginCallbacks *iface) return; } -#if defined METAMOD_PLAPI_VERSION +#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11 if (vsp_version == 0) { g_SMAPI->GetVSPInfo(&vsp_version); diff --git a/public/mms_sample_ext/Makefile b/public/mms_sample_ext/Makefile index b78d6140..722a2295 100644 --- a/public/mms_sample_ext/Makefile +++ b/public/mms_sample_ext/Makefile @@ -1,4 +1,4 @@ -# (C)2004-2008 SourceMod Development Team +# (C)2004-2009 SourceMod Development Team # Makefile written by David "BAILOPAN" Anderson SMSDK = .. @@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../../hl2sdk HL2SDK_OB = ../../../hl2sdk-ob HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve HL2SDK_L4D = ../../../hl2sdk-l4d -MMSOURCE17 = ../../../mmsource-1.7 +HL2SDK_L4D2 = ../../../hl2sdk-l4d2 +MMSOURCE18 = ../../../mmsource-1.8 ##################################### ### EDIT BELOW FOR OTHER PROJECTS ### @@ -33,9 +34,10 @@ ifeq "$(ENGINE)" "original" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/linux_sdk CFLAGS += -DSOURCE_ENGINE=1 - METAMOD = $(MMSOURCE17)/core-legacy + METAMOD = $(MMSOURCE18)/core-legacy INCLUDE += -I$(HL2SDK)/public/dlls SRCDS = $(SRCDS_BASE) + LIB_SUFFIX = i486 override ENGSET = true endif ifeq "$(ENGINE)" "orangebox" @@ -43,9 +45,10 @@ ifeq "$(ENGINE)" "orangebox" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/lib/linux CFLAGS += -DSOURCE_ENGINE=3 - METAMOD = $(MMSOURCE17)/core + METAMOD = $(MMSOURCE18)/core INCLUDE += -I$(HL2SDK)/public/game/server SRCDS = $(SRCDS_BASE)/orangebox + LIB_SUFFIX = i486 override ENGSET = true endif ifeq "$(ENGINE)" "orangeboxvalve" @@ -53,9 +56,10 @@ ifeq "$(ENGINE)" "orangeboxvalve" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/lib/linux CFLAGS += -DSOURCE_ENGINE=4 - METAMOD = $(MMSOURCE17)/core + METAMOD = $(MMSOURCE18)/core INCLUDE += -I$(HL2SDK)/public/game/server SRCDS = $(SRCDS_BASE)/orangebox + LIB_SUFFIX = i486 override ENGSET = true endif ifeq "$(ENGINE)" "left4dead" @@ -63,15 +67,28 @@ ifeq "$(ENGINE)" "left4dead" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/lib/linux CFLAGS += -DSOURCE_ENGINE=5 - METAMOD = $(MMSOURCE17)/core + METAMOD = $(MMSOURCE18)/core INCLUDE += -I$(HL2SDK)/public/game/server SRCDS = $(SRCDS_BASE)/l4d + LIB_SUFFIX = i486 + override ENGSET = true +endif +ifeq "$(ENGINE)" "left4dead2" + HL2SDK = $(HL2SDK_L4D2) + HL2PUB = $(HL2SDK)/public + HL2LIB = $(HL2SDK)/lib/linux + CFLAGS += -DSOURCE_ENGINE=6 + METAMOD = $(MMSOURCE18)/core + INCLUDE += -I$(HL2SDK)/public/game/server + SRCDS = $(SRCDS_BASE)/left4dead2 + LIB_SUFFIX = linux override ENGSET = true endif -CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 +CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 \ + -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6 -LINK = vstdlib_i486.so tier0_i486.so -m32 -ldl -lm +LINK = vstdlib_$(LIB_SUFFIX).so tier0_$(LIB_SUFFIX).so -m32 -ldl -lm INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \ -I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK) -I$(SMSDK)/jit -I$(SMSDK)/jit/x86 \ @@ -116,13 +133,14 @@ $(BIN_DIR)/%.o: %.cpp all: check mkdir -p $(BIN_DIR) - ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so; - ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; + ln -sf $(HL2LIB)/vstdlib_$(LIB_SUFFIX).so + ln -sf $(HL2LIB)/tier0_$(LIB_SUFFIX).so $(MAKE) -f Makefile mms_ext check: if [ "$(ENGSET)" = "false" ]; then \ - echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \ + echo "You must supply one of the following values for ENGINE:"; \ + echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \ exit 1; \ fi diff --git a/public/sample_ext/Makefile b/public/sample_ext/Makefile index dbbb5aff..3203891a 100644 --- a/public/sample_ext/Makefile +++ b/public/sample_ext/Makefile @@ -1,4 +1,4 @@ -# (C)2004-2008 SourceMod Development Team +# (C)2004-2009 SourceMod Development Team # Makefile written by David "BAILOPAN" Anderson SMSDK = ../.. @@ -7,7 +7,8 @@ HL2SDK_ORIG = ../../../hl2sdk HL2SDK_OB = ../../../hl2sdk-ob HL2SDK_OB_VALVE = ../../../hl2sdk-ob-valve HL2SDK_L4D = ../../../hl2sdk-l4d -MMSOURCE17 = ../../../mmsource-1.7 +HL2SDK_L4D2 = ../../../hl2sdk-l4d2 +MMSOURCE18 = ../../../mmsource-1.8 ##################################### ### EDIT BELOW FOR OTHER PROJECTS ### @@ -36,9 +37,10 @@ ifeq "$(ENGINE)" "original" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/linux_sdk CFLAGS += -DSOURCE_ENGINE=1 - METAMOD = $(MMSOURCE17)/core-legacy + METAMOD = $(MMSOURCE18)/core-legacy INCLUDE += -I$(HL2SDK)/public/dlls SRCDS = $(SRCDS_BASE) + LIB_SUFFIX = i486 override ENGSET = true endif ifeq "$(ENGINE)" "orangebox" @@ -46,9 +48,10 @@ ifeq "$(ENGINE)" "orangebox" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/lib/linux CFLAGS += -DSOURCE_ENGINE=3 - METAMOD = $(MMSOURCE17)/core + METAMOD = $(MMSOURCE18)/core INCLUDE += -I$(HL2SDK)/public/game/server SRCDS = $(SRCDS_BASE)/orangebox + LIB_SUFFIX = i486 override ENGSET = true endif ifeq "$(ENGINE)" "orangeboxvalve" @@ -56,9 +59,10 @@ ifeq "$(ENGINE)" "orangeboxvalve" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/lib/linux CFLAGS += -DSOURCE_ENGINE=4 - METAMOD = $(MMSOURCE17)/core + METAMOD = $(MMSOURCE18)/core INCLUDE += -I$(HL2SDK)/public/game/server SRCDS = $(SRCDS_BASE)/orangebox + LIB_SUFFIX = i486 override ENGSET = true endif ifeq "$(ENGINE)" "left4dead" @@ -66,20 +70,33 @@ ifeq "$(ENGINE)" "left4dead" HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/lib/linux CFLAGS += -DSOURCE_ENGINE=5 - METAMOD = $(MMSOURCE17)/core + METAMOD = $(MMSOURCE18)/core INCLUDE += -I$(HL2SDK)/public/game/server SRCDS = $(SRCDS_BASE)/l4d + LIB_SUFFIX = i486 + override ENGSET = true +endif +ifeq "$(ENGINE)" "left4dead2" + HL2SDK = $(HL2SDK_L4D2) + HL2PUB = $(HL2SDK)/public + HL2LIB = $(HL2SDK)/lib/linux + CFLAGS += -DSOURCE_ENGINE=6 + METAMOD = $(MMSOURCE18)/core + INCLUDE += -I$(HL2SDK)/public/game/server + SRCDS = $(SRCDS_BASE)/left4dead2 + LIB_SUFFIX = linux override ENGSET = true endif ifeq "$(USEMETA)" "true" - LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so + LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_$(LIB_SUFFIX).so tier0_$(LIB_SUFFIX).so LINK += $(LINK_HL2) INCLUDE += -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \ -I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn - CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 + CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 \ + -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6 else INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn endif @@ -130,14 +147,15 @@ $(BIN_DIR)/%.o: %.cpp all: check mkdir -p $(BIN_DIR)/sdk if [ "$(USEMETA)" = "true" ]; then \ - ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so; \ - ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so; \ + ln -sf $(HL2LIB)/vstdlib_$(LIB_SUFFIX).so; \ + ln -sf $(HL2LIB)/tier0_$(LIB_SUFFIX).so; \ fi $(MAKE) -f Makefile extension check: if [ "$(USEMETA)" = "true" ] && [ "$(ENGSET)" = "false" ]; then \ - echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \ + echo "You must supply one of the following values for ENGINE:"; \ + echo "left4dead2, left4dead, orangeboxvalve, orangebox, or original"; \ exit 1; \ fi diff --git a/public/sample_ext/msvc8/sdk.sln b/public/sample_ext/msvc8/sdk.sln index d0bd546c..ff4dfea6 100644 --- a/public/sample_ext/msvc8/sdk.sln +++ b/public/sample_ext/msvc8/sdk.sln @@ -7,15 +7,19 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 Debug - Episode 1|Win32 = Debug - Episode 1|Win32 + Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32 Debug - Orange Box|Win32 = Debug - Orange Box|Win32 + Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 Debug|Win32 = Debug|Win32 Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 Release - Episode 1|Win32 = Release - Episode 1|Win32 + Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 Release - Old Metamod|Win32 = Release - Old Metamod|Win32 Release - Orange Box|Win32 = Release - Orange Box|Win32 + Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution @@ -23,24 +27,32 @@ Global {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.ActiveCfg = Debug|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.Build.0 = Debug|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 + {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.ActiveCfg = Release|Win32 {B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection diff --git a/public/sample_ext/msvc8/sdk.vcproj b/public/sample_ext/msvc8/sdk.vcproj index 8ae8db72..3886b0b6 100644 --- a/public/sample_ext/msvc8/sdk.vcproj +++ b/public/sample_ext/msvc8/sdk.vcproj @@ -45,7 +45,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" @@ -200,14 +200,14 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +