Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e47703ee83 | ||
|
|
0c3cc85f6d | ||
|
|
467663bff5 | ||
|
|
ac862954f1 | ||
|
|
a12f61d463 | ||
|
|
7d372ceedc | ||
|
|
bba7ff1c37 | ||
|
|
6f8fad7784 | ||
|
|
22f96dd195 | ||
|
|
423ad68a6f | ||
|
|
f522c531fb | ||
|
|
fe71d6a5ab | ||
|
|
2352b11b18 | ||
|
|
d140bfa8af | ||
|
|
a41c004d1c | ||
|
|
9009c115a5 | ||
|
|
b637ab794b | ||
|
|
4be098c694 |
@@ -2,7 +2,7 @@
|
|||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod
|
* SourceMod
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -379,13 +379,12 @@ void ConCmdManager::InternalDispatch(const CCommand &command)
|
|||||||
/* On a listen server, sometimes the server host's client index can be set as 0.
|
/* On a listen server, sometimes the server host's client index can be set as 0.
|
||||||
* So index 1 is passed to the command callback to correct this potential problem.
|
* So index 1 is passed to the command callback to correct this potential problem.
|
||||||
*/
|
*/
|
||||||
if (client == 0 && !engine->IsDedicatedServer())
|
if (!engine->IsDedicatedServer())
|
||||||
{
|
{
|
||||||
pHook->pf->PushCell(1);
|
client = g_Players.ListenClient();
|
||||||
} else {
|
|
||||||
pHook->pf->PushCell(client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pHook->pf->PushCell(client);
|
||||||
pHook->pf->PushCell(args);
|
pHook->pf->PushCell(args);
|
||||||
if (pHook->pf->Execute(&tempres) == SP_ERROR_NONE)
|
if (pHook->pf->Execute(&tempres) == SP_ERROR_NONE)
|
||||||
{
|
{
|
||||||
|
|||||||
+111
-55
@@ -2,7 +2,7 @@
|
|||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod
|
* SourceMod
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -29,12 +29,74 @@
|
|||||||
* Version: $Id$
|
* Version: $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "sm_globals.h"
|
#include "sm_globals.h"
|
||||||
#include "sourcemm_api.h"
|
#include "sourcemm_api.h"
|
||||||
#include "Tlhelp32.h"
|
#include "Tlhelp32.h"
|
||||||
#include "LibrarySys.h"
|
#include "LibrarySys.h"
|
||||||
#include "minidump.h"
|
#include "minidump.h"
|
||||||
|
#include "sm_stringutil.h"
|
||||||
|
|
||||||
|
bool HookImportAddrTable(BYTE *base, const char *func, DWORD hookfunc, char *err, size_t maxlength)
|
||||||
|
{
|
||||||
|
IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)base;
|
||||||
|
if (dos->e_magic != IMAGE_DOS_SIGNATURE)
|
||||||
|
{
|
||||||
|
UTIL_Format(err, maxlength, "%s", "Could not detect valid DOS signature");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMAGE_NT_HEADERS *nt = (IMAGE_NT_HEADERS *)(base + dos->e_lfanew);
|
||||||
|
if (nt->Signature != IMAGE_NT_SIGNATURE)
|
||||||
|
{
|
||||||
|
UTIL_Format(err, maxlength, "%s", "Could not detect valid NT signature");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMAGE_IMPORT_DESCRIPTOR *desc =
|
||||||
|
(IMAGE_IMPORT_DESCRIPTOR *)
|
||||||
|
(base + nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
|
||||||
|
if (base == (BYTE *)desc)
|
||||||
|
{
|
||||||
|
UTIL_Format(err, maxlength, "%s", "Could not find IAT");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool entryFound = false;
|
||||||
|
while (desc->Name)
|
||||||
|
{
|
||||||
|
if (desc->FirstThunk != 0)
|
||||||
|
{
|
||||||
|
IMAGE_THUNK_DATA *data = (IMAGE_THUNK_DATA *)(base + desc->OriginalFirstThunk);
|
||||||
|
DWORD *iat = (DWORD *)(base + desc->FirstThunk);
|
||||||
|
while (data->u1.Function)
|
||||||
|
{
|
||||||
|
if ((data->u1.Ordinal & IMAGE_ORDINAL_FLAG32) != IMAGE_ORDINAL_FLAG32)
|
||||||
|
{
|
||||||
|
IMAGE_IMPORT_BY_NAME *import = (IMAGE_IMPORT_BY_NAME *)(base + data->u1.AddressOfData);
|
||||||
|
if (strcmp((char *)import->Name, func) == 0)
|
||||||
|
{
|
||||||
|
DWORD oldprot, oldprot2;
|
||||||
|
VirtualProtect(iat, 4, PAGE_READWRITE, &oldprot);
|
||||||
|
*iat = hookfunc;
|
||||||
|
VirtualProtect(iat, 4, oldprot, &oldprot2);
|
||||||
|
entryFound = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data++;
|
||||||
|
iat++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
desc++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!entryFound)
|
||||||
|
{
|
||||||
|
UTIL_Format(err, maxlength, "Could not find IAT entry for %s", func);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
WINAPI
|
WINAPI
|
||||||
@@ -62,6 +124,24 @@ FARPROC WINAPI GetProcAddress2(HMODULE hModule, LPCSTR lpProcName)
|
|||||||
return GetProcAddress(hModule, lpProcName);
|
return GetProcAddress(hModule, lpProcName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HMODULE WINAPI LoadLibraryEx2(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
HMODULE lib = LoadLibraryEx(lpFileName, hFile, dwFlags);
|
||||||
|
|
||||||
|
/* Steam.dll seems to get loaded using an abs path, thus the use of stristr() */
|
||||||
|
if (stristr(lpFileName, "steam.dll"))
|
||||||
|
{
|
||||||
|
char err[64];
|
||||||
|
if (!HookImportAddrTable((BYTE *)lib, "GetProcAddress", (DWORD)GetProcAddress2, err, sizeof(err)))
|
||||||
|
{
|
||||||
|
Error("[SM] %s in steam.dll\n", err);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return lib;
|
||||||
|
}
|
||||||
|
|
||||||
class CrazyWindowsDebugger : public SMGlobalClass
|
class CrazyWindowsDebugger : public SMGlobalClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -69,6 +149,9 @@ public:
|
|||||||
{
|
{
|
||||||
HANDLE hModuleList = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
|
HANDLE hModuleList = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
|
||||||
MODULEENTRY32 me32;
|
MODULEENTRY32 me32;
|
||||||
|
BYTE *engine = NULL;
|
||||||
|
BYTE *steam = NULL;
|
||||||
|
char err[64];
|
||||||
|
|
||||||
me32.dwSize = sizeof(MODULEENTRY32);
|
me32.dwSize = sizeof(MODULEENTRY32);
|
||||||
|
|
||||||
@@ -77,69 +160,42 @@ public:
|
|||||||
Error("Could not initialize crazy debugger!");
|
Error("Could not initialize crazy debugger!");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool found = false;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (strcasecmp(me32.szModule, "steam.dll") == 0)
|
if (strcasecmp(me32.szModule, "engine.dll") == 0)
|
||||||
{
|
{
|
||||||
IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)me32.modBaseAddr;
|
engine = me32.modBaseAddr;
|
||||||
if (dos->e_magic != IMAGE_DOS_SIGNATURE)
|
}
|
||||||
{
|
else if (strcasecmp(me32.szModule, "steam.dll") == 0)
|
||||||
Error("[SM] Could not detect steam.dll with valid DOS signature");
|
{
|
||||||
}
|
/* Steam.dll is loaded by engine.dll, so we can exit the loop here */
|
||||||
char *base = (char *)dos;
|
steam = me32.modBaseAddr;
|
||||||
IMAGE_NT_HEADERS *nt = (IMAGE_NT_HEADERS *)(base + dos->e_lfanew);
|
|
||||||
if (nt->Signature != IMAGE_NT_SIGNATURE)
|
|
||||||
{
|
|
||||||
Error("[SM] Could not detect steam.dll with valid NT signature");
|
|
||||||
}
|
|
||||||
IMAGE_IMPORT_DESCRIPTOR *desc =
|
|
||||||
(IMAGE_IMPORT_DESCRIPTOR *)
|
|
||||||
(base + nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
|
|
||||||
if (base == (char *)desc)
|
|
||||||
{
|
|
||||||
Error("[SM] Could not find the steam.dll IAT");
|
|
||||||
}
|
|
||||||
while (desc->Name)
|
|
||||||
{
|
|
||||||
if (desc->FirstThunk != 0)
|
|
||||||
{
|
|
||||||
IMAGE_THUNK_DATA *data = (IMAGE_THUNK_DATA *)(base + desc->OriginalFirstThunk);
|
|
||||||
DWORD *iat = (DWORD *)(base + desc->FirstThunk);
|
|
||||||
while (data->u1.Function)
|
|
||||||
{
|
|
||||||
if ((data->u1.Ordinal & IMAGE_ORDINAL_FLAG32) != IMAGE_ORDINAL_FLAG32)
|
|
||||||
{
|
|
||||||
IMAGE_IMPORT_BY_NAME *import = (IMAGE_IMPORT_BY_NAME *)(base + data->u1.AddressOfData);
|
|
||||||
if (strcmp((char *)import->Name, "GetProcAddress") == 0)
|
|
||||||
{
|
|
||||||
DWORD oldprot, oldprot2;
|
|
||||||
VirtualProtect(iat, 4, PAGE_READWRITE, &oldprot);
|
|
||||||
*iat = (DWORD)GetProcAddress2;
|
|
||||||
VirtualProtect(iat, 4, oldprot, &oldprot2);
|
|
||||||
found = true;
|
|
||||||
goto _end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
data++;
|
|
||||||
iat++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
desc++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (Module32Next(hModuleList, &me32));
|
} while (Module32Next(hModuleList, &me32));
|
||||||
|
|
||||||
_end:
|
CloseHandle(hModuleList);
|
||||||
|
|
||||||
if (!found)
|
/* This really should not happen, but ... */
|
||||||
|
if (!engine)
|
||||||
{
|
{
|
||||||
Error("Could not find steam.dll's GetProcAddress IAT entry");
|
Error("[SM] Could not find engine.dll\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
CloseHandle(hModuleList);
|
/* Steam.dll isn't loaded yet */
|
||||||
|
if (!steam)
|
||||||
|
{
|
||||||
|
if (!HookImportAddrTable(engine, "LoadLibraryExA", (DWORD)LoadLibraryEx2, err, sizeof(err)))
|
||||||
|
{
|
||||||
|
Error("[SM] %s in engine.dll)\n", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!HookImportAddrTable(steam, "GetProcAddress", (DWORD)GetProcAddress2, err, sizeof(err)))
|
||||||
|
{
|
||||||
|
Error("[SM] %s in steam.dll)\n", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} s_CrazyDebugger;
|
} s_CrazyDebugger;
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod
|
* SourceMod
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -181,6 +181,9 @@ int DebugReport::_GetPluginIndex(IPluginContext *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
iter->Release();
|
iter->Release();
|
||||||
return -1;
|
|
||||||
|
/* If we don't know which plugin this is, it's one being loaded. Fake its index for now. */
|
||||||
|
|
||||||
|
return g_PluginSys.GetPluginCount() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,8 @@
|
|||||||
#include "sm_queue.h"
|
#include "sm_queue.h"
|
||||||
#include <IGameHelpers.h>
|
#include <IGameHelpers.h>
|
||||||
#include <KeyValues.h>
|
#include <KeyValues.h>
|
||||||
|
#include <server_class.h>
|
||||||
|
#include <datamap.h>
|
||||||
|
|
||||||
class CCommand;
|
class CCommand;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ SRCDS_BASE = ~/srcds
|
|||||||
SMSDK = ..
|
SMSDK = ..
|
||||||
|
|
||||||
#Project options
|
#Project options
|
||||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
GCC4_FLAGS = -fvisibility=hidden
|
GCC4_FLAGS = -fvisibility=hidden
|
||||||
GCC4_CPP_FLAGS = -fvisibility-inlines-hidden
|
GCC4_CPP_FLAGS = -fvisibility-inlines-hidden
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
|
|||||||
+21
-2
@@ -46,6 +46,7 @@
|
|||||||
#include <inetchannel.h>
|
#include <inetchannel.h>
|
||||||
#include <iclient.h>
|
#include <iclient.h>
|
||||||
#include "GameConfigs.h"
|
#include "GameConfigs.h"
|
||||||
|
#include "systems/ExtensionSys.h"
|
||||||
|
|
||||||
PlayerManager g_Players;
|
PlayerManager g_Players;
|
||||||
bool g_OnMapStarted = false;
|
bool g_OnMapStarted = false;
|
||||||
@@ -133,6 +134,8 @@ void PlayerManager::OnSourceModAllInitialized()
|
|||||||
PreAdminCheck = g_Forwards.CreateForward("OnClientPreAdminCheck", ET_Event, 1, p1);
|
PreAdminCheck = g_Forwards.CreateForward("OnClientPreAdminCheck", ET_Event, 1, p1);
|
||||||
PostAdminCheck = g_Forwards.CreateForward("OnClientPostAdminCheck", ET_Ignore, 1, p1);
|
PostAdminCheck = g_Forwards.CreateForward("OnClientPostAdminCheck", ET_Ignore, 1, p1);
|
||||||
PostAdminFilter = g_Forwards.CreateForward("OnClientPostAdminFilter", ET_Ignore, 1, p1);
|
PostAdminFilter = g_Forwards.CreateForward("OnClientPostAdminFilter", ET_Ignore, 1, p1);
|
||||||
|
m_bIsListenServer = !engine->IsDedicatedServer();
|
||||||
|
m_ListenClient = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerManager::OnSourceModShutdown()
|
void PlayerManager::OnSourceModShutdown()
|
||||||
@@ -206,6 +209,7 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
|
|||||||
|
|
||||||
g_NumPlayersToAuth = &m_AuthQueue[0];
|
g_NumPlayersToAuth = &m_AuthQueue[0];
|
||||||
}
|
}
|
||||||
|
g_Extensions.CallOnCoreMapStart(pEdictList, edictCount, clientMax);
|
||||||
m_onActivate->Execute(NULL);
|
m_onActivate->Execute(NULL);
|
||||||
m_onActivate2->Execute(NULL);
|
m_onActivate2->Execute(NULL);
|
||||||
|
|
||||||
@@ -383,7 +387,9 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const
|
|||||||
{
|
{
|
||||||
m_AuthQueue[++m_AuthQueue[0]] = client;
|
m_AuthQueue[++m_AuthQueue[0]] = client;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
RETURN_META_VALUE(MRES_SUPERCEDE, false);
|
RETURN_META_VALUE(MRES_SUPERCEDE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,6 +419,13 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pPlayer->IsFakeClient()
|
||||||
|
&& m_bIsListenServer
|
||||||
|
&& strncmp(pszAddress, "127.0.0.1", 9) == 0)
|
||||||
|
{
|
||||||
|
m_ListenClient = client;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,7 +535,9 @@ void PlayerManager::OnClientDisconnect(edict_t *pEntity)
|
|||||||
{
|
{
|
||||||
m_cldisconnect->PushCell(client);
|
m_cldisconnect->PushCell(client);
|
||||||
m_cldisconnect->Execute(&res, NULL);
|
m_cldisconnect->Execute(&res, NULL);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
/* We don't care, prevent a double call */
|
/* We don't care, prevent a double call */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -563,6 +578,10 @@ void PlayerManager::OnClientDisconnect(edict_t *pEntity)
|
|||||||
|
|
||||||
m_Players[client].Disconnect();
|
m_Players[client].Disconnect();
|
||||||
m_UserIdLookUp[engine->GetPlayerUserId(pEntity)] = 0;
|
m_UserIdLookUp[engine->GetPlayerUserId(pEntity)] = 0;
|
||||||
|
if (m_ListenClient == client)
|
||||||
|
{
|
||||||
|
m_ListenClient = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerManager::OnClientDisconnect_Post(edict_t *pEntity)
|
void PlayerManager::OnClientDisconnect_Post(edict_t *pEntity)
|
||||||
|
|||||||
@@ -161,6 +161,10 @@ public:
|
|||||||
{
|
{
|
||||||
return m_PlayerCount;
|
return m_PlayerCount;
|
||||||
}
|
}
|
||||||
|
inline int ListenClient()
|
||||||
|
{
|
||||||
|
return m_ListenClient;
|
||||||
|
}
|
||||||
bool CheckSetAdmin(int index, CPlayer *pPlayer, AdminId id);
|
bool CheckSetAdmin(int index, CPlayer *pPlayer, AdminId id);
|
||||||
bool CheckSetAdminName(int index, CPlayer *pPlayer, AdminId id);
|
bool CheckSetAdminName(int index, CPlayer *pPlayer, AdminId id);
|
||||||
const char *GetPassInfoVar();
|
const char *GetPassInfoVar();
|
||||||
@@ -188,6 +192,8 @@ private:
|
|||||||
unsigned int *m_AuthQueue;
|
unsigned int *m_AuthQueue;
|
||||||
String m_PassInfoVar;
|
String m_PassInfoVar;
|
||||||
bool m_QueryLang;
|
bool m_QueryLang;
|
||||||
|
bool m_bIsListenServer;
|
||||||
|
int m_ListenClient;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern PlayerManager g_Players;
|
extern PlayerManager g_Players;
|
||||||
|
|||||||
@@ -5,35 +5,35 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemod_mm", "sourcemod_m
|
|||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
CrazyDebug|Win32 = CrazyDebug|Win32
|
CrazyDebug - Episode 1|Win32 = CrazyDebug - Episode 1|Win32
|
||||||
|
CrazyDebug - Old Metamod|Win32 = CrazyDebug - Old Metamod|Win32
|
||||||
|
CrazyDebug - Orange Box|Win32 = CrazyDebug - Orange Box|Win32
|
||||||
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
|
Debug - Episode 1|Win32 = Debug - Episode 1|Win32
|
||||||
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
|
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
|
||||||
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
|
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Release - Episode 1|Win32 = Release - Episode 1|Win32
|
Release - Episode 1|Win32 = Release - Episode 1|Win32
|
||||||
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
|
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
|
||||||
Release - Orange Box|Win32 = Release - Orange Box|Win32
|
Release - Orange Box|Win32 = Release - Orange Box|Win32
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug|Win32.ActiveCfg = CrazyDebug|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Episode 1|Win32.ActiveCfg = CrazyDebug - Episode 1|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug|Win32.Build.0 = CrazyDebug|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Episode 1|Win32.Build.0 = CrazyDebug - Episode 1|Win32
|
||||||
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Old Metamod|Win32.ActiveCfg = CrazyDebug - Old Metamod|Win32
|
||||||
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Old Metamod|Win32.Build.0 = CrazyDebug - Old Metamod|Win32
|
||||||
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box|Win32.ActiveCfg = CrazyDebug - Orange Box|Win32
|
||||||
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug - Orange Box|Win32.Build.0 = CrazyDebug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug|Win32.ActiveCfg = CrazyDebug|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug|Win32.Build.0 = CrazyDebug|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
|
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release|Win32.ActiveCfg = Debug - Old Metamod|Win32
|
|
||||||
{E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release|Win32.Build.0 = Debug - Old Metamod|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
+568
-385
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -40,7 +40,7 @@
|
|||||||
* @file Contains SourceMod version information.
|
* @file Contains SourceMod version information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1946"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1946
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
#include "sm_globals.h"
|
#include "sm_globals.h"
|
||||||
#include "sourcemod.h"
|
#include "sourcemod.h"
|
||||||
#include "sourcemm_api.h"
|
#include "sourcemm_api.h"
|
||||||
#include "server_class.h"
|
|
||||||
#include "PlayerManager.h"
|
#include "PlayerManager.h"
|
||||||
#include "HalfLife2.h"
|
#include "HalfLife2.h"
|
||||||
#include "GameConfigs.h"
|
#include "GameConfigs.h"
|
||||||
|
|||||||
+103
-19
@@ -2,7 +2,7 @@
|
|||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod
|
* SourceMod
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -765,115 +765,199 @@ static cell_t IsTimingOut(IPluginContext *pContext, const cell_t *params)
|
|||||||
static cell_t GetLatency(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetLatency(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
|
float value;
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
if (!pPlayer)
|
if (!pPlayer)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
} else if (!pPlayer->IsInGame()) {
|
}
|
||||||
|
else if (!pPlayer->IsInGame())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is not in game", client);
|
return pContext->ThrowNativeError("Client %d is not in game", client);
|
||||||
} else if (pPlayer->IsFakeClient()) {
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is a bot", client);
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
||||||
|
|
||||||
return sp_ftoc(pInfo->GetLatency(params[2]));
|
if (params[2] == MAX_FLOWS)
|
||||||
|
{
|
||||||
|
value = pInfo->GetLatency(FLOW_INCOMING) + pInfo->GetLatency(FLOW_OUTGOING);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = pInfo->GetLatency(params[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetAvgLatency(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetAvgLatency(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
|
float value;
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
if (!pPlayer)
|
if (!pPlayer)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
} else if (!pPlayer->IsInGame()) {
|
}
|
||||||
|
else if (!pPlayer->IsInGame())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is not in game", client);
|
return pContext->ThrowNativeError("Client %d is not in game", client);
|
||||||
} else if (pPlayer->IsFakeClient()) {
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is a bot", client);
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
||||||
|
|
||||||
return sp_ftoc(pInfo->GetAvgLatency(params[2]));
|
if (params[2] == MAX_FLOWS)
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgLatency(FLOW_INCOMING) + pInfo->GetAvgLatency(FLOW_OUTGOING);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgLatency(params[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetAvgLoss(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetAvgLoss(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
|
float value;
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
if (!pPlayer)
|
if (!pPlayer)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
} else if (!pPlayer->IsInGame()) {
|
}
|
||||||
|
else if (!pPlayer->IsInGame())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is not in game", client);
|
return pContext->ThrowNativeError("Client %d is not in game", client);
|
||||||
} else if (pPlayer->IsFakeClient()) {
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is a bot", client);
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
||||||
|
|
||||||
return sp_ftoc(pInfo->GetAvgLoss(params[2]));
|
if (params[2] == MAX_FLOWS)
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgLoss(FLOW_INCOMING) + pInfo->GetAvgLoss(FLOW_OUTGOING);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgLoss(params[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetAvgChoke(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetAvgChoke(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
|
float value;
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
if (!pPlayer)
|
if (!pPlayer)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
} else if (!pPlayer->IsInGame()) {
|
}
|
||||||
|
else if (!pPlayer->IsInGame())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is not in game", client);
|
return pContext->ThrowNativeError("Client %d is not in game", client);
|
||||||
} else if (pPlayer->IsFakeClient()) {
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is a bot", client);
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
||||||
|
|
||||||
return sp_ftoc(pInfo->GetAvgChoke(params[2]));
|
if (params[2] == MAX_FLOWS)
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgChoke(FLOW_INCOMING) + pInfo->GetAvgChoke(FLOW_OUTGOING);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgChoke(params[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetAvgData(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetAvgData(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
|
float value;
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
if (!pPlayer)
|
if (!pPlayer)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
} else if (!pPlayer->IsInGame()) {
|
}
|
||||||
|
else if (!pPlayer->IsInGame())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is not in game", client);
|
return pContext->ThrowNativeError("Client %d is not in game", client);
|
||||||
} else if (pPlayer->IsFakeClient()) {
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is a bot", client);
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
||||||
|
|
||||||
return sp_ftoc(pInfo->GetAvgData(params[2]));
|
if (params[2] == MAX_FLOWS)
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgData(FLOW_INCOMING) + pInfo->GetAvgData(FLOW_OUTGOING);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgData(params[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetAvgPackets(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetAvgPackets(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
|
float value;
|
||||||
|
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
if (!pPlayer)
|
if (!pPlayer)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
} else if (!pPlayer->IsInGame()) {
|
}
|
||||||
|
else if (!pPlayer->IsInGame())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is not in game", client);
|
return pContext->ThrowNativeError("Client %d is not in game", client);
|
||||||
} else if (pPlayer->IsFakeClient()) {
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
return pContext->ThrowNativeError("Client %d is a bot", client);
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
|
||||||
|
|
||||||
return sp_ftoc(pInfo->GetAvgPackets(params[2]));
|
if (params[2] == MAX_FLOWS)
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgPackets(FLOW_INCOMING) + pInfo->GetAvgPackets(FLOW_OUTGOING);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = pInfo->GetAvgPackets(params[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t GetClientOfUserId(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetClientOfUserId(IPluginContext *pContext, const cell_t *params)
|
||||||
|
|||||||
@@ -1369,3 +1369,20 @@ IExtension *CExtensionManager::LoadExternal(IExtensionInterface *pInterface,
|
|||||||
return pExt;
|
return pExt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CExtensionManager::CallOnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
|
{
|
||||||
|
IExtensionInterface *pAPI;
|
||||||
|
List<CExtension *>::iterator iter;
|
||||||
|
|
||||||
|
for (iter=m_Libs.begin(); iter!=m_Libs.end(); iter++)
|
||||||
|
{
|
||||||
|
if ((pAPI = (*iter)->GetAPI()) == NULL)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (pAPI->GetExtensionVersion() > 3)
|
||||||
|
{
|
||||||
|
pAPI->OnCoreMapStart(pEdictList, edictCount, clientMax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ public:
|
|||||||
void AddLibrary(IExtension *pSource, const char *library);
|
void AddLibrary(IExtension *pSource, const char *library);
|
||||||
bool LibraryExists(const char *library);
|
bool LibraryExists(const char *library);
|
||||||
void OverrideNatives(IExtension *myself, const sp_nativeinfo_t *natives);
|
void OverrideNatives(IExtension *myself, const sp_nativeinfo_t *natives);
|
||||||
|
void CallOnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
|
||||||
public:
|
public:
|
||||||
CExtension *GetExtensionFromIdent(IdentityToken_t *ptr);
|
CExtension *GetExtensionFromIdent(IdentityToken_t *ptr);
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
/* ======== Basic Admin tool ========
|
|
||||||
* Copyright (C) 2004-2006 Erling K. Sæterdal
|
|
||||||
* No warranties of any kind
|
|
||||||
*
|
|
||||||
* License: zlib/libpng
|
|
||||||
*
|
|
||||||
* Author(s): Erling K. Sæterdal ( EKS )
|
|
||||||
* Credits:
|
|
||||||
* Menu code based on code from CSDM ( http://www.tcwonline.org/~dvander/cssdm ) Created by BAILOPAN
|
|
||||||
* Helping on misc errors/functions: BAILOPAN,LDuke,sslice,devicenull,PMOnoTo,cybermind ( most who idle in #sourcemod on GameSurge realy )
|
|
||||||
* ============================ */
|
|
||||||
|
|
||||||
#ifndef _INCLUDE_BATINTERFACE
|
|
||||||
#define _INCLUDE_BATINTERFACE
|
|
||||||
#include <ISmmPlugin.h>
|
|
||||||
|
|
||||||
#define ADMININTERFACE_VERSION 0
|
|
||||||
#define ADMININTERFACE_MAXACCESSLENGTHTEXT 50 // This is the maximum length of a "flag" access text.
|
|
||||||
|
|
||||||
//#include "BATMenu.h"
|
|
||||||
|
|
||||||
//extern menuId g_AdminMenu;
|
|
||||||
class AdminInterfaceListner
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void OnAdminInterfaceUnload()=0;
|
|
||||||
virtual void Client_Authorized(int id)=0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class AdminInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual bool RegisterFlag(const char *Class,const char *Flag,const char *Description) = 0; // Registers a new admin access
|
|
||||||
virtual bool IsClient(int id) = 0; // returns false if client is bot, or NOT connected
|
|
||||||
virtual bool HasFlag(int id,const char *Flag) = 0; // returns true if the player has this access flag, lower case only
|
|
||||||
virtual int GetInterfaceVersion() = 0 ; // Returns the interface version of the admin mod
|
|
||||||
virtual const char* GetModName() = 0; // Returns the name of the current admin mod
|
|
||||||
virtual void AddEventListner(AdminInterfaceListner *ptr) = 0; // You should ALLWAYS set this, so you know when the "server" plugin gets unloaded
|
|
||||||
virtual void RemoveListner(AdminInterfaceListner *ptr) = 0; // You MUST CALL this function in your plugin unloads function, or the admin plugin will crash on next client connect.
|
|
||||||
};
|
|
||||||
|
|
||||||
class BATAdminInterface : public AdminInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
bool RegisterFlag(const char *Class,const char *Flag,const char *Description); // Max 1 admin access at the time, returns true if done successfully
|
|
||||||
bool IsClient(int id); // returns false if client is bot, or NOT connected
|
|
||||||
bool HasFlag(int id,const char *Flag); // returns true if the player has this access flag
|
|
||||||
int GetInterfaceVersion() { return ADMININTERFACE_VERSION; } // Returns the interface version of the admin mod
|
|
||||||
const char* GetModName() { return "BAT"; } // Returns the name of the current admin mod
|
|
||||||
void AddEventListner(AdminInterfaceListner *ptr); // You should ALLWAYS set this, so you know when the "server" plugin gets unloaded
|
|
||||||
void RemoveListner(AdminInterfaceListner *ptr);
|
|
||||||
private:
|
|
||||||
char GetFlagFromInt(int CharIndex);
|
|
||||||
bool CustomAccessExistence(const char *Flag);
|
|
||||||
};
|
|
||||||
class MyListener : public IMetamodListener
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void *OnMetamodQuery(const char *iface, int *ret);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
#(C)2004-2006 SourceMM Development Team
|
|
||||||
# Makefile written by David "BAILOPAN" Anderson
|
|
||||||
|
|
||||||
SMSDK = ../..
|
|
||||||
SRCDS = ~/srcds
|
|
||||||
SOURCEMM = ../../../../sourcemm
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
PROJECT = batsupport
|
|
||||||
|
|
||||||
#Uncomment for SourceMM-enabled extensions
|
|
||||||
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
|
|
||||||
|
|
||||||
OBJECTS = sdk/smsdk_ext.cpp extension.cpp
|
|
||||||
|
|
||||||
##############################################
|
|
||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
|
||||||
CPP = gcc-4.1
|
|
||||||
|
|
||||||
HL2PUB = $(HL2SDK)/public
|
|
||||||
HL2LIB = $(HL2SDK)/linux_sdk
|
|
||||||
HL2SDK = $(SOURCEMM)/hl2sdk
|
|
||||||
SMM_TRUNK = $(SOURCEMM)/trunk
|
|
||||||
|
|
||||||
LINK = $(LINK_HL2) -static-libgcc
|
|
||||||
|
|
||||||
INCLUDE = -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
|
|
||||||
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(SMM_TRUNK) -I$(SMM_TRUNK)/sourcehook -I$(SMM_TRUNK)/sourcemm \
|
|
||||||
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions \
|
|
||||||
|
|
||||||
CFLAGS = -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror -fPIC -msse -DSOURCEMOD_BUILD
|
|
||||||
CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
|
||||||
|
|
||||||
################################################
|
|
||||||
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
|
||||||
################################################
|
|
||||||
|
|
||||||
ifeq "$(DEBUG)" "true"
|
|
||||||
BIN_DIR = Debug
|
|
||||||
CFLAGS += $(C_DEBUG_FLAGS)
|
|
||||||
else
|
|
||||||
BIN_DIR = Release
|
|
||||||
CFLAGS += $(C_OPT_FLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
|
||||||
ifeq "$(GCC_VERSION)" "4"
|
|
||||||
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
BINARY = $(PROJECT).ext.so
|
|
||||||
|
|
||||||
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
|
||||||
|
|
||||||
$(BIN_DIR)/%.o: %.cpp
|
|
||||||
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
all:
|
|
||||||
mkdir -p $(BIN_DIR)/sdk
|
|
||||||
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so
|
|
||||||
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so
|
|
||||||
$(MAKE) extension
|
|
||||||
|
|
||||||
extension: $(OBJ_LINUX)
|
|
||||||
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
|
||||||
|
|
||||||
debug:
|
|
||||||
$(MAKE) all DEBUG=true
|
|
||||||
|
|
||||||
default: all
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf Release/*.o
|
|
||||||
rm -rf Release/sdk/*.o
|
|
||||||
rm -rf Release/$(BINARY)
|
|
||||||
rm -rf Debug/*.o
|
|
||||||
rm -rf Debug/sdk/*.o
|
|
||||||
rm -rf Debug/$(BINARY)
|
|
||||||
@@ -1,270 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod BAT Support Extension
|
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <IAdminSystem.h>
|
|
||||||
#include <IPlayerHelpers.h>
|
|
||||||
#include "extension.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file extension.cpp
|
|
||||||
* @brief Implements BAT Support extension code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
BatSupport g_BatSupport; /**< Global singleton for your extension's main interface */
|
|
||||||
IAdminSystem *admins = NULL;
|
|
||||||
IPlayerManager *players = NULL;
|
|
||||||
SMEXT_LINK(&g_BatSupport);
|
|
||||||
|
|
||||||
bool BatSupport::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|
||||||
{
|
|
||||||
SM_GET_IFACE(ADMINSYS, admins);
|
|
||||||
SM_GET_IFACE(PLAYERMANAGER, players);
|
|
||||||
|
|
||||||
players->AddClientListener(this);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BatSupport::SDK_OnUnload()
|
|
||||||
{
|
|
||||||
players->RemoveClientListener(this);
|
|
||||||
|
|
||||||
List<AdminInterfaceListner *>::iterator iter;
|
|
||||||
AdminInterfaceListner *hook;
|
|
||||||
|
|
||||||
for (iter=m_hooks.begin(); iter!=m_hooks.end(); iter++)
|
|
||||||
{
|
|
||||||
hook = (*iter);
|
|
||||||
hook->OnAdminInterfaceUnload();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* In case plugins don't do this */
|
|
||||||
m_hooks.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BatSupport::SDK_OnMetamodLoad(char *error, size_t maxlength, bool late)
|
|
||||||
{
|
|
||||||
g_SMAPI->AddListener(this, this);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BatSupport::OnClientAuthorized(int client, const char *authstring)
|
|
||||||
{
|
|
||||||
List<AdminInterfaceListner *>::iterator iter;
|
|
||||||
AdminInterfaceListner *hook;
|
|
||||||
|
|
||||||
for (iter=m_hooks.begin(); iter!=m_hooks.end(); iter++)
|
|
||||||
{
|
|
||||||
hook = (*iter);
|
|
||||||
hook->Client_Authorized(client);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *BatSupport::GetModName()
|
|
||||||
{
|
|
||||||
return "SourceMod";
|
|
||||||
}
|
|
||||||
|
|
||||||
int BatSupport::GetInterfaceVersion()
|
|
||||||
{
|
|
||||||
return ADMININTERFACE_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *BatSupport::OnMetamodQuery(const char *iface, int *ret)
|
|
||||||
{
|
|
||||||
if (strcmp(iface, "AdminInterface") == 0)
|
|
||||||
{
|
|
||||||
AdminInterface *pThis = this;
|
|
||||||
if (ret)
|
|
||||||
{
|
|
||||||
*ret = IFACE_OK;
|
|
||||||
}
|
|
||||||
return pThis;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
{
|
|
||||||
*ret = IFACE_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BatSupport::RegisterFlag(const char *Class,const char *Flag,const char *Description)
|
|
||||||
{
|
|
||||||
/* No empty flags */
|
|
||||||
if (Flag[0] == '\0')
|
|
||||||
{
|
|
||||||
g_pSM->LogError(myself, "BAT AdminInterface support tried to register a blank flag");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We only support up to 6 custom flags for SourceMod */
|
|
||||||
if (m_flags.size() >= 6)
|
|
||||||
{
|
|
||||||
g_pSM->LogError(myself, "BAT AdminInterface support reached maximum number of custom flags");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<CustomFlag>::iterator iter;
|
|
||||||
for (iter=m_flags.begin(); iter!=m_flags.end(); iter++)
|
|
||||||
{
|
|
||||||
CustomFlag &cf = (*iter);
|
|
||||||
/* Ignore already registered, in case plugin is reloading */
|
|
||||||
if (cf.name.compare(Flag) == 0)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_pSM->LogMessage(myself,
|
|
||||||
"BAT AdminInterface support registered Admin_Custom%d (class \"%s\") (flag \"%s\") (descr \"%s\")",
|
|
||||||
m_flags.size() + 1,
|
|
||||||
Class,
|
|
||||||
Flag,
|
|
||||||
Description);
|
|
||||||
|
|
||||||
unsigned int f = (unsigned int)Admin_Custom1;
|
|
||||||
f += m_flags.size();
|
|
||||||
|
|
||||||
CustomFlag cf;
|
|
||||||
cf.bit = (1<<f);
|
|
||||||
cf.flag = (AdminFlag)f;
|
|
||||||
cf.name.assign(Flag);
|
|
||||||
|
|
||||||
m_flags.push_back(cf);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BatSupport::IsClient(int id)
|
|
||||||
{
|
|
||||||
IGamePlayer *pPlayer = players->GetGamePlayer(id);
|
|
||||||
|
|
||||||
if (!pPlayer)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pPlayer->IsConnected())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pPlayer->IsFakeClient())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BatSupport::AddEventListner(AdminInterfaceListner *ptr)
|
|
||||||
{
|
|
||||||
m_hooks.push_back(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BatSupport::RemoveListner(AdminInterfaceListner *ptr)
|
|
||||||
{
|
|
||||||
m_hooks.remove(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BatSupport::HasFlag(int id,const char *Flag)
|
|
||||||
{
|
|
||||||
IGamePlayer *pPlayer = players->GetGamePlayer(id);
|
|
||||||
|
|
||||||
if (!pPlayer || !pPlayer->IsConnected())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
AdminId admin = pPlayer->GetAdminId();
|
|
||||||
if (admin == INVALID_ADMIN_ID)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
FlagBits bits = admins->GetAdminFlags(admin, Access_Effective);
|
|
||||||
|
|
||||||
/* Root has it all... except for immunity */
|
|
||||||
if ((strcmp(Flag, "immunity") != 0)
|
|
||||||
&& ((bits & ADMFLAG_ROOT) == ADMFLAG_ROOT))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(Flag, "any"))
|
|
||||||
{
|
|
||||||
return ((bits & ~ADMFLAG_RESERVATION) != 0);
|
|
||||||
} else if (!strcmp(Flag, "kick")) {
|
|
||||||
return ((bits & ADMFLAG_KICK) == ADMFLAG_KICK);
|
|
||||||
} else if (!strcmp(Flag, "slap")) {
|
|
||||||
return ((bits & ADMFLAG_SLAY) == ADMFLAG_SLAY);
|
|
||||||
} else if (!strcmp(Flag, "slay")) {
|
|
||||||
return ((bits & ADMFLAG_SLAY) == ADMFLAG_SLAY);
|
|
||||||
} else if (!strcmp(Flag, "ban")) {
|
|
||||||
return ((bits & ADMFLAG_BAN) == ADMFLAG_BAN);
|
|
||||||
} else if (!strcmp(Flag, "chat")) {
|
|
||||||
return ((bits & ADMFLAG_CHAT) == ADMFLAG_CHAT);
|
|
||||||
} else if (!strcmp(Flag, "rcon")) {
|
|
||||||
return ((bits & ADMFLAG_RCON) == ADMFLAG_RCON);
|
|
||||||
} else if (!strcmp(Flag, "map")) {
|
|
||||||
return ((bits & ADMFLAG_CHANGEMAP) == ADMFLAG_CHANGEMAP);
|
|
||||||
} else if (!strcmp(Flag, "reservedslots")) {
|
|
||||||
return ((bits & ADMFLAG_RESERVATION) == ADMFLAG_RESERVATION);
|
|
||||||
} else if (!strcmp(Flag, "immunuty")) {
|
|
||||||
/* This is a bit different... */
|
|
||||||
unsigned int count = admins->GetAdminGroupCount(admin);
|
|
||||||
for (unsigned int i=0; i<count; i++)
|
|
||||||
{
|
|
||||||
GroupId gid = admins->GetAdminGroup(admin, i, NULL);
|
|
||||||
if (admins->GetGroupGenericImmunity(gid, Immunity_Default)
|
|
||||||
|| admins->GetGroupGenericImmunity(gid, Immunity_Global))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<CustomFlag>::iterator iter;
|
|
||||||
for (iter=m_flags.begin(); iter!=m_flags.end(); iter++)
|
|
||||||
{
|
|
||||||
CustomFlag &cf = (*iter);
|
|
||||||
if (cf.name.compare(Flag) == 0)
|
|
||||||
{
|
|
||||||
return ((bits & cf.bit) == cf.bit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod BAT Support Extension
|
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
||||||
#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file extension.h
|
|
||||||
* @brief BAT Support extension code header.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "smsdk_ext.h"
|
|
||||||
#include "BATInterface.h"
|
|
||||||
#include <sh_list.h>
|
|
||||||
#include <sh_string.h>
|
|
||||||
|
|
||||||
using namespace SourceHook;
|
|
||||||
|
|
||||||
struct CustomFlag
|
|
||||||
{
|
|
||||||
String name;
|
|
||||||
AdminFlag flag;
|
|
||||||
FlagBits bit;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Implementation of the BAT Support extension.
|
|
||||||
* Note: Uncomment one of the pre-defined virtual functions in order to use it.
|
|
||||||
*/
|
|
||||||
class BatSupport :
|
|
||||||
public SDKExtension,
|
|
||||||
public IMetamodListener,
|
|
||||||
public AdminInterface,
|
|
||||||
public IClientListener
|
|
||||||
{
|
|
||||||
public: // SDKExtension
|
|
||||||
bool SDK_OnLoad(char *error, size_t maxlength, bool late);
|
|
||||||
void SDK_OnUnload();
|
|
||||||
bool SDK_OnMetamodLoad(char *error, size_t maxlength, bool late);
|
|
||||||
public: // IMetamodListener
|
|
||||||
void *OnMetamodQuery(const char *iface, int *ret);
|
|
||||||
public: // AdminInterface
|
|
||||||
bool RegisterFlag(const char *Class, const char *Flag, const char *Description);
|
|
||||||
bool IsClient(int id);
|
|
||||||
bool HasFlag(int id, const char *Flag);
|
|
||||||
int GetInterfaceVersion();
|
|
||||||
const char* GetModName();
|
|
||||||
void AddEventListner(AdminInterfaceListner *ptr);
|
|
||||||
void RemoveListner(AdminInterfaceListner *ptr);
|
|
||||||
public: // IClientListener
|
|
||||||
void OnClientAuthorized(int client, const char *authstring);
|
|
||||||
private:
|
|
||||||
List<AdminInterfaceListner *> m_hooks;
|
|
||||||
List<CustomFlag> m_flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
|
||||||
# Visual Studio 2005
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BatSupport", "BatSupport.vcproj", "{E2FDA25A-3F36-46CE-A4EB-F4AB60011386}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{E2FDA25A-3F36-46CE-A4EB-F4AB60011386}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{E2FDA25A-3F36-46CE-A4EB-F4AB60011386}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{E2FDA25A-3F36-46CE-A4EB-F4AB60011386}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{E2FDA25A-3F36-46CE-A4EB-F4AB60011386}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
Name="BatSupport"
|
|
||||||
ProjectGUID="{E2FDA25A-3F36-46ce-A4EB-F4AB60011386}"
|
|
||||||
RootNamespace="BatSupport"
|
|
||||||
Keyword="Win32Proj"
|
|
||||||
>
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"
|
|
||||||
/>
|
|
||||||
</Platforms>
|
|
||||||
<ToolFiles>
|
|
||||||
</ToolFiles>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
|
||||||
MinimalRebuild="true"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
RuntimeTypeInfo="false"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="false"
|
|
||||||
DebugInformationFormat="4"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="tier0.lib"
|
|
||||||
OutputFile="$(OutDir)\batsupport.ext.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
SubSystem="2"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2"
|
|
||||||
WholeProgramOptimization="1"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
RuntimeTypeInfo="false"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="false"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="$(OutDir)\sample.ext.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{863879FA-7F21-4e8c-8BCE-361A3ECB41CC}"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="..\extension.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{C7385807-ED7A-4b43-9447-993597508211}"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="..\BATInterface.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\extension.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
|
||||||
UniqueIdentifier="{B3C3137B-2DF6-40b9-883E-EF7D84114CEA}"
|
|
||||||
>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="SourceMod SDK"
|
|
||||||
UniqueIdentifier="{A47503F4-3D11-4b37-851B-34562E7425A6}"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="..\sdk\smsdk_config.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\sdk\smsdk_ext.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\sdk\smsdk_ext.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod BAT Support Extension
|
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
|
||||||
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file smsdk_config.h
|
|
||||||
* @brief Contains macros for configuring basic extension information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Basic information exposed publicly */
|
|
||||||
#define SMEXT_CONF_NAME "BAT Support"
|
|
||||||
#define SMEXT_CONF_DESCRIPTION "Adds support for BAT's AdminInterface"
|
|
||||||
#define SMEXT_CONF_VERSION "1.0.0.0"
|
|
||||||
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
|
||||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
|
||||||
#define SMEXT_CONF_LOGTAG "BATSUPPORT"
|
|
||||||
#define SMEXT_CONF_LICENSE "GPL"
|
|
||||||
#define SMEXT_CONF_DATESTRING __DATE__
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Exposes plugin's main interface.
|
|
||||||
*/
|
|
||||||
#define SMEXT_LINK(name) SDKExtension *g_pExtensionIface = name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Sets whether or not this plugin required Metamod.
|
|
||||||
* NOTE: Uncomment to enable, comment to disable.
|
|
||||||
*/
|
|
||||||
#define SMEXT_CONF_METAMOD
|
|
||||||
|
|
||||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
|
||||||
@@ -1,347 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod Base Extension Code
|
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <malloc.h>
|
|
||||||
#include "smsdk_ext.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file smsdk_ext.cpp
|
|
||||||
* @brief Contains wrappers for making Extensions easier to write.
|
|
||||||
*/
|
|
||||||
|
|
||||||
IShareSys *g_pShareSys = NULL; /**< Share system */
|
|
||||||
IExtension *myself = NULL; /**< Ourself */
|
|
||||||
IHandleSys *g_pHandleSys = NULL; /**< Handle system */
|
|
||||||
ISourceMod *g_pSM = NULL; /**< SourceMod helpers */
|
|
||||||
IForwardManager *g_pForwards = NULL; /**< Forward system */
|
|
||||||
|
|
||||||
/** Exports the main interface */
|
|
||||||
PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI()
|
|
||||||
{
|
|
||||||
return g_pExtensionIface;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDKExtension::SDKExtension()
|
|
||||||
{
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
m_SourceMMLoaded = false;
|
|
||||||
m_WeAreUnloaded = false;
|
|
||||||
m_WeGotPauseChange = false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late)
|
|
||||||
{
|
|
||||||
g_pShareSys = sys;
|
|
||||||
myself = me;
|
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
m_WeAreUnloaded = true;
|
|
||||||
|
|
||||||
if (!m_SourceMMLoaded)
|
|
||||||
{
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
snprintf(error, maxlength, "Metamod attach failed");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SM_GET_IFACE(HANDLESYSTEM, g_pHandleSys);
|
|
||||||
SM_GET_IFACE(SOURCEMOD, g_pSM);
|
|
||||||
SM_GET_IFACE(FORWARDMANAGER, g_pForwards);
|
|
||||||
|
|
||||||
if (SDK_OnLoad(error, maxlength, late))
|
|
||||||
{
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
m_WeAreUnloaded = true;
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::IsMetamodExtension()
|
|
||||||
{
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDKExtension::OnExtensionPauseChange(bool state)
|
|
||||||
{
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
m_WeGotPauseChange = true;
|
|
||||||
#endif
|
|
||||||
SDK_OnPauseChange(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDKExtension::OnExtensionsAllLoaded()
|
|
||||||
{
|
|
||||||
SDK_OnAllLoaded();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDKExtension::OnExtensionUnload()
|
|
||||||
{
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
m_WeAreUnloaded = true;
|
|
||||||
#endif
|
|
||||||
SDK_OnUnload();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionAuthor()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_AUTHOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionDateString()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_DATESTRING;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionDescription()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_DESCRIPTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionVerString()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionName()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionTag()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_LOGTAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetExtensionURL()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_URL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDKExtension::SDK_OnUnload()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDKExtension::SDK_OnPauseChange(bool paused)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDKExtension::SDK_OnAllLoaded()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
|
|
||||||
PluginId g_PLID = 0; /**< Metamod plugin ID */
|
|
||||||
ISmmPlugin *g_PLAPI = NULL; /**< Metamod plugin API */
|
|
||||||
SourceHook::ISourceHook *g_SHPtr = NULL; /**< SourceHook pointer */
|
|
||||||
ISmmAPI *g_SMAPI = NULL; /**< SourceMM API pointer */
|
|
||||||
|
|
||||||
IVEngineServer *engine = NULL; /**< IVEngineServer pointer */
|
|
||||||
IServerGameDLL *gamedll = NULL; /**< IServerGameDLL pointer */
|
|
||||||
|
|
||||||
/** Exposes the extension to Metamod */
|
|
||||||
SMM_API void *PL_EXPOSURE(const char *name, int *code)
|
|
||||||
{
|
|
||||||
if (name && !strcmp(name, PLAPI_NAME))
|
|
||||||
{
|
|
||||||
if (code)
|
|
||||||
{
|
|
||||||
*code = IFACE_OK;
|
|
||||||
}
|
|
||||||
return static_cast<void *>(g_pExtensionIface);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (code)
|
|
||||||
{
|
|
||||||
*code = IFACE_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
|
|
||||||
{
|
|
||||||
PLUGIN_SAVEVARS();
|
|
||||||
|
|
||||||
GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
|
||||||
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
|
||||||
|
|
||||||
m_SourceMMLoaded = true;
|
|
||||||
|
|
||||||
return SDK_OnMetamodLoad(ismm, error, maxlen, late);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::Unload(char *error, size_t maxlen)
|
|
||||||
{
|
|
||||||
if (!m_WeAreUnloaded)
|
|
||||||
{
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
snprintf(error, maxlen, "This extension must be unloaded by SourceMod.");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return SDK_OnMetamodUnload(error, maxlen);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::Pause(char *error, size_t maxlen)
|
|
||||||
{
|
|
||||||
if (!m_WeGotPauseChange)
|
|
||||||
{
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
snprintf(error, maxlen, "This extension must be paused by SourceMod.");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_WeGotPauseChange = false;
|
|
||||||
|
|
||||||
return SDK_OnMetamodPauseChange(true, error, maxlen);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::Unpause(char *error, size_t maxlen)
|
|
||||||
{
|
|
||||||
if (!m_WeGotPauseChange)
|
|
||||||
{
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
snprintf(error, maxlen, "This extension must be unpaused by SourceMod.");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_WeGotPauseChange = false;
|
|
||||||
|
|
||||||
return SDK_OnMetamodPauseChange(false, error, maxlen);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetAuthor()
|
|
||||||
{
|
|
||||||
return GetExtensionAuthor();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetDate()
|
|
||||||
{
|
|
||||||
return GetExtensionDateString();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetDescription()
|
|
||||||
{
|
|
||||||
return GetExtensionDescription();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetLicense()
|
|
||||||
{
|
|
||||||
return SMEXT_CONF_LICENSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetLogTag()
|
|
||||||
{
|
|
||||||
return GetExtensionTag();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetName()
|
|
||||||
{
|
|
||||||
return GetExtensionName();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetURL()
|
|
||||||
{
|
|
||||||
return GetExtensionURL();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SDKExtension::GetVersion()
|
|
||||||
{
|
|
||||||
return GetExtensionVerString();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::SDK_OnMetamodUnload(char *error, size_t maxlength)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDKExtension::SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Overload a few things to prevent libstdc++ linking */
|
|
||||||
#if defined __linux__
|
|
||||||
extern "C" void __cxa_pure_virtual(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void *operator new(size_t size)
|
|
||||||
{
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *operator new[](size_t size)
|
|
||||||
{
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete(void *ptr)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete[](void * ptr)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,226 +0,0 @@
|
|||||||
/**
|
|
||||||
* vim: set ts=4 :
|
|
||||||
* =============================================================================
|
|
||||||
* SourceMod Base Extension Code
|
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
|
||||||
* =============================================================================
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
||||||
* Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
|
||||||
*
|
|
||||||
* Version: $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_BASESDK_H_
|
|
||||||
#define _INCLUDE_SOURCEMOD_EXTENSION_BASESDK_H_
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file smsdk_ext.h
|
|
||||||
* @brief Contains wrappers for making Extensions easier to write.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "smsdk_config.h"
|
|
||||||
#include <IExtensionSys.h>
|
|
||||||
#include <IHandleSys.h>
|
|
||||||
#include <sp_vm_api.h>
|
|
||||||
#include <sm_platform.h>
|
|
||||||
#include <ISourceMod.h>
|
|
||||||
#include <IForwardSys.h>
|
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
#include <ISmmPlugin.h>
|
|
||||||
#include <eiface.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace SourceMod;
|
|
||||||
using namespace SourcePawn;
|
|
||||||
|
|
||||||
class SDKExtension :
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
public ISmmPlugin,
|
|
||||||
#endif
|
|
||||||
public IExtensionInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/** Constructor */
|
|
||||||
SDKExtension();
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief This is called after the initial loading sequence has been processed.
|
|
||||||
*
|
|
||||||
* @param error Error message buffer.
|
|
||||||
* @param maxlength Size of error message buffer.
|
|
||||||
* @param late Whether or not the module was loaded after map load.
|
|
||||||
* @return True to succeed loading, false to fail.
|
|
||||||
*/
|
|
||||||
virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is called right before the extension is unloaded.
|
|
||||||
*/
|
|
||||||
virtual void SDK_OnUnload();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is called once all known extensions have been loaded.
|
|
||||||
*/
|
|
||||||
virtual void SDK_OnAllLoaded();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Called when the pause state is changed.
|
|
||||||
*/
|
|
||||||
virtual void SDK_OnPauseChange(bool paused);
|
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
/**
|
|
||||||
* @brief Called when Metamod is attached, before the extension version is called.
|
|
||||||
*
|
|
||||||
* @param error Error buffer.
|
|
||||||
* @param maxlength Maximum size of error buffer.
|
|
||||||
* @param late Whether or not Metamod considers this a late load.
|
|
||||||
* @return True to succeed, false to fail.
|
|
||||||
*/
|
|
||||||
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Called when Metamod is detaching, after the extension version is called.
|
|
||||||
* NOTE: By default this is blocked unless sent from SourceMod.
|
|
||||||
*
|
|
||||||
* @param error Error buffer.
|
|
||||||
* @param maxlength Maximum size of error buffer.
|
|
||||||
* @return True to succeed, false to fail.
|
|
||||||
*/
|
|
||||||
virtual bool SDK_OnMetamodUnload(char *error, size_t maxlength);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Called when Metamod's pause state is changing.
|
|
||||||
* NOTE: By default this is blocked unless sent from SourceMod.
|
|
||||||
*
|
|
||||||
* @param paused Pause state being set.
|
|
||||||
* @param error Error buffer.
|
|
||||||
* @param maxlength Maximum size of error buffer.
|
|
||||||
* @return True to succeed, false to fail.
|
|
||||||
*/
|
|
||||||
virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public: // IExtensionInterface
|
|
||||||
virtual bool OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late);
|
|
||||||
virtual void OnExtensionUnload();
|
|
||||||
virtual void OnExtensionsAllLoaded();
|
|
||||||
|
|
||||||
/** Returns whether or not this is a Metamod-based extension */
|
|
||||||
virtual bool IsMetamodExtension();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Called when the pause state changes.
|
|
||||||
*
|
|
||||||
* @param state True if being paused, false if being unpaused.
|
|
||||||
*/
|
|
||||||
virtual void OnExtensionPauseChange(bool state);
|
|
||||||
|
|
||||||
/** Returns name */
|
|
||||||
virtual const char *GetExtensionName();
|
|
||||||
/** Returns URL */
|
|
||||||
virtual const char *GetExtensionURL();
|
|
||||||
/** Returns log tag */
|
|
||||||
virtual const char *GetExtensionTag();
|
|
||||||
/** Returns author */
|
|
||||||
virtual const char *GetExtensionAuthor();
|
|
||||||
/** Returns version string */
|
|
||||||
virtual const char *GetExtensionVerString();
|
|
||||||
/** Returns description string */
|
|
||||||
virtual const char *GetExtensionDescription();
|
|
||||||
/** Returns date string */
|
|
||||||
virtual const char *GetExtensionDateString();
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
public: // ISmmPlugin
|
|
||||||
/** Called when the extension is attached to Metamod. */
|
|
||||||
virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
|
|
||||||
/** Returns the author to MM */
|
|
||||||
virtual const char *GetAuthor();
|
|
||||||
/** Returns the name to MM */
|
|
||||||
virtual const char *GetName();
|
|
||||||
/** Returns the description to MM */
|
|
||||||
virtual const char *GetDescription();
|
|
||||||
/** Returns the URL to MM */
|
|
||||||
virtual const char *GetURL();
|
|
||||||
/** Returns the license to MM */
|
|
||||||
virtual const char *GetLicense();
|
|
||||||
/** Returns the version string to MM */
|
|
||||||
virtual const char *GetVersion();
|
|
||||||
/** Returns the date string to MM */
|
|
||||||
virtual const char *GetDate();
|
|
||||||
/** Returns the logtag to MM */
|
|
||||||
virtual const char *GetLogTag();
|
|
||||||
/** Called on unload */
|
|
||||||
virtual bool Unload(char *error, size_t maxlen);
|
|
||||||
/** Called on pause */
|
|
||||||
virtual bool Pause(char *error, size_t maxlen);
|
|
||||||
/** Called on unpause */
|
|
||||||
virtual bool Unpause(char *error, size_t maxlen);
|
|
||||||
private:
|
|
||||||
bool m_SourceMMLoaded;
|
|
||||||
bool m_WeAreUnloaded;
|
|
||||||
bool m_WeGotPauseChange;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
extern SDKExtension *g_pExtensionIface;
|
|
||||||
|
|
||||||
extern IShareSys *g_pShareSys;
|
|
||||||
extern IExtension *myself;
|
|
||||||
extern IHandleSys *g_pHandleSys;
|
|
||||||
extern ISourceMod *g_pSM;
|
|
||||||
extern IForwardManager *g_pForwards;
|
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
|
||||||
PLUGIN_GLOBALVARS();
|
|
||||||
extern IVEngineServer *engine;
|
|
||||||
extern IServerGameDLL *gamedll;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Creates a SourceMod interface macro pair */
|
|
||||||
#define SM_MKIFACE(name) SMINTERFACE_##name##_NAME, SMINTERFACE_##name##_VERSION
|
|
||||||
/** Automates retrieving SourceMod interfaces */
|
|
||||||
#define SM_GET_IFACE(prefix, addr) \
|
|
||||||
if (!g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)) \
|
|
||||||
{ \
|
|
||||||
if (error) \
|
|
||||||
{ \
|
|
||||||
snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
|
|
||||||
return false; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
/** Automates retrieving SourceMod interfaces when needed outside of SDK_OnLoad() */
|
|
||||||
#define SM_GET_LATE_IFACE(prefix, addr) \
|
|
||||||
g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)
|
|
||||||
/** Validates a SourceMod interface pointer */
|
|
||||||
#define SM_CHECK_IFACE(prefix, addr) \
|
|
||||||
if (!addr) \
|
|
||||||
{ \
|
|
||||||
if (error) \
|
|
||||||
{ \
|
|
||||||
snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
|
|
||||||
return false; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_BASESDK_H_
|
|
||||||
@@ -20,7 +20,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp jit_call.cpp CallWrapper.cpp CallMaker
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#ifndef _INCLUDE_BINTOOLS_VERSION_H_
|
#ifndef _INCLUDE_BINTOOLS_VERSION_H_
|
||||||
#define _INCLUDE_BINTOOLS_VERSION_H_
|
#define _INCLUDE_BINTOOLS_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1900"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1900
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_BINTOOLS_VERSION_H_
|
#endif //_INCLUDE_BINTOOLS_VERSION_H_
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp natives.cpp RegNatives.cpp timeleft.cp
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1884"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1884
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp GeoIP.c
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#ifndef _INCLUDE_GEOIP_VERSION_H_
|
#ifndef _INCLUDE_GEOIP_VERSION_H_
|
||||||
#define _INCLUDE_GEOIP_VERSION_H_
|
#define _INCLUDE_GEOIP_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1884"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1884
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_GEOIP_VERSION_H_
|
#endif //_INCLUDE_GEOIP_VERSION_H_
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp \
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;$(SOURCEMM)\sourcehook"
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;"$(SOURCEMM16)\sourcehook""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;$(SOURCEMM)\sourcehook"
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;"$(SOURCEMM16)\sourcehook""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
StructMemberAlignment="3"
|
StructMemberAlignment="3"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#ifndef _INCLUDE_MYSQLEXT_VERSION_H_
|
#ifndef _INCLUDE_MYSQLEXT_VERSION_H_
|
||||||
#define _INCLUDE_MYSQLEXT_VERSION_H_
|
#define _INCLUDE_MYSQLEXT_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1918"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1918
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_MYSQLEXT_VERSION_H_
|
#endif //_INCLUDE_MYSQLEXT_VERSION_H_
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp vdecoder.cpp vcallbuilder.cpp vcaller.
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
|
SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
|
||||||
SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t *, int, int);
|
|
||||||
|
|
||||||
SDKTools g_SdkTools; /**< Global singleton for extension's main interface */
|
SDKTools g_SdkTools; /**< Global singleton for extension's main interface */
|
||||||
IServerGameEnts *gameents = NULL;
|
IServerGameEnts *gameents = NULL;
|
||||||
@@ -110,7 +109,6 @@ bool SDKTools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
CONVAR_REGISTER(this);
|
CONVAR_REGISTER(this);
|
||||||
|
|
||||||
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SDKTools::LevelInit, true);
|
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SDKTools::LevelInit, true);
|
||||||
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, gamedll, this, &SDKTools::OnServerActivate, false);
|
|
||||||
|
|
||||||
playerhelpers->RegisterCommandTargetProcessor(this);
|
playerhelpers->RegisterCommandTargetProcessor(this);
|
||||||
|
|
||||||
@@ -160,7 +158,6 @@ void SDKTools::SDK_OnUnload()
|
|||||||
playerhelpers->UnregisterCommandTargetProcessor(this);
|
playerhelpers->UnregisterCommandTargetProcessor(this);
|
||||||
|
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SDKTools::LevelInit, true);
|
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SDKTools::LevelInit, true);
|
||||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, gamedll, this, &SDKTools::OnServerActivate, false);
|
|
||||||
|
|
||||||
if (enginePatch)
|
if (enginePatch)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
#include <IEngineSound.h>
|
#include <IEngineSound.h>
|
||||||
#include <ivoiceserver.h>
|
#include <ivoiceserver.h>
|
||||||
#include <iplayerinfo.h>
|
#include <iplayerinfo.h>
|
||||||
|
#include <server_class.h>
|
||||||
|
#include <datamap.h>
|
||||||
#include <convar.h>
|
#include <convar.h>
|
||||||
#include <iserver.h>
|
#include <iserver.h>
|
||||||
#include <cdll_int.h>
|
#include <cdll_int.h>
|
||||||
@@ -71,6 +73,7 @@ public: //public SDKExtension
|
|||||||
virtual bool QueryRunning(char *error, size_t maxlength);
|
virtual bool QueryRunning(char *error, size_t maxlength);
|
||||||
virtual bool QueryInterfaceDrop(SMInterface *pInterface);
|
virtual bool QueryInterfaceDrop(SMInterface *pInterface);
|
||||||
virtual void NotifyInterfaceDrop(SMInterface *pInterface);
|
virtual void NotifyInterfaceDrop(SMInterface *pInterface);
|
||||||
|
virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
|
||||||
public:
|
public:
|
||||||
#if defined SMEXT_CONF_METAMOD
|
#if defined SMEXT_CONF_METAMOD
|
||||||
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
|
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1930"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1930
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ SourceHook::CVector<TeamInfo> g_Teams;
|
|||||||
|
|
||||||
bool FindTeamEntities(SendTable *pTable, const char *name)
|
bool FindTeamEntities(SendTable *pTable, const char *name)
|
||||||
{
|
{
|
||||||
|
if (strcmp(pTable->GetName(), name) == 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
int props = pTable->GetNumProps();
|
int props = pTable->GetNumProps();
|
||||||
SendProp *prop;
|
SendProp *prop;
|
||||||
|
|
||||||
@@ -50,10 +54,6 @@ bool FindTeamEntities(SendTable *pTable, const char *name)
|
|||||||
prop = pTable->GetProp(i);
|
prop = pTable->GetProp(i);
|
||||||
if (prop->GetDataTable())
|
if (prop->GetDataTable())
|
||||||
{
|
{
|
||||||
if (strcmp(prop->GetDataTable()->GetName(), name) == 0)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (FindTeamEntities(prop->GetDataTable(), name))
|
if (FindTeamEntities(prop->GetDataTable(), name))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@@ -64,7 +64,7 @@ bool FindTeamEntities(SendTable *pTable, const char *name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDKTools::OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
void SDKTools::OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
{
|
{
|
||||||
g_Teams.clear();
|
g_Teams.clear();
|
||||||
g_Teams.resize(1);
|
g_Teams.resize(1);
|
||||||
@@ -111,7 +111,7 @@ static cell_t GetTeamCount(IPluginContext *pContext, const cell_t *params)
|
|||||||
static cell_t GetTeamName(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetTeamName(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int teamindex = params[1];
|
int teamindex = params[1];
|
||||||
if (teamindex > (int)g_Teams.size())
|
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||||
{
|
{
|
||||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ static cell_t GetTeamName(IPluginContext *pContext, const cell_t *params)
|
|||||||
static cell_t GetTeamScore(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int teamindex = params[1];
|
int teamindex = params[1];
|
||||||
if (teamindex > (int)g_Teams.size())
|
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||||
{
|
{
|
||||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ static cell_t GetTeamScore(IPluginContext *pContext, const cell_t *params)
|
|||||||
static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int teamindex = params[1];
|
int teamindex = params[1];
|
||||||
if (teamindex > (int)g_Teams.size())
|
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||||
{
|
{
|
||||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
|||||||
static cell_t GetTeamClientCount(IPluginContext *pContext, const cell_t *params)
|
static cell_t GetTeamClientCount(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int teamindex = params[1];
|
int teamindex = params[1];
|
||||||
if (teamindex > (int)g_Teams.size())
|
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||||
{
|
{
|
||||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,12 +160,12 @@ bool SetupGetEyeAngles()
|
|||||||
int offset;
|
int offset;
|
||||||
if (g_pGameConf->GetOffset("EyeAngles", &offset))
|
if (g_pGameConf->GetOffset("EyeAngles", &offset))
|
||||||
{
|
{
|
||||||
PassInfo info[2];
|
PassInfo info[1];
|
||||||
info[0].flags = info[1].flags = PASSFLAG_BYVAL;
|
info[0].flags = PASSFLAG_BYVAL;
|
||||||
info[0].size = info[1].size = sizeof(void *);
|
info[0].size = sizeof(void *);
|
||||||
info[0].type = info[1].type = PassType_Basic;
|
info[0].type = PassType_Basic;
|
||||||
|
|
||||||
s_EyeAngles.call = g_pBinTools->CreateVCall(offset, 0, 0, &info[0], &info[1], 1);
|
s_EyeAngles.call = g_pBinTools->CreateVCall(offset, 0, 0, info, NULL, 0);
|
||||||
|
|
||||||
if (s_EyeAngles.call != NULL)
|
if (s_EyeAngles.call != NULL)
|
||||||
{
|
{
|
||||||
@@ -190,7 +190,6 @@ bool GetEyeAngles(CBaseEntity *pEntity, QAngle *pAngles)
|
|||||||
unsigned char *vptr = params;
|
unsigned char *vptr = params;
|
||||||
|
|
||||||
*(CBaseEntity **)vptr = pEntity;
|
*(CBaseEntity **)vptr = pEntity;
|
||||||
vptr += sizeof(CBaseEntity *);
|
|
||||||
|
|
||||||
s_EyeAngles.call->Execute(params, &pRetAngle);
|
s_EyeAngles.call->Execute(params, &pRetAngle);
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ OBJECTS += sqlite-source/alter.c sqlite-source/analyze.c \
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;$(SOURCEMM)\sourcehook"
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;"$(SOURCEMM16)\sourcehook""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;THREADSAFE;SQLITE_OMIT_LOAD_EXTENSION"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;THREADSAFE;SQLITE_OMIT_LOAD_EXTENSION"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;$(SOURCEMM)\sourcehook"
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;"$(SOURCEMM16)\sourcehook""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SQLITE_THREADSAFE;SQLITE_OMIT_LOAD_EXTENSION;_WIN32_WINNT=0x0400"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;SQLITE_THREADSAFE;SQLITE_OMIT_LOAD_EXTENSION;_WIN32_WINNT=0x0400"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
EnableEnhancedInstructionSet="1"
|
EnableEnhancedInstructionSet="1"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
||||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1918"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1918
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp TopMenuManager.cpp TopMenu.cpp \
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(SOURCEMM)\sourcehook"
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(SOURCEMM16)\sourcehook""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(SOURCEMM)\sourcehook"
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;"$(SOURCEMM16)\sourcehook""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
|
|||||||
@@ -1,42 +1,42 @@
|
|||||||
/**
|
/**
|
||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod SQLite Extension
|
* SourceMod SQLite Extension
|
||||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
* Free Software Foundation.
|
* Free Software Foundation.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
* details.
|
* details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
*
|
*
|
||||||
* Version: $Id$
|
* Version: $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autogenerated by build scripts
|
* Autogenerated by build scripts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
||||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1884"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1884
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||||
|
|||||||
+289
-294
@@ -1,294 +1,289 @@
|
|||||||
"Games"
|
"Games"
|
||||||
{
|
{
|
||||||
/* Sounds */
|
/* Sounds */
|
||||||
"#default"
|
"#default"
|
||||||
{
|
{
|
||||||
"Keys"
|
"Keys"
|
||||||
{
|
{
|
||||||
"SlapSoundCount" "3"
|
"SlapSoundCount" "3"
|
||||||
"SlapSound1" "player/pl_fallpain1.wav"
|
"SlapSound1" "player/pl_fallpain1.wav"
|
||||||
"SlapSound2" "player/pl_fallpain3.wav"
|
"SlapSound2" "player/pl_fallpain3.wav"
|
||||||
"SlapSound3" "player/pl_pain5.wav"
|
"SlapSound3" "player/pl_pain5.wav"
|
||||||
"m_iFrags" "m_iFrags"
|
"m_iFrags" "m_iFrags"
|
||||||
}
|
}
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
"m_iHealth"
|
"m_iHealth"
|
||||||
{
|
{
|
||||||
"class" "CBasePlayer"
|
"class" "CBasePlayer"
|
||||||
"prop" "m_iHealth"
|
"prop" "m_iHealth"
|
||||||
}
|
}
|
||||||
"m_lifeState"
|
"m_lifeState"
|
||||||
{
|
{
|
||||||
"class" "CBasePlayer"
|
"class" "CBasePlayer"
|
||||||
"prop" "m_lifeState"
|
"prop" "m_lifeState"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* General Temp Entities */
|
/* General Temp Entities */
|
||||||
"#default"
|
"#default"
|
||||||
{
|
{
|
||||||
"#supported"
|
"#supported"
|
||||||
{
|
{
|
||||||
"game" "tf"
|
"game" "tf"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
/* Offset into CBaseTempEntity constructor */
|
/* Offset into CBaseTempEntity constructor */
|
||||||
"s_pTempEntities"
|
"s_pTempEntities"
|
||||||
{
|
{
|
||||||
"windows" "17"
|
"windows" "17"
|
||||||
}
|
}
|
||||||
"GetTEName"
|
"GetTEName"
|
||||||
{
|
{
|
||||||
"windows" "4"
|
"windows" "4"
|
||||||
"linux" "4"
|
"linux" "4"
|
||||||
}
|
}
|
||||||
"GetTENext"
|
"GetTENext"
|
||||||
{
|
{
|
||||||
"windows" "8"
|
"windows" "8"
|
||||||
"linux" "8"
|
"linux" "8"
|
||||||
}
|
}
|
||||||
"TE_GetServerClass"
|
"TE_GetServerClass"
|
||||||
{
|
{
|
||||||
"windows" "0"
|
"windows" "0"
|
||||||
"linux" "0"
|
"linux" "0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
"CBaseTempEntity"
|
"CBaseTempEntity"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00"
|
"windows" "\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00"
|
||||||
}
|
}
|
||||||
"s_pTempEntities"
|
"s_pTempEntities"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
|
"linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create Entity Signatures */
|
/* Create Entity Signatures */
|
||||||
"#default"
|
"#default"
|
||||||
{
|
{
|
||||||
"#supported"
|
"#supported"
|
||||||
{
|
{
|
||||||
"game" "tf"
|
"game" "tf"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
"DispatchSpawn"
|
"DispatchSpawn"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
"linux" "@_Z13DispatchSpawnP11CBaseEntity"
|
||||||
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x64\x8B\xCB"
|
"windows" "\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x64\x8B\xCB"
|
||||||
}
|
}
|
||||||
"CreateEntityByName"
|
"CreateEntityByName"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"linux" "@_Z18CreateEntityByNamePKci"
|
"linux" "@_Z18CreateEntityByNamePKci"
|
||||||
"windows" "\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
|
"windows" "\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CGlobalEntityList */
|
/* CGlobalEntityList */
|
||||||
"#default"
|
"#default"
|
||||||
{
|
{
|
||||||
"#supported"
|
"#supported"
|
||||||
{
|
{
|
||||||
"game" "tf"
|
"game" "tf"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
/* Offset into LevelShutdown */
|
/* Offset into LevelShutdown */
|
||||||
"gEntList"
|
"gEntList"
|
||||||
{
|
{
|
||||||
"windows" "11"
|
"windows" "11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
"LevelShutdown"
|
"LevelShutdown"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
|
"windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
|
||||||
}
|
}
|
||||||
"gEntList"
|
"gEntList"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"linux" "@gEntList"
|
"linux" "@gEntList"
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions in CGlobalEntityList */
|
/* Functions in CGlobalEntityList */
|
||||||
"FindEntityByClassname"
|
"FindEntityByClassname"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x39\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x03"
|
"windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x39\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x03"
|
||||||
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
"linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* General GameRules */
|
/* General GameRules */
|
||||||
"#default"
|
"#default"
|
||||||
{
|
{
|
||||||
"#supported"
|
"#supported"
|
||||||
{
|
{
|
||||||
"game" "tf"
|
"game" "tf"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
/* Offset into CreateGameRulesObject */
|
/* Offset into CreateGameRulesObject */
|
||||||
"g_pGameRules"
|
"g_pGameRules"
|
||||||
{
|
{
|
||||||
"windows" "2"
|
"windows" "2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
/* This signature sometimes has multiple matches, but this
|
/* This signature sometimes has multiple matches, but this
|
||||||
* does not matter as g_pGameRules is involved in all of them.
|
* does not matter as g_pGameRules is involved in all of them.
|
||||||
* The same g_pGameRules offset applies to each match.
|
* The same g_pGameRules offset applies to each match.
|
||||||
*
|
*
|
||||||
* Sometimes this block of bytes is at the beginning of the static
|
* Sometimes this block of bytes is at the beginning of the static
|
||||||
* CreateGameRulesObject function and sometimes it is in the middle
|
* CreateGameRulesObject function and sometimes it is in the middle
|
||||||
* of an entirely different function. This depends on the game.
|
* of an entirely different function. This depends on the game.
|
||||||
*/
|
*/
|
||||||
"CreateGameRulesObject"
|
"CreateGameRulesObject"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
|
"windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
|
||||||
}
|
}
|
||||||
"g_pGameRules"
|
"g_pGameRules"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"linux" "@g_pGameRules"
|
"linux" "@g_pGameRules"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IServer interface pointer */
|
/* IServer interface pointer */
|
||||||
"#default"
|
"#default"
|
||||||
{
|
{
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
/* Offset into IVEngineServer::CreateFakeClient */
|
/* Offset into IVEngineServer::CreateFakeClient */
|
||||||
"sv"
|
"sv"
|
||||||
{
|
{
|
||||||
"windows" "6"
|
"windows" "6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
/* CBaseServer object for IServer interface */
|
/* CBaseServer object for IServer interface */
|
||||||
"sv"
|
"sv"
|
||||||
{
|
{
|
||||||
"library" "engine"
|
"library" "engine"
|
||||||
"linux" "@sv"
|
"linux" "@sv"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Team Fortress 2 Offsets */
|
/* Team Fortress 2 Offsets */
|
||||||
"tf"
|
"tf"
|
||||||
{
|
{
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
"GiveNamedItem"
|
"RemovePlayerItem"
|
||||||
{
|
{
|
||||||
"windows" "348"
|
"windows" "237"
|
||||||
"linux" "349"
|
"linux" "238"
|
||||||
}
|
}
|
||||||
"RemovePlayerItem"
|
"Weapon_GetSlot"
|
||||||
{
|
{
|
||||||
"windows" "236"
|
"windows" "235"
|
||||||
"linux" "237"
|
"linux" "236"
|
||||||
}
|
}
|
||||||
"Weapon_GetSlot"
|
"Ignite"
|
||||||
{
|
{
|
||||||
"windows" "234"
|
"windows" "192"
|
||||||
"linux" "235"
|
"linux" "193"
|
||||||
}
|
}
|
||||||
"Ignite"
|
"Extinguish"
|
||||||
{
|
{
|
||||||
"windows" "191"
|
"windows" "196"
|
||||||
"linux" "192"
|
"linux" "197"
|
||||||
}
|
}
|
||||||
"Extinguish"
|
"Teleport"
|
||||||
{
|
{
|
||||||
"windows" "195"
|
"windows" "100"
|
||||||
"linux" "196"
|
"linux" "101"
|
||||||
}
|
}
|
||||||
"Teleport"
|
"CommitSuicide"
|
||||||
{
|
{
|
||||||
"windows" "99"
|
"windows" "386"
|
||||||
"linux" "100"
|
"linux" "386"
|
||||||
}
|
}
|
||||||
"CommitSuicide"
|
"GetVelocity"
|
||||||
{
|
{
|
||||||
"windows" "385"
|
"windows" "129"
|
||||||
"linux" "385"
|
"linux" "130"
|
||||||
}
|
}
|
||||||
"GetVelocity"
|
"EyeAngles"
|
||||||
{
|
{
|
||||||
"windows" "128"
|
"windows" "121"
|
||||||
"linux" "129"
|
"linux" "122"
|
||||||
}
|
}
|
||||||
"EyeAngles"
|
"DispatchKeyValue"
|
||||||
{
|
{
|
||||||
"windows" "120"
|
"windows" "29"
|
||||||
"linux" "121"
|
"linux" "28"
|
||||||
}
|
}
|
||||||
"DispatchKeyValue"
|
"DispatchKeyValueFloat"
|
||||||
{
|
{
|
||||||
"windows" "29"
|
"windows" "28"
|
||||||
"linux" "28"
|
"linux" "29"
|
||||||
}
|
}
|
||||||
"DispatchKeyValueFloat"
|
"DispatchKeyValueVector"
|
||||||
{
|
{
|
||||||
"windows" "28"
|
"windows" "27"
|
||||||
"linux" "29"
|
"linux" "30"
|
||||||
}
|
}
|
||||||
"DispatchKeyValueVector"
|
"SetEntityModel"
|
||||||
{
|
{
|
||||||
"windows" "27"
|
"windows" "23"
|
||||||
"linux" "30"
|
"linux" "24"
|
||||||
}
|
}
|
||||||
"SetEntityModel"
|
"AcceptInput"
|
||||||
{
|
{
|
||||||
"windows" "23"
|
"windows" "34"
|
||||||
"linux" "24"
|
"linux" "35"
|
||||||
}
|
}
|
||||||
"AcceptInput"
|
}
|
||||||
{
|
}
|
||||||
"windows" "34"
|
/* EntityFactoryDictionary function */
|
||||||
"linux" "35"
|
"#default"
|
||||||
}
|
{
|
||||||
}
|
"Signatures"
|
||||||
}
|
{
|
||||||
/* EntityFactoryDictionary function */
|
"EntityFactory"
|
||||||
"#default"
|
{
|
||||||
{
|
"library" "server"
|
||||||
"Signatures"
|
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||||
{
|
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||||
"EntityFactory"
|
}
|
||||||
{
|
}
|
||||||
"library" "server"
|
}
|
||||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
}
|
||||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -343,7 +343,7 @@
|
|||||||
"GiveNamedItem"
|
"GiveNamedItem"
|
||||||
{
|
{
|
||||||
"windows" "328"
|
"windows" "328"
|
||||||
"linux" "330"
|
"linux" "329"
|
||||||
}
|
}
|
||||||
"RemovePlayerItem"
|
"RemovePlayerItem"
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ OBJECTS = loader.cpp
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..;"$(SOURCEMM)\sourcehook";"$(SOURCEMM)";"$(SOURCEMM)\sourcemm""
|
AdditionalIncludeDirectories="..;"$(SOURCEMM16)";"$(SOURCEMM16)\sourcehook";"$(SOURCEMM16)\sourcemm""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LOADER_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LOADER_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
AdditionalIncludeDirectories="..;"$(SOURCEMM)\sourcemm";"$(SOURCEMM)";"$(SOURCEMM)\sourcehook""
|
AdditionalIncludeDirectories="..;"$(SOURCEMM16)";"$(SOURCEMM16)\sourcehook";"$(SOURCEMM16)\sourcemm""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LOADER_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LOADER_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
EnableEnhancedInstructionSet="1"
|
EnableEnhancedInstructionSet="1"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
* @file Contains SourceMod version information.
|
* @file Contains SourceMod version information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1946"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1946
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
[PRODUCT]
|
[PRODUCT]
|
||||||
major = 1
|
major = 1
|
||||||
minor = 0
|
minor = 0
|
||||||
revision = 0
|
revision = 1
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
folder = core
|
folder = core
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* SourceMod Basecommands Plugin
|
* SourceMod Basecommands Plugin
|
||||||
* Provides sm_who functionality
|
* Provides sm_who functionality
|
||||||
*
|
*
|
||||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
*
|
*
|
||||||
* Version: $Id: admin-flatfile.sp 1438 2007-09-16 03:45:06Z dvander $
|
* Version: $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PerformWho(client, target, ReplySource:reply, bool:is_admin)
|
PerformWho(client, target, ReplySource:reply, bool:is_admin)
|
||||||
@@ -166,7 +166,7 @@ public Action:Command_Who(client, args)
|
|||||||
{
|
{
|
||||||
new bool:is_admin = false;
|
new bool:is_admin = false;
|
||||||
|
|
||||||
if (client && GetUserFlagBits(client) != 0)
|
if (!client || (client && GetUserFlagBits(client) != 0))
|
||||||
{
|
{
|
||||||
is_admin = true;
|
is_admin = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* SourceMod Basefunvotes Plugin
|
* SourceMod Basefunvotes Plugin
|
||||||
* Provides vote ff functionality
|
* Provides vote ff functionality
|
||||||
*
|
*
|
||||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
*
|
*
|
||||||
* Version: $Id: admin-flatfile.sp 1438 2007-09-16 03:45:06Z dvander $
|
* Version: $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DisplayVoteFFMenu(client)
|
DisplayVoteFFMenu(client)
|
||||||
@@ -52,7 +52,7 @@ DisplayVoteFFMenu(client)
|
|||||||
|
|
||||||
g_hVoteMenu = CreateMenu(Handler_VoteCallback, MenuAction:MENU_ACTIONS_ALL);
|
g_hVoteMenu = CreateMenu(Handler_VoteCallback, MenuAction:MENU_ACTIONS_ALL);
|
||||||
|
|
||||||
if (GetConVarBool(g_Cvar_Alltalk))
|
if (GetConVarBool(g_Cvar_FF))
|
||||||
{
|
{
|
||||||
SetMenuTitle(g_hVoteMenu, "Voteff Off");
|
SetMenuTitle(g_hVoteMenu, "Voteff Off");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This file is part of the SourceMod/SourcePawn SDK.
|
* This file is part of the SourceMod/SourcePawn SDK.
|
||||||
@@ -35,11 +35,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _clients_included
|
#define _clients_included
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Network flow directions.
|
||||||
|
*/
|
||||||
enum NetFlow
|
enum NetFlow
|
||||||
{
|
{
|
||||||
NetFlow_Outgoing = 0, /**< Outgoing traffic */
|
NetFlow_Outgoing = 0, /**< Outgoing traffic */
|
||||||
NetFlow_Incoming, /**< Incoming traffic */
|
NetFlow_Incoming, /**< Incoming traffic */
|
||||||
NetFlow_Both /**< Incoming and outgoing traffic */
|
NetFlow_Both, /**< Both values added together */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAXPLAYERS 64 /**< Maximum number of players that can be in server */
|
#define MAXPLAYERS 64 /**< Maximum number of players that can be in server */
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ native GetClientAimTarget(client, bool:only_clients=true);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the total number of teams in a game.
|
* Returns the total number of teams in a game.
|
||||||
|
* Note: This native should not be called before OnMapStart.
|
||||||
*
|
*
|
||||||
* @return Total number of teams.
|
* @return Total number of teams.
|
||||||
*/
|
*/
|
||||||
@@ -217,6 +218,7 @@ native GetTeamCount();
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the team name based on a team index.
|
* Retrieves the team name based on a team index.
|
||||||
|
* Note: This native should not be called before OnMapStart.
|
||||||
*
|
*
|
||||||
* @param index Team index.
|
* @param index Team index.
|
||||||
* @param name Buffer to store string in.
|
* @param name Buffer to store string in.
|
||||||
@@ -228,6 +230,7 @@ native GetTeamName(index, String:name[], maxlength);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the score of a team based on a team index.
|
* Returns the score of a team based on a team index.
|
||||||
|
* Note: This native should not be called before OnMapStart.
|
||||||
*
|
*
|
||||||
* @param index Team index.
|
* @param index Team index.
|
||||||
* @return Score.
|
* @return Score.
|
||||||
@@ -237,6 +240,7 @@ native GetTeamScore(index);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the score of a team based on a team index.
|
* Sets the score of a team based on a team index.
|
||||||
|
* Note: This native should not be called before OnMapStart.
|
||||||
*
|
*
|
||||||
* @param index Team index.
|
* @param index Team index.
|
||||||
* @param value New score value.
|
* @param value New score value.
|
||||||
@@ -247,6 +251,7 @@ native SetTeamScore(index, value);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of players in a certain team.
|
* Retrieves the number of players in a certain team.
|
||||||
|
* Note: This native should not be called before OnMapStart.
|
||||||
*
|
*
|
||||||
* @param index Team index.
|
* @param index Team index.
|
||||||
* @return Number of players in the team.
|
* @return Number of players in the team.
|
||||||
|
|||||||
+42
-42
@@ -1,42 +1,42 @@
|
|||||||
/**
|
/**
|
||||||
* vim: set ts=4 :
|
* vim: set ts=4 :
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This file is part of the SourceMod/SourcePawn SDK.
|
* This file is part of the SourceMod/SourcePawn SDK.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
* Free Software Foundation.
|
* Free Software Foundation.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
* details.
|
* details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
* this exception to all derivative works. AlliedModders LLC defines further
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
* or <http://www.sourcemod.net/license.php>.
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
*
|
*
|
||||||
* Version: $Id$
|
* Version: $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined _version_included
|
#if defined _version_included
|
||||||
#endinput
|
#endinput
|
||||||
#endif
|
#endif
|
||||||
#define _version_included
|
#define _version_included
|
||||||
|
|
||||||
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
|
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
|
||||||
#define SOURCEMOD_V_MINOR 0 /**< SourceMod Minor version */
|
#define SOURCEMOD_V_MINOR 0 /**< SourceMod Minor version */
|
||||||
#define SOURCEMOD_V_RELEASE 0 /**< SourceMod Release version */
|
#define SOURCEMOD_V_RELEASE 1 /**< SourceMod Release version */
|
||||||
|
|
||||||
#define SOURCEMOD_VERSION "1.0.0.1946" /**< SourceMod version string (major.minor.release.build) */
|
#define SOURCEMOD_VERSION "1.0.1.2166" /**< SourceMod version string (major.minor.release.build) */
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ public OnPluginStart()
|
|||||||
if (g_Cvar_Winlimit != INVALID_HANDLE || g_Cvar_Maxrounds != INVALID_HANDLE)
|
if (g_Cvar_Winlimit != INVALID_HANDLE || g_Cvar_Maxrounds != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
HookEvent("round_end", Event_RoundEnd);
|
HookEvent("round_end", Event_RoundEnd);
|
||||||
|
HookEventEx("teamplay_round_win", Event_TeamPlayRoundWin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Cvar_Fraglimit != INVALID_HANDLE)
|
if (g_Cvar_Fraglimit != INVALID_HANDLE)
|
||||||
@@ -223,6 +224,16 @@ public Action:Timer_StartMapVote(Handle:timer)
|
|||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Event_TeamPlayRoundWin(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
|
{
|
||||||
|
new isFull = GetEventInt(event, "full_round");
|
||||||
|
new winningTeam = GetEventInt(event, "team");
|
||||||
|
|
||||||
|
if (isFull == 1)
|
||||||
|
{
|
||||||
|
RoundCompleted(winningTeam);
|
||||||
|
}
|
||||||
|
}
|
||||||
/* You ask, why don't you just use team_score event? And I answer... Because CSS doesn't. */
|
/* You ask, why don't you just use team_score event? And I answer... Because CSS doesn't. */
|
||||||
public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
{
|
{
|
||||||
@@ -233,6 +244,11 @@ public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
|||||||
|
|
||||||
new winner = GetEventInt(event, "winner");
|
new winner = GetEventInt(event, "winner");
|
||||||
|
|
||||||
|
RoundCompleted(winner);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoundCompleted(winner)
|
||||||
|
{
|
||||||
if (winner == 0 || winner == 1)
|
if (winner == 0 || winner == 1)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+12
-1
@@ -40,6 +40,7 @@
|
|||||||
* @brief Defines the interface for loading/unloading/managing extensions.
|
* @brief Defines the interface for loading/unloading/managing extensions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
struct edict_t;
|
||||||
namespace SourceMod
|
namespace SourceMod
|
||||||
{
|
{
|
||||||
class IExtensionInterface;
|
class IExtensionInterface;
|
||||||
@@ -131,7 +132,7 @@ namespace SourceMod
|
|||||||
* Note: This is bumped when IShareSys is changed, because IShareSys
|
* Note: This is bumped when IShareSys is changed, because IShareSys
|
||||||
* itself is not versioned.
|
* itself is not versioned.
|
||||||
*/
|
*/
|
||||||
#define SMINTERFACE_EXTENSIONAPI_VERSION 3
|
#define SMINTERFACE_EXTENSIONAPI_VERSION 4
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The interface an extension must expose.
|
* @brief The interface an extension must expose.
|
||||||
@@ -289,6 +290,16 @@ namespace SourceMod
|
|||||||
* @return String containing the compilation date.
|
* @return String containing the compilation date.
|
||||||
*/
|
*/
|
||||||
virtual const char *GetExtensionDateString() =0;
|
virtual const char *GetExtensionDateString() =0;
|
||||||
|
/**
|
||||||
|
* @brief Called on server activation before plugins receive the OnServerLoad forward.
|
||||||
|
*
|
||||||
|
* @param pEdictList Edicts list.
|
||||||
|
* @param edictCount Number of edicts in the list.
|
||||||
|
* @param clientMax Maximum number of clients allowed in the server.
|
||||||
|
*/
|
||||||
|
virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+10
-9
@@ -32,20 +32,21 @@
|
|||||||
#ifndef _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
|
#ifndef _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
|
||||||
#define _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
|
#define _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
|
||||||
|
|
||||||
#include <IShareSys.h>
|
|
||||||
#include <dt_send.h>
|
|
||||||
#include <server_class.h>
|
|
||||||
#include <datamap.h>
|
|
||||||
#include <edict.h>
|
|
||||||
|
|
||||||
#define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
|
|
||||||
#define SMINTERFACE_GAMEHELPERS_VERSION 2
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file IGameHelpers.h
|
* @file IGameHelpers.h
|
||||||
* @brief Provides Source helper functions.
|
* @brief Provides Source helper functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
|
||||||
|
#define SMINTERFACE_GAMEHELPERS_VERSION 2
|
||||||
|
|
||||||
|
class CBaseEntity;
|
||||||
|
class SendProp;
|
||||||
|
class ServerClass;
|
||||||
|
struct edict_t;
|
||||||
|
struct datamap_t;
|
||||||
|
struct typedescription_t;
|
||||||
|
|
||||||
namespace SourceMod
|
namespace SourceMod
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ SMSDK = ..
|
|||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
OPT_FLAGS = -O3 -funroll-loops -pipe
|
||||||
GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ SMSDK = ..
|
|||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
OPT_FLAGS = -O3 -funroll-loops -pipe
|
||||||
GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ OBJECTS = sdk/smsdk_ext.cpp extension.cpp
|
|||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
C_OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
C_DEBUG_FLAGS = -g -ggdb3
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen,
|
|||||||
{
|
{
|
||||||
PLUGIN_SAVEVARS();
|
PLUGIN_SAVEVARS();
|
||||||
|
|
||||||
#if defined METAMOD_PLAPI_VERSION
|
#if !defined METAMOD_PLAPI_VERSION
|
||||||
GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||||
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ SMSDK = ../..
|
|||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_C_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing -fomit-frame-pointer
|
OPT_C_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing -fomit-frame-pointer
|
||||||
OPT_CPP_FLAGS =
|
OPT_CPP_FLAGS =
|
||||||
DEBUG_C_FLAGS = -g -ggdb3
|
DEBUG_C_FLAGS = -g -ggdb3
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* @file Contains SourceMod version information.
|
* @file Contains SourceMod version information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1874"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1874
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SMSDK = ../../..
|
|||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
OPT_FLAGS = -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||||
GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP = gcc-4.1
|
CPP = gcc-4.1
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#ifndef _INCLUDE_JIT_VERSION_H_
|
#ifndef _INCLUDE_JIT_VERSION_H_
|
||||||
#define _INCLUDE_JIT_VERSION_H_
|
#define _INCLUDE_JIT_VERSION_H_
|
||||||
|
|
||||||
#define SVN_FULL_VERSION "1.0.0.1919"
|
#define SVN_FULL_VERSION "1.0.1.2166"
|
||||||
#define SVN_FILE_VERSION 1,0,0,1919
|
#define SVN_FILE_VERSION 1,0,1,2166
|
||||||
|
|
||||||
#endif //_INCLUDE_JIT_VERSION_H_
|
#endif //_INCLUDE_JIT_VERSION_H_
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ while ( ($cur_module, $mod_i) = each(%modules) )
|
|||||||
s/\$PMINOR\$/$minor/g;
|
s/\$PMINOR\$/$minor/g;
|
||||||
s/\$PREVISION\$/$revision/g;
|
s/\$PREVISION\$/$revision/g;
|
||||||
s/\$GLOBAL_BUILD\$/$rev/g;
|
s/\$GLOBAL_BUILD\$/$rev/g;
|
||||||
s/\$LOCAL_BUILD\$/$local_rev/g;
|
s/\$LOCAL_BUILD\$/$rev/g;
|
||||||
print OUTFILE $_;
|
print OUTFILE $_;
|
||||||
}
|
}
|
||||||
close(OUTFILE);
|
close(OUTFILE);
|
||||||
|
|||||||
Reference in New Issue
Block a user