Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b0bbbd463 | ||
|
|
b1a904c7a5 | ||
|
|
7a124f2aa2 | ||
|
|
b002adc509 | ||
|
|
2e34f2e67c | ||
|
|
315a5c642e | ||
|
|
3697bc3866 | ||
|
|
a63ea2a68d | ||
|
|
e299092ff5 | ||
|
|
f0b69facb3 | ||
|
|
ab8563f0d4 | ||
|
|
1d666b09e2 | ||
|
|
8fcd0478a1 | ||
|
|
3c50ed1cf2 | ||
|
|
3a28a09f15 | ||
|
|
8e8f284cc3 | ||
|
|
fa4e61b877 | ||
|
|
a39d94ffe9 |
@@ -4,3 +4,4 @@ e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
|
||||
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
|
||||
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
|
||||
ddd707c3454c382db5db9d28148cd19227f44759 sourcemod-1.4.0
|
||||
f74e1dea2ef2c5a12b5238badc0e877106804191 sourcemod-1.4.1
|
||||
|
||||
+6
-4
@@ -79,8 +79,9 @@ class SM:
|
||||
oldhead = head
|
||||
head, tail = os.path.split(head)
|
||||
if i.startswith('HL2SDK'):
|
||||
(info, sdk) = findDictByKey(self.possibleSdks, 'sdk', i)
|
||||
self.sdkInfo[sdk] = info
|
||||
if head != None and head != oldhead:
|
||||
(info, sdk) = findDictByKey(self.possibleSdks, 'sdk', i)
|
||||
self.sdkInfo[sdk] = info
|
||||
elif head == None or head == oldhead:
|
||||
raise Exception('Could not find a valid path for {0}'.format(i))
|
||||
AMBuild.cache.CacheVariable(i, path)
|
||||
@@ -119,6 +120,9 @@ class SM:
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual')
|
||||
if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 3) or \
|
||||
(self.vendor == 'clang' and cxx.majorVersion >= 3):
|
||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
|
||||
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
|
||||
self.compiler.AddToListVar('CDEFINES', 'GNUC')
|
||||
if self.vendor == 'gcc':
|
||||
@@ -183,8 +187,6 @@ class SM:
|
||||
if self.vendor == 'clang':
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
|
||||
elif AMBuild.target['platform'] == 'darwin':
|
||||
self.compiler.AddToListVar('CFLAGS', ['-isysroot',
|
||||
'/Developer/SDKs/MacOSX10.5.sdk'])
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
|
||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
|
||||
|
||||
@@ -2,6 +2,24 @@ SourceMod Changelog
|
||||
|
||||
-----------------------------
|
||||
|
||||
SourceMod 1.4.2 [2011-04-13]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.4.2_Release_Notes
|
||||
|
||||
User Changes:
|
||||
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||
- Fixed regression in SourceMod 1.4.0 causing SM to cause load errors on The Ship (bug 5216).
|
||||
- Fixed toggling and player lag issues with sm_drug command (bugs 5217, 5218) (FlaminSarge).
|
||||
|
||||
Developer Changes:
|
||||
- Updated TF2-specific defines and enums (bug 5194).
|
||||
- Fixed StoreToAddress always writing 32 bits and throwing an error (bug 5248) (ProdigySim).
|
||||
- Fixed crash with StoreToAddress if memory wasn't writable (bug 5252) (Dr!fter).
|
||||
- Fixed return value of VoteMenuToAll (bug 5254) (VoiDeD).
|
||||
- Fixed bug in command lower-casing API guarantee
|
||||
|
||||
-----------------------------
|
||||
|
||||
SourceMod 1.4.1 [2011-12-07]
|
||||
|
||||
URL: http://wiki.alliedmods.net/SourceMod_1.4.1_Release_Notes
|
||||
|
||||
@@ -664,6 +664,11 @@ cell_t ConsoleDetours::InternalDispatch(int client, const CCommand& args)
|
||||
char name[255];
|
||||
const char *realname = args.Arg(0);
|
||||
size_t len = strlen(realname);
|
||||
|
||||
// Disallow command strings that are too long, for now.
|
||||
if (len >= sizeof(name) - 1)
|
||||
return Pl_Continue;
|
||||
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
if (realname[i] >= 'A' && realname[i] <= 'Z')
|
||||
|
||||
@@ -38,8 +38,28 @@
|
||||
#include <IGameConfigs.h>
|
||||
#include <compat_wrappers.h>
|
||||
#include <Logger.h>
|
||||
#include "LibrarySys.h"
|
||||
#include "logic_bridge.h"
|
||||
|
||||
|
||||
typedef ICommandLine *(*FakeGetCommandLine)();
|
||||
|
||||
#if defined _WIN32
|
||||
#define TIER0_NAME "tier0.dll"
|
||||
#define VSTDLIB_NAME "vstdlib.dll"
|
||||
#elif defined __APPLE__
|
||||
#define TIER0_NAME "libtier0.dylib"
|
||||
#define VSTDLIB_NAME "libvstdlib.dylib"
|
||||
#elif defined __linux__
|
||||
#if SOURCE_ENGINE == SE_EPISODEONE || SOURCE_ENGINE == ORANGEBOX || SOURCE_ENGINE == SE_LEFT4DEAD
|
||||
#define TIER0_NAME "tier0_i486.so"
|
||||
#define VSTDLIB_NAME "vstdlib_i486.so"
|
||||
#else
|
||||
#define TIER0_NAME "libtier0.so"
|
||||
#define VSTDLIB_NAME "libvstdlib.so"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CHalfLife2 g_HL2;
|
||||
ConVar *sv_lan = NULL;
|
||||
|
||||
@@ -131,6 +151,12 @@ void CHalfLife2::OnSourceModAllInitialized()
|
||||
}
|
||||
|
||||
void CHalfLife2::OnSourceModAllInitialized_Post()
|
||||
{
|
||||
InitLogicalEntData();
|
||||
InitCommandLine();
|
||||
}
|
||||
|
||||
void CHalfLife2::InitLogicalEntData()
|
||||
{
|
||||
char *addr = NULL;
|
||||
|
||||
@@ -196,6 +222,64 @@ void CHalfLife2::OnSourceModAllInitialized_Post()
|
||||
}
|
||||
}
|
||||
|
||||
void CHalfLife2::InitCommandLine()
|
||||
{
|
||||
char path[PLATFORM_MAX_PATH];
|
||||
char error[256];
|
||||
|
||||
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "../bin/" TIER0_NAME);
|
||||
|
||||
if (!g_LibSys.IsPathFile(path))
|
||||
{
|
||||
g_Logger.LogError("Could not find path for: " TIER0_NAME);
|
||||
return;
|
||||
}
|
||||
|
||||
ILibrary *lib = g_LibSys.OpenLibrary(path, error, sizeof(error));
|
||||
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine_Tier0");
|
||||
|
||||
/* '_Tier0' dropped on Alien Swarm version */
|
||||
if (m_pGetCommandLine == NULL)
|
||||
{
|
||||
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
|
||||
}
|
||||
|
||||
if (m_pGetCommandLine == NULL)
|
||||
{
|
||||
/* We probably have a Ship engine. */
|
||||
lib->CloseLibrary();
|
||||
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "../bin/" VSTDLIB_NAME);
|
||||
if (!g_LibSys.IsPathFile(path))
|
||||
{
|
||||
g_Logger.LogError("Could not find path for: " VSTDLIB_NAME);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((lib = g_LibSys.OpenLibrary(path, error, sizeof(error))) == NULL)
|
||||
{
|
||||
g_Logger.LogError("Could not load %s: %s", path, error);
|
||||
return;
|
||||
}
|
||||
|
||||
m_pGetCommandLine = lib->GetSymbolAddress("CommandLine");
|
||||
|
||||
if (m_pGetCommandLine == NULL)
|
||||
{
|
||||
g_Logger.LogError("Could not locate any command line functionality");
|
||||
}
|
||||
|
||||
lib->CloseLibrary();
|
||||
}
|
||||
}
|
||||
|
||||
ICommandLine *CHalfLife2::GetValveCommandLine()
|
||||
{
|
||||
if (!m_pGetCommandLine)
|
||||
return NULL;
|
||||
|
||||
return ((FakeGetCommandLine)((FakeGetCommandLine *)m_pGetCommandLine))();
|
||||
}
|
||||
|
||||
#if !defined METAMOD_PLAPI_VERSION || PLAPI_VERSION < 11
|
||||
bool CHalfLife2::IsOriginalEngine()
|
||||
{
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <server_class.h>
|
||||
#include <datamap.h>
|
||||
#include <ihandleentity.h>
|
||||
#include <tier0/icommandline.h>
|
||||
|
||||
class CCommand;
|
||||
|
||||
@@ -136,6 +137,7 @@ public: //IGameHelpers
|
||||
cell_t EntityToBCompatRef(CBaseEntity *pEntity);
|
||||
void *GetGlobalEntityList();
|
||||
int GetSendPropOffset(SendProp *prop);
|
||||
ICommandLine *GetValveCommandLine();
|
||||
public:
|
||||
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
|
||||
void ProcessFakeCliCmdQueue();
|
||||
@@ -151,6 +153,9 @@ public:
|
||||
#endif
|
||||
private:
|
||||
DataTableInfo *_FindServerClass(const char *classname);
|
||||
private:
|
||||
void InitLogicalEntData();
|
||||
void InitCommandLine();
|
||||
private:
|
||||
Trie *m_pClasses;
|
||||
List<DataTableInfo *> m_Tables;
|
||||
@@ -163,6 +168,7 @@ private:
|
||||
CStack<DelayedFakeCliCmd *> m_FreeCmds;
|
||||
CStack<CachedCommandInfo> m_CommandStack;
|
||||
Queue<DelayedKickInfo> m_DelayedKicks;
|
||||
void *m_pGetCommandLine;
|
||||
};
|
||||
|
||||
extern CHalfLife2 g_HL2;
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#include "HalfLife2.h"
|
||||
#include <inetchannel.h>
|
||||
#include <iclient.h>
|
||||
#include <tier0/icommandline.h>
|
||||
#include <IGameConfigs.h>
|
||||
#include "ExtensionSys.h"
|
||||
#include <sourcemod_version.h>
|
||||
@@ -244,7 +243,8 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
|
||||
// clientMax will not necessarily be correct here (such as on late SourceTV enable)
|
||||
m_maxClients = gpGlobals->maxClients;
|
||||
|
||||
m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && CommandLine()->FindParm("-nohltv") == 0);
|
||||
ICommandLine *commandLine = g_HL2.GetValveCommandLine();
|
||||
m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && (!commandLine || commandLine->FindParm("-nohltv") == 0));
|
||||
m_bIsReplayActive = false;
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
m_bIsReplayActive = (replay_enable && replay_enable->GetBool());
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "Logger.h"
|
||||
#include "ExtensionSys.h"
|
||||
#include <sm_trie_tpl.h>
|
||||
#include <sh_memory.h>
|
||||
|
||||
#if defined PLATFORM_WINDOWS
|
||||
#include <windows.h>
|
||||
@@ -729,11 +730,17 @@ static cell_t StoreToAddress(IPluginContext *pContext, const cell_t *params)
|
||||
switch(size)
|
||||
{
|
||||
case NumberType_Int8:
|
||||
SourceHook::SetMemAccess(addr, sizeof(uint8_t), SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC);
|
||||
*reinterpret_cast<uint8_t*>(addr) = data;
|
||||
break;
|
||||
case NumberType_Int16:
|
||||
SourceHook::SetMemAccess(addr, sizeof(uint16_t), SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC);
|
||||
*reinterpret_cast<uint16_t*>(addr) = data;
|
||||
break;
|
||||
case NumberType_Int32:
|
||||
SourceHook::SetMemAccess(addr, sizeof(uint32_t), SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC);
|
||||
*reinterpret_cast<uint32_t*>(addr) = data;
|
||||
break;
|
||||
default:
|
||||
pContext->ThrowNativeError("Invalid number types %d", size);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ def BuildCURL():
|
||||
env = os.environ.copy()
|
||||
env['CFLAGS'] = '-m32'
|
||||
if AMBuild.target['platform'] == 'darwin':
|
||||
env['CFLAGS'] += ' -isysroot /Developer/SDKs/MacOSX10.5.sdk'
|
||||
env['LDFLAGS'] = '-mmacosx-version-min=10.5'
|
||||
else:
|
||||
env['CFLAGS'] += ' -D_GNU_SOURCE'
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"ClanTagOffset"
|
||||
{
|
||||
"windows" "24"
|
||||
"linux" "41"
|
||||
"linux" "42"
|
||||
"mac" "29"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,14 +43,12 @@ KillDrug(client)
|
||||
{
|
||||
KillDrugTimer(client);
|
||||
|
||||
new Float:pos[3];
|
||||
GetClientAbsOrigin(client, pos);
|
||||
new Float:angs[3];
|
||||
GetClientEyeAngles(client, angs);
|
||||
|
||||
angs[2] = 0.0;
|
||||
|
||||
TeleportEntity(client, pos, angs, NULL_VECTOR);
|
||||
TeleportEntity(client, NULL_VECTOR, angs, NULL_VECTOR);
|
||||
|
||||
new clients[2];
|
||||
clients[0] = client;
|
||||
@@ -144,15 +142,12 @@ public Action:Timer_Drug(Handle:timer, any:client)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
new Float:pos[3];
|
||||
GetClientAbsOrigin(client, pos);
|
||||
|
||||
new Float:angs[3];
|
||||
GetClientEyeAngles(client, angs);
|
||||
|
||||
angs[2] = g_DrugAngles[GetRandomInt(0,100) % 20];
|
||||
|
||||
TeleportEntity(client, pos, angs, NULL_VECTOR);
|
||||
TeleportEntity(client, NULL_VECTOR, angs, NULL_VECTOR);
|
||||
|
||||
new clients[2];
|
||||
clients[0] = client;
|
||||
@@ -264,7 +259,7 @@ public Action:Command_Drug(client, args)
|
||||
{
|
||||
decl String:arg2[2];
|
||||
GetCmdArg(2, arg2, sizeof(arg2));
|
||||
if (arg2[0])
|
||||
if (StringToInt(arg2))
|
||||
{
|
||||
toggle = 1;
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ native bool:VoteMenu(Handle:menu, clients[], numClients, time, flags=0);
|
||||
* in progress.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
stock VoteMenuToAll(Handle:menu, time, flags=0)
|
||||
stock bool:VoteMenuToAll(Handle:menu, time, flags=0)
|
||||
{
|
||||
new total;
|
||||
decl players[MaxClients];
|
||||
|
||||
@@ -122,6 +122,7 @@ enum TFHoliday
|
||||
{
|
||||
TFHoliday_Birthday = 1,
|
||||
TFHoliday_Halloween,
|
||||
TFHoliday_Christmas,
|
||||
TFHoliday_FullMoon,
|
||||
TFHoliday_HalloweenOrFullMoon,
|
||||
};
|
||||
|
||||
@@ -218,6 +218,10 @@ enum {
|
||||
TF_WEAPON_RAYGUN,
|
||||
TF_WEAPON_PARTICLE_CANNON,
|
||||
TF_WEAPON_MECHANICAL_ARM,
|
||||
TF_WEAPON_DRG_POMSON,
|
||||
TF_WEAPON_BAT_GIFTWRAP,
|
||||
TF_WEAPON_GRENADE_ORNAMENT,
|
||||
TF_WEAPON_RAYGUN_REVENGE,
|
||||
};
|
||||
|
||||
// TF2 Weapon Slots for GetPlayerWeaponSlot
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
|
||||
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
|
||||
#define SOURCEMOD_V_MINOR 4 /**< SourceMod Minor version */
|
||||
#define SOURCEMOD_V_RELEASE 1 /**< SourceMod Release version */
|
||||
#define SOURCEMOD_V_RELEASE 2 /**< SourceMod Release version */
|
||||
|
||||
#define SOURCEMOD_VERSION "1.4.1" /**< SourceMod version string (major.minor.release.build) */
|
||||
#define SOURCEMOD_VERSION "1.4.2" /**< SourceMod version string (major.minor.release.build) */
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.4.1
|
||||
1.4.2
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
*/
|
||||
|
||||
#define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
|
||||
#define SMINTERFACE_GAMEHELPERS_VERSION 7
|
||||
#define SMINTERFACE_GAMEHELPERS_VERSION 8
|
||||
|
||||
class CBaseEntity;
|
||||
class CBaseHandle;
|
||||
class SendProp;
|
||||
class ServerClass;
|
||||
class ICommandLine;
|
||||
struct edict_t;
|
||||
struct datamap_t;
|
||||
struct typedescription_t;
|
||||
@@ -284,6 +285,13 @@ namespace SourceMod
|
||||
* @return True on success, false on failure.
|
||||
*/
|
||||
virtual bool HintTextMsg(int client, const char *msg) =0;
|
||||
|
||||
/**
|
||||
* @brief Retrieves the Valve command line pointer.
|
||||
*
|
||||
* @return ICommandLine ptr or NULL if not found.
|
||||
*/
|
||||
virtual ICommandLine *GetValveCommandLine() =0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -47,12 +47,12 @@ if ($reconf) {
|
||||
$argn = $#ARGV + 1;
|
||||
print "Attempting to reconfigure...\n";
|
||||
if ($argn > 0 && $^O !~ /MSWin/) {
|
||||
$result = `CC=$ARGV[0] CXX=$ARGV[0] python3.1 ../build/configure.py --enable-optimize`;
|
||||
$result = `CC=$ARGV[0] CXX=$ARGV[0] python3 ../build/configure.py --enable-optimize`;
|
||||
} else {
|
||||
if ($^O eq "linux") {
|
||||
$result = `CC=gcc-4.4 CXX=gcc-4.4 python3.1 ../build/configure.py --enable-optimize`;
|
||||
$result = `CC=gcc-4.4 CXX=gcc-4.4 python3 ../build/configure.py --enable-optimize`;
|
||||
} elsif ($^O eq "darwin") {
|
||||
$result = `CC=gcc-4.2 CXX=gcc-4.2 python3.1 ../build/configure.py --enable-optimize`;
|
||||
$result = `CC=clang CXX=clang python3 ../build/configure.py --enable-optimize`;
|
||||
} else {
|
||||
$result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ require 'helpers.pm';
|
||||
chdir('../../../OUTPUT');
|
||||
|
||||
if ($^O eq "linux" || $^O eq "darwin") {
|
||||
system("python3.1 build.py 2>&1");
|
||||
system("python3 build.py 2>&1");
|
||||
} else {
|
||||
system("C:\\Python31\\python.exe build.py 2>&1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user