Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01989d3851 |
@@ -1,12 +0,0 @@
|
|||||||
# GitHub views all .h files as C, let's assume it's C++
|
|
||||||
*.h linguist-language=c++
|
|
||||||
|
|
||||||
# Internal tools overriding
|
|
||||||
tools/* linguist-vendored
|
|
||||||
editor/* linguist-vendored
|
|
||||||
|
|
||||||
# Third-party overriding
|
|
||||||
extensions/curl/curl-src/* linguist-vendored
|
|
||||||
extensions/geoip/GeoIP.c linguist-vendored
|
|
||||||
extensions/geoip/GeoIP.h linguist-vendored
|
|
||||||
extensions/sqlite/sqlite-source/* linguist-vendored
|
|
||||||
@@ -379,16 +379,6 @@ class SMConfig(object):
|
|||||||
def configure_windows(self, cxx):
|
def configure_windows(self, cxx):
|
||||||
cxx.defines += ['WIN32', '_WINDOWS']
|
cxx.defines += ['WIN32', '_WINDOWS']
|
||||||
|
|
||||||
def add_libamtl(self):
|
|
||||||
# Add libamtl.
|
|
||||||
self.libamtl = {}
|
|
||||||
for arch in self.archs:
|
|
||||||
def get_configure_fn(arch):
|
|
||||||
return lambda builder, name: self.StaticLibrary(builder, name, arch)
|
|
||||||
extra_vars = {'Configure': get_configure_fn(arch)}
|
|
||||||
libamtl = builder.Build('public/amtl/amtl/AMBuilder', extra_vars)
|
|
||||||
self.libamtl[arch] = libamtl.binary
|
|
||||||
|
|
||||||
def AddVersioning(self, binary, arch):
|
def AddVersioning(self, binary, arch):
|
||||||
if builder.target.platform == 'windows':
|
if builder.target.platform == 'windows':
|
||||||
binary.sources += ['version.rc']
|
binary.sources += ['version.rc']
|
||||||
@@ -623,7 +613,6 @@ SM = SMConfig()
|
|||||||
SM.detectProductVersion()
|
SM.detectProductVersion()
|
||||||
SM.detectSDKs()
|
SM.detectSDKs()
|
||||||
SM.configure()
|
SM.configure()
|
||||||
SM.add_libamtl()
|
|
||||||
|
|
||||||
if SM.use_auto_versioning():
|
if SM.use_auto_versioning():
|
||||||
SM.generated_headers = builder.Build(
|
SM.generated_headers = builder.Build(
|
||||||
|
|||||||
@@ -1474,10 +1474,7 @@ void PlayerManager::InvalidatePlayer(CPlayer *pPlayer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto userid = engine->GetPlayerUserId(pPlayer->m_pEdict);
|
m_UserIdLookUp[engine->GetPlayerUserId(pPlayer->m_pEdict)] = 0;
|
||||||
if (userid != -1)
|
|
||||||
m_UserIdLookUp[userid] = 0;
|
|
||||||
|
|
||||||
pPlayer->Disconnect();
|
pPlayer->Disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,7 @@
|
|||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||||
SH_DECL_HOOK1_void(ICvar, UnregisterConCommand, SH_NOATTRIB, 0, ConCommandBase *);
|
SH_DECL_HOOK1_void(ICvar, UnregisterConCommand, SH_NOATTRIB, 0, ConCommandBase *);
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
SH_DECL_HOOK2_void(ICvar, RegisterConCommand, SH_NOATTRIB, 0, ConCommandBase *, bool);
|
|
||||||
#else
|
|
||||||
SH_DECL_HOOK1_void(ICvar, RegisterConCommand, SH_NOATTRIB, 0, ConCommandBase *);
|
SH_DECL_HOOK1_void(ICvar, RegisterConCommand, SH_NOATTRIB, 0, ConCommandBase *);
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
SH_DECL_HOOK1_void(ICvar, RegisterConCommandBase, SH_NOATTRIB, 0, ConCommandBase *);
|
SH_DECL_HOOK1_void(ICvar, RegisterConCommandBase, SH_NOATTRIB, 0, ConCommandBase *);
|
||||||
#endif
|
#endif
|
||||||
@@ -82,11 +78,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
|
||||||
void LinkConCommandBase(ConCommandBase *pBase, bool unknown)
|
|
||||||
#else
|
|
||||||
void LinkConCommandBase(ConCommandBase *pBase)
|
void LinkConCommandBase(ConCommandBase *pBase)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
IConCommandLinkListener *listener = IConCommandLinkListener::head;
|
IConCommandLinkListener *listener = IConCommandLinkListener::head;
|
||||||
while (listener)
|
while (listener)
|
||||||
|
|||||||
@@ -1364,7 +1364,7 @@ bool CLocalExtension::IsSameFile(const char *file)
|
|||||||
|
|
||||||
bool CRemoteExtension::IsSameFile(const char *file)
|
bool CRemoteExtension::IsSameFile(const char *file)
|
||||||
{
|
{
|
||||||
/* Check full path and name passed in from LoadExternal */
|
/* :TODO: this could be better, but no one uses this API anyway. */
|
||||||
return strcmp(file, m_Path.c_str()) == 0 || strcmp(file, m_File.c_str()) == 0;
|
return strcmp(file, m_Path.c_str()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -356,6 +356,27 @@ static cell_t GetAvgPackets(IPluginContext *pContext, const cell_t *params)
|
|||||||
return sp_ftoc(value);
|
return sp_ftoc(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cell_t sm_GetClientIClient(IPluginContext *pContext, const cell_t *params)
|
||||||
|
{
|
||||||
|
int client = params[1];
|
||||||
|
|
||||||
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
|
if (!pPlayer)
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
else if (!pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client %d is not connected", client);
|
||||||
|
}
|
||||||
|
else if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client %d is a bot", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (cell_t)pPlayer->GetIClient();
|
||||||
|
}
|
||||||
|
|
||||||
static cell_t RunAdminCacheChecks(IPluginContext *pContext, const cell_t *params)
|
static cell_t RunAdminCacheChecks(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = params[1];
|
int client = params[1];
|
||||||
@@ -392,6 +413,7 @@ REGISTER_NATIVES(playernatives)
|
|||||||
{"GetClientAvgChoke", GetAvgChoke},
|
{"GetClientAvgChoke", GetAvgChoke},
|
||||||
{"GetClientAvgData", GetAvgData},
|
{"GetClientAvgData", GetAvgData},
|
||||||
{"GetClientAvgPackets", GetAvgPackets},
|
{"GetClientAvgPackets", GetAvgPackets},
|
||||||
|
{"GetClientIClient", sm_GetClientIClient },
|
||||||
{"RunAdminCacheChecks", RunAdminCacheChecks},
|
{"RunAdminCacheChecks", RunAdminCacheChecks},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ IGameConfig *g_pGameConf = NULL;
|
|||||||
IGameEventManager2 *gameevents = NULL;
|
IGameEventManager2 *gameevents = NULL;
|
||||||
bool hooked_everything = false;
|
bool hooked_everything = false;
|
||||||
int g_msgHintText = -1;
|
int g_msgHintText = -1;
|
||||||
CGlobalVars *gpGlobals;
|
|
||||||
|
|
||||||
SMEXT_LINK(&g_CStrike);
|
SMEXT_LINK(&g_CStrike);
|
||||||
|
|
||||||
@@ -108,7 +107,6 @@ bool CStrike::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool
|
|||||||
{
|
{
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
gpGlobals = ismm->GetCGlobals();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ private:
|
|||||||
extern IBinTools *g_pBinTools;
|
extern IBinTools *g_pBinTools;
|
||||||
extern IGameConfig *g_pGameConf;
|
extern IGameConfig *g_pGameConf;
|
||||||
extern ISDKTools *g_pSDKTools;
|
extern ISDKTools *g_pSDKTools;
|
||||||
extern CGlobalVars *gpGlobals;
|
|
||||||
extern int g_msgHintText;
|
extern int g_msgHintText;
|
||||||
extern bool g_pIgnoreTerminateDetour;
|
extern bool g_pIgnoreTerminateDetour;
|
||||||
extern bool g_pIgnoreCSWeaponDropDetour;
|
extern bool g_pIgnoreCSWeaponDropDetour;
|
||||||
|
|||||||
@@ -58,19 +58,7 @@ void TimeLeftEvents::FireGameEvent(IGameEvent *event)
|
|||||||
if (get_new_timeleft_offset || !round_end_found)
|
if (get_new_timeleft_offset || !round_end_found)
|
||||||
{
|
{
|
||||||
get_new_timeleft_offset = false;
|
get_new_timeleft_offset = false;
|
||||||
|
timersys->NotifyOfGameStart();
|
||||||
float flGameStartTime = gpGlobals->curtime;
|
|
||||||
uintptr_t gamerules = (uintptr_t)g_pSDKTools->GetGameRules();
|
|
||||||
if (gamerules)
|
|
||||||
{
|
|
||||||
sm_sendprop_info_t info;
|
|
||||||
if (gamehelpers->FindSendPropInfo("CCSGameRulesProxy", "m_flGameStartTime", &info))
|
|
||||||
{
|
|
||||||
flGameStartTime = *(float *)(gamerules + info.actual_offset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
timersys->NotifyOfGameStart(flGameStartTime - gpGlobals->curtime);
|
|
||||||
timersys->MapTimeLeftChanged();
|
timersys->MapTimeLeftChanged();
|
||||||
}
|
}
|
||||||
round_end_found = false;
|
round_end_found = false;
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ static CBaseEntity *FindEntityByNetClass(int start, const char *classname)
|
|||||||
if (network == NULL)
|
if (network == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
IHandleEntity *pHandleEnt = network->GetEntityHandle();
|
|
||||||
if (pHandleEnt == NULL)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ServerClass *sClass = network->GetServerClass();
|
ServerClass *sClass = network->GetServerClass();
|
||||||
const char *name = sClass->GetName();
|
const char *name = sClass->GetName();
|
||||||
|
|
||||||
|
|||||||
@@ -998,22 +998,6 @@ static cell_t smn_TRGetHitGroup(IPluginContext *pContext, const cell_t *params)
|
|||||||
return tr->hitgroup;
|
return tr->hitgroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell_t smn_TRGetHitBoxIndex(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
sm_trace_t *tr;
|
|
||||||
HandleError err;
|
|
||||||
HandleSecurity sec(pContext->GetIdentity(), myself->GetIdentity());
|
|
||||||
|
|
||||||
if (params[1] == BAD_HANDLE)
|
|
||||||
{
|
|
||||||
tr = &g_Trace;
|
|
||||||
} else if ((err = handlesys->ReadHandle(params[1], g_TraceHandle, &sec, (void **)&tr)) != HandleError_None) {
|
|
||||||
return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
|
|
||||||
}
|
|
||||||
|
|
||||||
return tr->hitbox;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell_t smn_TRGetEntityIndex(IPluginContext *pContext, const cell_t *params)
|
static cell_t smn_TRGetEntityIndex(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
sm_trace_t *tr;
|
sm_trace_t *tr;
|
||||||
@@ -1118,7 +1102,6 @@ sp_nativeinfo_t g_TRNatives[] =
|
|||||||
{"TR_StartSolid", smn_TRStartSolid},
|
{"TR_StartSolid", smn_TRStartSolid},
|
||||||
{"TR_DidHit", smn_TRDidHit},
|
{"TR_DidHit", smn_TRDidHit},
|
||||||
{"TR_GetHitGroup", smn_TRGetHitGroup},
|
{"TR_GetHitGroup", smn_TRGetHitGroup},
|
||||||
{"TR_GetHitBoxIndex", smn_TRGetHitBoxIndex},
|
|
||||||
{"TR_ClipRayToEntity", smn_TRClipRayToEntity},
|
{"TR_ClipRayToEntity", smn_TRClipRayToEntity},
|
||||||
{"TR_ClipRayToEntityEx", smn_TRClipRayToEntityEx},
|
{"TR_ClipRayToEntityEx", smn_TRClipRayToEntityEx},
|
||||||
{"TR_ClipRayHullToEntity", smn_TRClipRayHullToEntity},
|
{"TR_ClipRayHullToEntity", smn_TRClipRayHullToEntity},
|
||||||
|
|||||||
@@ -255,12 +255,10 @@ ValveCall *CreateValveVCall(unsigned int vtableIdx,
|
|||||||
|
|
||||||
/* Get return information - encode only */
|
/* Get return information - encode only */
|
||||||
PassInfo retBuf;
|
PassInfo retBuf;
|
||||||
ObjectField retFieldBuf[16];
|
|
||||||
size_t retBufSize = 0;
|
size_t retBufSize = 0;
|
||||||
bool retbuf_needs_extra;
|
bool retbuf_needs_extra;
|
||||||
if (retInfo)
|
if (retInfo)
|
||||||
{
|
{
|
||||||
retBuf.fields = retFieldBuf;
|
|
||||||
if ((size = ValveParamToBinParam(retInfo->vtype, retInfo->type, retInfo->flags, &retBuf, retbuf_needs_extra)) == 0)
|
if ((size = ValveParamToBinParam(retInfo->vtype, retInfo->type, retInfo->flags, &retBuf, retbuf_needs_extra)) == 0)
|
||||||
{
|
{
|
||||||
delete vc;
|
delete vc;
|
||||||
@@ -271,14 +269,12 @@ ValveCall *CreateValveVCall(unsigned int vtableIdx,
|
|||||||
|
|
||||||
/* Get parameter info */
|
/* Get parameter info */
|
||||||
PassInfo paramBuf[32];
|
PassInfo paramBuf[32];
|
||||||
ObjectField fieldBuf[32][16];
|
|
||||||
size_t sizes[32];
|
size_t sizes[32];
|
||||||
size_t normSize = 0;
|
size_t normSize = 0;
|
||||||
size_t extraSize = 0;
|
size_t extraSize = 0;
|
||||||
for (unsigned int i=0; i<numParams; i++)
|
for (unsigned int i=0; i<numParams; i++)
|
||||||
{
|
{
|
||||||
bool needs_extra;
|
bool needs_extra;
|
||||||
paramBuf[i].fields = fieldBuf[i];
|
|
||||||
if ((size = ValveParamToBinParam(params[i].vtype,
|
if ((size = ValveParamToBinParam(params[i].vtype,
|
||||||
params[i].type,
|
params[i].type,
|
||||||
params[i].flags,
|
params[i].flags,
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
SOURCEMOD LICENSE INFORMATION
|
SOURCEMOD LICENSE INFORMATION
|
||||||
VERSION: 2019-9-30
|
VERSION: JUNE-13-2008
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
SourceMod is licensed under the GNU General Public License, version 3.
|
SourceMod is licensed under the GNU General Public License, version 3.
|
||||||
|
|
||||||
As a special exception, AlliedModders LLC gives you permission to link the code
|
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
|
of this program (as well as its derivative works) to "Half-Life 2," the "Source
|
||||||
Engine" and any Game MODs that run on software by the Valve Corporation.
|
Engine," the "SourcePawn JIT," and any Game MODs that run on software by the
|
||||||
You must obey the GNU General Public License in all respects for all other code used.
|
Valve Corporation. You must obey the GNU General Public License in all
|
||||||
Additionally, AlliedModders LLC grants this exception to all derivative works.
|
respects for all other code used. Additionally, AlliedModders LLC grants this
|
||||||
|
exception to all derivative works.
|
||||||
|
|
||||||
As an additional special exception to the GNU General Public License 3.0,
|
As an additional special exception to the GNU General Public License 3.0,
|
||||||
AlliedModders LLC permits dual-licensing of DERIVATIVE WORKS ONLY (that is,
|
AlliedModders LLC permits dual-licensing of DERIVATIVE WORKS ONLY (that is,
|
||||||
@@ -26,6 +27,7 @@ License version 2 (without an "or any higher version" clause) if and only if
|
|||||||
the work was already GNU General Public License 2.0 exclusive. This clause is
|
the work was already GNU General Public License 2.0 exclusive. This clause is
|
||||||
provided for backwards compatibility only.
|
provided for backwards compatibility only.
|
||||||
|
|
||||||
|
A copy of the JIT License is available in JIT.txt.
|
||||||
A copy of the GNU General Public License 2.0 is available in GPLv2.txt.
|
A copy of the GNU General Public License 2.0 is available in GPLv2.txt.
|
||||||
A copy of the GNU General Public License 3.0 is available in GPLv3.txt.
|
A copy of the GNU General Public License 3.0 is available in GPLv3.txt.
|
||||||
|
|
||||||
@@ -33,4 +35,5 @@ SourcePawn is Copyright (C) 2006-2008 AlliedModders LLC. All rights reserved.
|
|||||||
SourceMod is Copyright (C) 2006-2008 AlliedModders LLC. All rights reserved.
|
SourceMod is Copyright (C) 2006-2008 AlliedModders LLC. All rights reserved.
|
||||||
Pawn and SMALL are Copyright (C) 1997-2008 ITB CompuPhase.
|
Pawn and SMALL are Copyright (C) 1997-2008 ITB CompuPhase.
|
||||||
Source is Copyright (C) Valve Corporation.
|
Source is Copyright (C) Valve Corporation.
|
||||||
All trademarks are property of their respective owners in the US and other countries.
|
All trademarks are property of their respective owners in the US and other
|
||||||
|
|
||||||
|
|||||||
@@ -4,26 +4,26 @@
|
|||||||
|
|
||||||
#define ARRAY_STRING_LENGTH 32
|
#define ARRAY_STRING_LENGTH 32
|
||||||
|
|
||||||
enum struct GroupCommands
|
enum GroupCommands
|
||||||
{
|
{
|
||||||
ArrayList groupListName;
|
ArrayList:groupListName,
|
||||||
ArrayList groupListCommand;
|
ArrayList:groupListCommand
|
||||||
}
|
};
|
||||||
|
|
||||||
GroupCommands g_groupList;
|
int g_groupList[GroupCommands];
|
||||||
int g_groupCount;
|
int g_groupCount;
|
||||||
|
|
||||||
SMCParser g_configParser;
|
SMCParser g_configParser;
|
||||||
|
|
||||||
enum struct Places
|
enum Places
|
||||||
{
|
{
|
||||||
int category;
|
Place_Category,
|
||||||
int item;
|
Place_Item,
|
||||||
int replaceNum;
|
Place_ReplaceNum
|
||||||
}
|
};
|
||||||
|
|
||||||
char g_command[MAXPLAYERS+1][CMD_LENGTH];
|
char g_command[MAXPLAYERS+1][CMD_LENGTH];
|
||||||
Places g_currentPlace[MAXPLAYERS+1];
|
int g_currentPlace[MAXPLAYERS+1][Places];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* What to put in the 'info' menu field (for PlayerList and Player_Team menus only)
|
* What to put in the 'info' menu field (for PlayerList and Player_Team menus only)
|
||||||
@@ -331,11 +331,11 @@ void ParseConfigs()
|
|||||||
g_configParser.OnKeyValue = KeyValue;
|
g_configParser.OnKeyValue = KeyValue;
|
||||||
g_configParser.OnLeaveSection = EndSection;
|
g_configParser.OnLeaveSection = EndSection;
|
||||||
|
|
||||||
delete g_groupList.groupListName;
|
delete g_groupList[groupListName];
|
||||||
delete g_groupList.groupListCommand;
|
delete g_groupList[groupListCommand];
|
||||||
|
|
||||||
g_groupList.groupListName = new ArrayList(ARRAY_STRING_LENGTH);
|
g_groupList[groupListName] = new ArrayList(ARRAY_STRING_LENGTH);
|
||||||
g_groupList.groupListCommand = new ArrayList(ARRAY_STRING_LENGTH);
|
g_groupList[groupListCommand] = new ArrayList(ARRAY_STRING_LENGTH);
|
||||||
|
|
||||||
char configPath[256];
|
char configPath[256];
|
||||||
BuildPath(Path_SM, configPath, sizeof(configPath), "configs/dynamicmenu/adminmenu_grouping.txt");
|
BuildPath(Path_SM, configPath, sizeof(configPath), "configs/dynamicmenu/adminmenu_grouping.txt");
|
||||||
@@ -376,13 +376,13 @@ public SMCResult NewSection(SMCParser smc, const char[] name, bool opt_quotes)
|
|||||||
|
|
||||||
public SMCResult KeyValue(SMCParser smc, const char[] key, const char[] value, bool key_quotes, bool value_quotes)
|
public SMCResult KeyValue(SMCParser smc, const char[] key, const char[] value, bool key_quotes, bool value_quotes)
|
||||||
{
|
{
|
||||||
g_groupList.groupListName.PushString(key);
|
g_groupList[groupListName].PushString(key);
|
||||||
g_groupList.groupListCommand.PushString(value);
|
g_groupList[groupListCommand].PushString(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SMCResult EndSection(SMCParser smc)
|
public SMCResult EndSection(SMCParser smc)
|
||||||
{
|
{
|
||||||
g_groupCount = g_groupList.groupListName.Length;
|
g_groupCount = g_groupList[groupListName].Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DynamicMenuCategoryHandler(TopMenu topmenu,
|
public void DynamicMenuCategoryHandler(TopMenu topmenu,
|
||||||
@@ -421,8 +421,8 @@ public void DynamicMenuItemHandler(TopMenu topmenu,
|
|||||||
|
|
||||||
strcopy(g_command[param], sizeof(g_command[]), output.cmd);
|
strcopy(g_command[param], sizeof(g_command[]), output.cmd);
|
||||||
|
|
||||||
g_currentPlace[param].item = location;
|
g_currentPlace[param][Place_Item] = location;
|
||||||
g_currentPlace[param].replaceNum = 1;
|
g_currentPlace[param][Place_ReplaceNum] = 1;
|
||||||
|
|
||||||
ParamCheck(param);
|
ParamCheck(param);
|
||||||
}
|
}
|
||||||
@@ -436,19 +436,19 @@ public void ParamCheck(int client)
|
|||||||
Item outputItem;
|
Item outputItem;
|
||||||
Submenu outputSubmenu;
|
Submenu outputSubmenu;
|
||||||
|
|
||||||
g_DataArray.GetArray(g_currentPlace[client].item, outputItem);
|
g_DataArray.GetArray(g_currentPlace[client][Place_Item], outputItem);
|
||||||
|
|
||||||
if (g_currentPlace[client].replaceNum < 1)
|
if (g_currentPlace[client][Place_ReplaceNum] < 1)
|
||||||
{
|
{
|
||||||
g_currentPlace[client].replaceNum = 1;
|
g_currentPlace[client][Place_ReplaceNum] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Format(buffer, 5, "#%i", g_currentPlace[client].replaceNum);
|
Format(buffer, 5, "#%i", g_currentPlace[client][Place_ReplaceNum]);
|
||||||
Format(buffer2, 5, "@%i", g_currentPlace[client].replaceNum);
|
Format(buffer2, 5, "@%i", g_currentPlace[client][Place_ReplaceNum]);
|
||||||
|
|
||||||
if (StrContains(g_command[client], buffer) != -1 || StrContains(g_command[client], buffer2) != -1)
|
if (StrContains(g_command[client], buffer) != -1 || StrContains(g_command[client], buffer2) != -1)
|
||||||
{
|
{
|
||||||
outputItem.submenus.GetArray(g_currentPlace[client].replaceNum - 1, outputSubmenu);
|
outputItem.submenus.GetArray(g_currentPlace[client][Place_ReplaceNum] - 1, outputSubmenu);
|
||||||
|
|
||||||
Menu itemMenu = new Menu(Menu_Selection);
|
Menu itemMenu = new Menu(Menu_Selection);
|
||||||
itemMenu.ExitBackButton = true;
|
itemMenu.ExitBackButton = true;
|
||||||
@@ -460,8 +460,8 @@ public void ParamCheck(int client)
|
|||||||
|
|
||||||
for (int i = 0; i<g_groupCount; i++)
|
for (int i = 0; i<g_groupCount; i++)
|
||||||
{
|
{
|
||||||
g_groupList.groupListName.GetString(i, nameBuffer, sizeof(nameBuffer));
|
g_groupList[groupListName].GetString(i, nameBuffer, sizeof(nameBuffer));
|
||||||
g_groupList.groupListCommand.GetString(i, commandBuffer, sizeof(commandBuffer));
|
g_groupList[groupListCommand].GetString(i, commandBuffer, sizeof(commandBuffer));
|
||||||
itemMenu.AddItem(commandBuffer, nameBuffer);
|
itemMenu.AddItem(commandBuffer, nameBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,7 @@ public void ParamCheck(int client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_command[client][0] = '\0';
|
g_command[client][0] = '\0';
|
||||||
g_currentPlace[client].replaceNum = 1;
|
g_currentPlace[client][Place_ReplaceNum] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -622,16 +622,16 @@ public int Menu_Selection(Menu menu, MenuAction action, int param1, int param2)
|
|||||||
char infobuffer[NAME_LENGTH+2];
|
char infobuffer[NAME_LENGTH+2];
|
||||||
Format(infobuffer, sizeof(infobuffer), "\"%s\"", info);
|
Format(infobuffer, sizeof(infobuffer), "\"%s\"", info);
|
||||||
|
|
||||||
Format(buffer, 5, "#%i", g_currentPlace[param1].replaceNum);
|
Format(buffer, 5, "#%i", g_currentPlace[param1][Place_ReplaceNum]);
|
||||||
ReplaceString(g_command[param1], sizeof(g_command[]), buffer, infobuffer);
|
ReplaceString(g_command[param1], sizeof(g_command[]), buffer, infobuffer);
|
||||||
//replace #num with the selected option (quoted)
|
//replace #num with the selected option (quoted)
|
||||||
|
|
||||||
Format(buffer, 5, "@%i", g_currentPlace[param1].replaceNum);
|
Format(buffer, 5, "@%i", g_currentPlace[param1][Place_ReplaceNum]);
|
||||||
ReplaceString(g_command[param1], sizeof(g_command[]), buffer, info);
|
ReplaceString(g_command[param1], sizeof(g_command[]), buffer, info);
|
||||||
//replace @num with the selected option (unquoted)
|
//replace @num with the selected option (unquoted)
|
||||||
|
|
||||||
// Increment the parameter counter.
|
// Increment the parameter counter.
|
||||||
g_currentPlace[param1].replaceNum++;
|
g_currentPlace[param1][Place_ReplaceNum]++;
|
||||||
|
|
||||||
ParamCheck(param1);
|
ParamCheck(param1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,10 +159,8 @@ int LoadMapList(Menu menu)
|
|||||||
|
|
||||||
for (int i = 0; i < map_count; i++)
|
for (int i = 0; i < map_count; i++)
|
||||||
{
|
{
|
||||||
char displayName[PLATFORM_MAX_PATH];
|
|
||||||
GetArrayString(g_map_array, i, map_name, sizeof(map_name));
|
GetArrayString(g_map_array, i, map_name, sizeof(map_name));
|
||||||
GetMapDisplayName(map_name, displayName, sizeof(displayName));
|
menu.AddItem(map_name, map_name);
|
||||||
menu.AddItem(map_name, displayName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return map_count;
|
return map_count;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ methodmap ArrayStack < Handle
|
|||||||
// @param block Optionally specify which block to read from
|
// @param block Optionally specify which block to read from
|
||||||
// (useful if the blocksize > 0).
|
// (useful if the blocksize > 0).
|
||||||
// @param asChar Optionally read as a byte instead of a cell.
|
// @param asChar Optionally read as a byte instead of a cell.
|
||||||
// @return Value popped from the stack.
|
// @return True on success, false if the stack is empty.
|
||||||
// @error The stack is empty.
|
// @error The stack is empty.
|
||||||
public native any Pop(int block=0, bool asChar=false);
|
public native any Pop(int block=0, bool asChar=false);
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ methodmap ArrayStack < Handle
|
|||||||
//
|
//
|
||||||
// @param buffer Buffer to store string.
|
// @param buffer Buffer to store string.
|
||||||
// @param maxlength Maximum size of the buffer.
|
// @param maxlength Maximum size of the buffer.
|
||||||
// @param written Number of characters written to buffer, not including
|
// @oaram written Number of characters written to buffer, not including
|
||||||
// the null terminator.
|
// the null terminator.
|
||||||
// @error The stack is empty.
|
// @error The stack is empty.
|
||||||
public native void PopString(char[] buffer, int maxlength, int &written = 0);
|
public native void PopString(char[] buffer, int maxlength, int &written = 0);
|
||||||
|
|||||||
@@ -741,6 +741,15 @@ native float GetClientAvgData(int client, NetFlow flow);
|
|||||||
*/
|
*/
|
||||||
native float GetClientAvgPackets(int client, NetFlow flow);
|
native float GetClientAvgPackets(int client, NetFlow flow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the client's baseserver IClient pointer.
|
||||||
|
*
|
||||||
|
* @param client Player's index.
|
||||||
|
* @return IClient address.
|
||||||
|
* @error Invalid client index, client not connected, or fake client.
|
||||||
|
*/
|
||||||
|
native Address GetClientIClient(int client);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates an userid index to the real player index.
|
* Translates an userid index to the real player index.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -45,8 +45,6 @@
|
|||||||
#define CS_SLOT_KNIFE 2 /**< Knife slot. */
|
#define CS_SLOT_KNIFE 2 /**< Knife slot. */
|
||||||
#define CS_SLOT_GRENADE 3 /**< Grenade slot (will only return one grenade). */
|
#define CS_SLOT_GRENADE 3 /**< Grenade slot (will only return one grenade). */
|
||||||
#define CS_SLOT_C4 4 /**< C4 slot. */
|
#define CS_SLOT_C4 4 /**< C4 slot. */
|
||||||
#define CS_SLOT_BOOST 11 /**< Slot for healthshot and shield (will only return one weapon/item). */
|
|
||||||
#define CS_SLOT_UTILITY 12 /**< Slot for tablet. */
|
|
||||||
|
|
||||||
#define CS_DMG_HEADSHOT (1 << 30) /**< Headshot */
|
#define CS_DMG_HEADSHOT (1 << 30) /**< Headshot */
|
||||||
|
|
||||||
@@ -158,7 +156,6 @@ enum CSWeaponID
|
|||||||
CSWeapon_BUMPMINE = 85,
|
CSWeapon_BUMPMINE = 85,
|
||||||
CSWeapon_MAX_WEAPONS_NO_KNIFES, // Max without the knife item defs, useful when treating all knives as a regular knife.
|
CSWeapon_MAX_WEAPONS_NO_KNIFES, // Max without the knife item defs, useful when treating all knives as a regular knife.
|
||||||
CSWeapon_BAYONET = 500,
|
CSWeapon_BAYONET = 500,
|
||||||
CSWeapon_KNIFE_CLASSIC = 503,
|
|
||||||
CSWeapon_KNIFE_FLIP = 505,
|
CSWeapon_KNIFE_FLIP = 505,
|
||||||
CSWeapon_KNIFE_GUT = 506,
|
CSWeapon_KNIFE_GUT = 506,
|
||||||
CSWeapon_KNIFE_KARAMBIT = 507,
|
CSWeapon_KNIFE_KARAMBIT = 507,
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ native bool SQL_CheckConfig(const char[] name);
|
|||||||
* string to return the default driver.
|
* string to return the default driver.
|
||||||
* @return Driver Handle, or INVALID_HANDLE on failure.
|
* @return Driver Handle, or INVALID_HANDLE on failure.
|
||||||
*/
|
*/
|
||||||
native DBDriver SQL_GetDriver(const char[] name="");
|
native Handle SQL_GetDriver(const char[] name="");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the driver of an opened database.
|
* Reads the driver of an opened database.
|
||||||
@@ -557,7 +557,7 @@ native DBDriver SQL_GetDriver(const char[] name="");
|
|||||||
* @param ident_length Maximum length of the buffer.
|
* @param ident_length Maximum length of the buffer.
|
||||||
* @return Driver Handle.
|
* @return Driver Handle.
|
||||||
*/
|
*/
|
||||||
native DBDriver SQL_ReadDriver(Handle database, char[] ident="", int ident_length=0);
|
native Handle SQL_ReadDriver(Handle database, char[] ident="", int ident_length=0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a driver's identification string.
|
* Retrieves a driver's identification string.
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ native bool ReadDirEntry(Handle dir, char[] buffer, int maxlength, FileType &typ
|
|||||||
* Mac, this has no distinction from binary mode. On Windows, it causes the '\n'
|
* Mac, this has no distinction from binary mode. On Windows, it causes the '\n'
|
||||||
* character (0xA) to be written as "\r\n" (0xD, 0xA).
|
* character (0xA) to be written as "\r\n" (0xD, 0xA).
|
||||||
*
|
*
|
||||||
* Example: "rb" opens a binary file for reading; "at" opens a text file for
|
* Example: "rb" opens a binary file for writing; "at" opens a text file for
|
||||||
* appending.
|
* appending.
|
||||||
*
|
*
|
||||||
* @param file File to open.
|
* @param file File to open.
|
||||||
|
|||||||
@@ -615,10 +615,7 @@ native int FormatNativeString(int out_param,
|
|||||||
*
|
*
|
||||||
* @param data Data passed to the RequestFrame native.
|
* @param data Data passed to the RequestFrame native.
|
||||||
*/
|
*/
|
||||||
typeset RequestFrameCallback {
|
typedef RequestFrameCallback = function void (any data);
|
||||||
function void ();
|
|
||||||
function void (any data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a single use Next Frame hook.
|
* Creates a single use Next Frame hook.
|
||||||
|
|||||||
@@ -682,7 +682,7 @@ enum ClientRangeType
|
|||||||
* @param size Maximum size of clients array.
|
* @param size Maximum size of clients array.
|
||||||
* @return Number of client indexes written to clients array.
|
* @return Number of client indexes written to clients array.
|
||||||
*/
|
*/
|
||||||
native int GetClientsInRange(const float origin[3], ClientRangeType rangeType, int[] clients, int size);
|
native int GetClientsInRange(float origin[3], ClientRangeType rangeType, int[] clients, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the server's authentication string (SteamID).
|
* Retrieves the server's authentication string (SteamID).
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ stock void TE_SendToClient(int client, float delay=0.0)
|
|||||||
* @param rangeType Range type to use for filtering clients.
|
* @param rangeType Range type to use for filtering clients.
|
||||||
* @param delay Delay in seconds to send the TE.
|
* @param delay Delay in seconds to send the TE.
|
||||||
*/
|
*/
|
||||||
stock void TE_SendToAllInRange(const float origin[3], ClientRangeType rangeType, float delay=0.0)
|
stock void TE_SendToAllInRange(float origin[3], ClientRangeType rangeType, float delay=0.0)
|
||||||
{
|
{
|
||||||
int[] clients = new int[MaxClients];
|
int[] clients = new int[MaxClients];
|
||||||
int total = GetClientsInRange(origin, rangeType, clients, MaxClients);
|
int total = GetClientsInRange(origin, rangeType, clients, MaxClients);
|
||||||
|
|||||||
@@ -633,18 +633,6 @@ native bool TR_DidHit(Handle hndl=INVALID_HANDLE);
|
|||||||
*/
|
*/
|
||||||
native int TR_GetHitGroup(Handle hndl=INVALID_HANDLE);
|
native int TR_GetHitGroup(Handle hndl=INVALID_HANDLE);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns in which hitbox the trace collided if any.
|
|
||||||
*
|
|
||||||
* Note: if the entity that collided with the trace is the world entity,
|
|
||||||
* then this function doesn't return an hitbox index but a static prop index.
|
|
||||||
*
|
|
||||||
* @param hndl A trace Handle, or INVALID_HANDLE to use a global trace result.
|
|
||||||
* @return Hitbox index (Or static prop index).
|
|
||||||
* @error Invalid Handle.
|
|
||||||
*/
|
|
||||||
native int TR_GetHitBoxIndex(Handle hndl=INVALID_HANDLE);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the normal vector to the collision plane of a trace.
|
* Find the normal vector to the collision plane of a trace.
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.11.0
|
1.10.0
|
||||||
|
|||||||
+1
-1
Submodule public/amtl updated: eb7b6ba084...2be66bdbdf
+1
-1
Submodule sourcepawn updated: 7e69f7eaf5...a98c996b16
+2
-12
@@ -18,17 +18,7 @@ param(
|
|||||||
'tf2',
|
'tf2',
|
||||||
'insurgency',
|
'insurgency',
|
||||||
'sdk2013',
|
'sdk2013',
|
||||||
'dota',
|
'dota'
|
||||||
'orangebox',
|
|
||||||
'blade',
|
|
||||||
'episode1',
|
|
||||||
'bms',
|
|
||||||
'darkm',
|
|
||||||
'swarm',
|
|
||||||
'bgt',
|
|
||||||
'eye',
|
|
||||||
'contagion',
|
|
||||||
'doi'
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -88,4 +78,4 @@ Checkout-Repo -Name "ambuild" -Branch "master" -Repo "https://github.com/alliedm
|
|||||||
Set-Location ambuild
|
Set-Location ambuild
|
||||||
& python setup.py install
|
& python setup.py install
|
||||||
|
|
||||||
Set-Location ..
|
Set-Location ..
|
||||||
Reference in New Issue
Block a user