Compare commits
79 Commits
475b1cdc29
...
1.9-dev
Author | SHA1 | Date | |
---|---|---|---|
363871a860 | |||
8e8dfa33ed | |||
f442b3d84f | |||
8817f3e541 | |||
81e4aa29a6 | |||
1754c0b959 | |||
bb4b818250 | |||
f5fea6ab7b | |||
f031b97e91 | |||
beaa8c436b | |||
f3d21a3fb1 | |||
3340884edb | |||
d1fc99fc28 | |||
5e7e1775bd | |||
9d4c9c5ce9 | |||
2064e224d1 | |||
73f52fd53a | |||
6c8c605fa3 | |||
d67510b841 | |||
00b769e3f2 | |||
f92e60a8ac | |||
8e902cb63b | |||
8fdc6540ca | |||
5eea3e5b42 | |||
1bfec70029 | |||
bdeb2a133f | |||
936c9477be | |||
4b335adfe8 | |||
e463e06480 | |||
d0c8084ac9 | |||
32a29f5a78 | |||
15a14a0a43 | |||
be3f2f540b | |||
4a2aecfe85 | |||
9ca3a685ed | |||
78ecb35e3c | |||
dafabc73c0 | |||
163afa041e | |||
c064459b67 | |||
4410d219f7 | |||
6fb27a03a7 | |||
5e48c9b6db | |||
9e962ce097 | |||
78d1c0f1cd | |||
691ae9f8d4 | |||
6cecb34e29 | |||
4ef0a78abd | |||
1f09bd53f6 | |||
c8bd4bb169 | |||
2dd36300bf | |||
c867d9a7cb | |||
b3980d2e5d | |||
2bc04236db | |||
211003750c | |||
6dba7c4f17 | |||
7515038e07 | |||
2bb5e92d93 | |||
77bbdbb59c | |||
70d822e17f | |||
6c53524d86 | |||
9eb1f427df | |||
5c5fbd83d1 | |||
be526418bf | |||
f63bc38f5c | |||
09b95aa6ab | |||
a0ea98da35 | |||
d867a95fd6 | |||
05bd01cd5e | |||
d93ee596bb | |||
523bb334d5 | |||
a635b383fc | |||
3238b25495 | |||
e993cdccae | |||
e059c1f5ab | |||
ddf0cc69dd | |||
9f00bf4f55 | |||
ac64ef041b | |||
7e23047c53 | |||
91f36f2308 |
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@ -1,12 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
||||||
patreon: # Replace with a single Patreon username
|
|
||||||
open_collective: # Replace with a single Open Collective username
|
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
||||||
liberapay: # Replace with a single Liberapay username
|
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
|
||||||
otechie: # Replace with a single Otechie username
|
|
||||||
custom: https://www.sourcemod.net/donate.php
|
|
137
.github/workflows/ci.yml
vendored
137
.github/workflows/ci.yml
vendored
@ -1,137 +0,0 @@
|
|||||||
name: Continuous Integration
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- 1.9-dev
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- 1.9-dev
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
os_short: linux
|
|
||||||
compiler_cc: gcc
|
|
||||||
compiler_cxx: g++
|
|
||||||
- os: ubuntu-latest
|
|
||||||
os_short: linux
|
|
||||||
compiler_cc: clang
|
|
||||||
compiler_cxx: clang++
|
|
||||||
- os: ubuntu-18.04
|
|
||||||
os_short: linux
|
|
||||||
compiler_cc: clang-3.9
|
|
||||||
compiler_cxx: clang++-3.9
|
|
||||||
- os: ubuntu-18.04
|
|
||||||
os_short: linux
|
|
||||||
compiler_cc: gcc-6
|
|
||||||
compiler_cxx: g++-6
|
|
||||||
compiler_install: 'g++6 g++-6-multilib'
|
|
||||||
- os: windows-latest
|
|
||||||
os_short: windows
|
|
||||||
compiler_cc: msvc
|
|
||||||
- os: windows-2016
|
|
||||||
os_short: windows
|
|
||||||
compiler_cc: msvc++14.16-vs2017-cl
|
|
||||||
# MacOS 32 Bins seem not supported
|
|
||||||
# - os: macos-latest
|
|
||||||
# os_short: mac
|
|
||||||
# compiler_cc: clang
|
|
||||||
# compiler_cxx: clang++
|
|
||||||
fail-fast: false
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
name: ${{ matrix.os_short }}-${{ matrix.os }}-${{ matrix.compiler_cc }}
|
|
||||||
env:
|
|
||||||
DEPENDENCIES_FOLDER: dependencies
|
|
||||||
DEPENDENCIES_ROOT: ${{ github.workspace }}/dependencies
|
|
||||||
DEPENDENCIES_ROOT_WIN: ${{ github.workspace }}\dependencies
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
path: amxmodx
|
|
||||||
# Setup Python for AMBuild
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
name: Setup Python 3.8
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
python3 -m pip install --upgrade pip setuptools wheel
|
|
||||||
python3 --version
|
|
||||||
- name: Install AMXModX dependencies (Linux)
|
|
||||||
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p ${{ env.DEPENDENCIES_FOLDER }}
|
|
||||||
cd ${{ env.DEPENDENCIES_FOLDER }}
|
|
||||||
|
|
||||||
# Satisfy checkout-deps requirement for a "amxmodx" folder.
|
|
||||||
mkdir -p amxmodx
|
|
||||||
../amxmodx/support/checkout-deps.sh
|
|
||||||
- name: Install AMXModX dependencies (Windows)
|
|
||||||
if: startsWith(runner.os, 'Windows')
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir %DEPENDENCIES_ROOT_WIN%\nasm
|
|
||||||
curl -L -o "%DEPENDENCIES_ROOT_WIN%\nasm\nasm.zip" https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
|
|
||||||
chdir %DEPENDENCIES_ROOT_WIN%\nasm
|
|
||||||
7z x nasm.zip
|
|
||||||
|
|
||||||
chdir %DEPENDENCIES_ROOT_WIN%
|
|
||||||
git clone https://github.com/alliedmodders/ambuild
|
|
||||||
git clone https://github.com/alliedmodders/metamod-hl1 metamod-am
|
|
||||||
git clone https://github.com/alliedmodders/hlsdk
|
|
||||||
|
|
||||||
curl -L -o "mysql-connector-c-6.1.1-win32.zip" https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-6.1.1-win32.zip
|
|
||||||
7z x mysql-connector-c-6.1.1-win32.zip -o"mysql"
|
|
||||||
cd mysql
|
|
||||||
dir
|
|
||||||
ren mysql-connector-c-6.1.1-win32 mysql-5.5
|
|
||||||
move /Y mysql-5.5 ..\
|
|
||||||
|
|
||||||
cd ..\ambuild
|
|
||||||
python3 setup.py install
|
|
||||||
- name: Install Linux dependencies
|
|
||||||
if: startsWith(runner.os, 'Linux')
|
|
||||||
run: |
|
|
||||||
sudo dpkg --add-architecture i386
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y --no-install-recommends \
|
|
||||||
gcc-multilib g++-multilib libstdc++6 lib32stdc++6 \
|
|
||||||
libc6-dev libc6-dev-i386 linux-libc-dev \
|
|
||||||
linux-libc-dev:i386 lib32z1-dev nasm ${{ matrix.compiler_cc }} ${{ matrix.compiler_install }}
|
|
||||||
- name: Select compiler
|
|
||||||
if: startsWith(runner.os, 'Linux')
|
|
||||||
run: |
|
|
||||||
echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV
|
|
||||||
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
|
|
||||||
${{ matrix.compiler_cc }} --version
|
|
||||||
${{ matrix.compiler_cxx }} --version
|
|
||||||
- uses: ilammy/setup-nasm@v1
|
|
||||||
- name: Build Linux/macOS
|
|
||||||
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
|
|
||||||
working-directory: amxmodx
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
python3 ../configure.py --enable-optimize --metamod=${{ env.DEPENDENCIES_ROOT }}/metamod-am --hlsdk=${{ env.DEPENDENCIES_ROOT }}/hlsdk --mysql=${{ env.DEPENDENCIES_ROOT }}/mysql-5.5
|
|
||||||
ambuild
|
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
with:
|
|
||||||
arch: x86
|
|
||||||
- name: Build Windows
|
|
||||||
if: startsWith(runner.os, 'Windows')
|
|
||||||
working-directory: amxmodx
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
cl.exe
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
python3 ../configure.py --enable-optimize --metamod=${{ env.DEPENDENCIES_ROOT_WIN }}\metamod-am --hlsdk=${{ env.DEPENDENCIES_ROOT_WIN }}\hlsdk --mysql=${{ env.DEPENDENCIES_ROOT_WIN }}\mysql-5.5
|
|
||||||
ambuild
|
|
||||||
|
|
@ -16,9 +16,6 @@ language: cpp
|
|||||||
sudo: false
|
sudo: false
|
||||||
compiler:
|
compiler:
|
||||||
- clang
|
- clang
|
||||||
install:
|
|
||||||
- pyenv install 3.6.3
|
|
||||||
- pyenv global 3.6.3
|
|
||||||
before_script:
|
before_script:
|
||||||
- CHECKOUT_DIR=$PWD && cd ..
|
- CHECKOUT_DIR=$PWD && cd ..
|
||||||
- chmod a+x $CHECKOUT_DIR/support/checkout-deps.sh
|
- chmod a+x $CHECKOUT_DIR/support/checkout-deps.sh
|
||||||
@ -26,5 +23,5 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- mkdir build && cd build
|
- mkdir build && cd build
|
||||||
- PATH="~/.local/bin:$PATH"
|
- PATH="~/.local/bin:$PATH"
|
||||||
- CC=clang-3.7 CXX=clang-3.7 python3 ../configure.py --enable-optimize
|
- CC=clang-3.7 CXX=clang-3.7 python ../configure.py --enable-optimize
|
||||||
- ambuild
|
- ambuild
|
||||||
|
@ -225,14 +225,8 @@ class AMXXConfig(object):
|
|||||||
cxx.cxxflags += ['-Wno-delete-non-virtual-dtor']
|
cxx.cxxflags += ['-Wno-delete-non-virtual-dtor']
|
||||||
if have_gcc and cxx.version >= '4.8':
|
if have_gcc and cxx.version >= '4.8':
|
||||||
cxx.cflags += ['-Wno-unused-result', '-Wno-error=sign-compare']
|
cxx.cflags += ['-Wno-unused-result', '-Wno-error=sign-compare']
|
||||||
if have_gcc and cxx.version >= '8.0':
|
|
||||||
cxx.cflags += ['-Wno-stringop-truncation']
|
|
||||||
if have_gcc and cxx.version >= '9.0':
|
|
||||||
cxx.cflags += ['-Wno-address-of-packed-member']
|
|
||||||
if have_clang:
|
if have_clang:
|
||||||
cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch']
|
cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch']
|
||||||
if cxx.version >= '10.0':
|
|
||||||
cxx.cxxflags += ['-Wno-tautological-compare']
|
|
||||||
if cxx.version >= 'apple-clang-10.0':
|
if cxx.version >= 'apple-clang-10.0':
|
||||||
cxx.cxxflags += [
|
cxx.cxxflags += [
|
||||||
'-Wno-inconsistent-missing-override',
|
'-Wno-inconsistent-missing-override',
|
||||||
|
@ -27,10 +27,6 @@ elif builder.target_platform == 'windows':
|
|||||||
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
|
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
|
||||||
'/SECTION:.data,RW',
|
'/SECTION:.data,RW',
|
||||||
]
|
]
|
||||||
elif builder.target_platform == 'linux':
|
|
||||||
binary.compiler.postlink += [
|
|
||||||
binary.Dep(AMXX.stdcxx_path),
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.compiler.linkflags += [AMXX.zlib.binary, AMXX.hashing.binary, AMXX.utf8rewind.binary]
|
binary.compiler.linkflags += [AMXX.zlib.binary, AMXX.hashing.binary, AMXX.utf8rewind.binary]
|
||||||
|
|
||||||
|
@ -122,8 +122,8 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
|||||||
#if defined BINLOG_ENABLED
|
#if defined BINLOG_ENABLED
|
||||||
g_BinLog.WriteOp(BinLog_CallPubFunc, iter->pPlugin->getId(), iter->func);
|
g_BinLog.WriteOp(BinLog_CallPubFunc, iter->pPlugin->getId(), iter->func);
|
||||||
#endif
|
#endif
|
||||||
|
int err = amx_Exec(amx, &retVal, iter->func);
|
||||||
|
|
||||||
int err = amx_ExecPerf(amx, &retVal, iter->func);
|
|
||||||
// log runtime error, if any
|
// log runtime error, if any
|
||||||
if (err != AMX_ERR_NONE)
|
if (err != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
@ -327,7 +327,8 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
|||||||
#if defined BINLOG_ENABLED
|
#if defined BINLOG_ENABLED
|
||||||
g_BinLog.WriteOp(BinLog_CallPubFunc, pPlugin->getId(), m_Func);
|
g_BinLog.WriteOp(BinLog_CallPubFunc, pPlugin->getId(), m_Func);
|
||||||
#endif
|
#endif
|
||||||
int err = amx_ExecPerf(m_Amx, &retVal, m_Func);
|
int err = amx_Exec(m_Amx, &retVal, m_Func);
|
||||||
|
|
||||||
if (err != AMX_ERR_NONE)
|
if (err != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
//Did something else set an error?
|
//Did something else set an error?
|
||||||
|
@ -325,16 +325,16 @@ SMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key
|
|||||||
}
|
}
|
||||||
else if (!strcmp(key, "size"))
|
else if (!strcmp(key, "size"))
|
||||||
{
|
{
|
||||||
TempType.fieldSize = ke::Max<int>(0, strtol(value, nullptr, 0));
|
TempType.fieldSize = ke::Max<int>(0, atoi(value));
|
||||||
}
|
}
|
||||||
else if (!strcmp(key, "unsigned"))
|
else if (!strcmp(key, "unsigned"))
|
||||||
{
|
{
|
||||||
TempType.fieldUnsigned = !!strtol(value, nullptr, 0);
|
TempType.fieldUnsigned = !!atoi(value);
|
||||||
}
|
}
|
||||||
else if (g_LibSys.IsPlatformCompatible(key, &m_MatchedPlatform))
|
else if (g_LibSys.IsPlatformCompatible(key, &m_MatchedPlatform))
|
||||||
{
|
{
|
||||||
m_FoundOffset = true;
|
m_FoundOffset = true;
|
||||||
TempType.fieldOffset = strtol(value, nullptr, 0);
|
TempType.fieldOffset = atoi(value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ SMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key
|
|||||||
|
|
||||||
if (m_AddressReadCount < limit)
|
if (m_AddressReadCount < limit)
|
||||||
{
|
{
|
||||||
m_AddressRead[m_AddressReadCount] = strtol(value, nullptr, 0);
|
m_AddressRead[m_AddressReadCount] = atoi(value);
|
||||||
m_AddressReadCount++;
|
m_AddressReadCount++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -180,18 +180,6 @@ class CGameConfigManager : public IGameConfigManager
|
|||||||
member = type.fieldOffset; \
|
member = type.fieldOffset; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_OFFSET_NO_ERROR(classname, member) \
|
|
||||||
static int member = -1; \
|
|
||||||
if (member == -1) \
|
|
||||||
{ \
|
|
||||||
TypeDescription type; \
|
|
||||||
if (!CommonConfig->GetOffsetByClass(classname, #member, &type) || type.fieldOffset < 0)\
|
|
||||||
{ \
|
|
||||||
return; \
|
|
||||||
} \
|
|
||||||
member = type.fieldOffset; \
|
|
||||||
}
|
|
||||||
|
|
||||||
extern CGameConfigManager ConfigManager;
|
extern CGameConfigManager ConfigManager;
|
||||||
extern IGameConfig *CommonConfig;
|
extern IGameConfig *CommonConfig;
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "libraries.h"
|
#include "libraries.h"
|
||||||
#include <amxmodx_version.h>
|
#include <amxmodx_version.h>
|
||||||
#include "engine_strucs.h"
|
|
||||||
|
|
||||||
extern const char *no_function;
|
extern const char *no_function;
|
||||||
|
|
||||||
@ -155,37 +154,6 @@ int CPluginMngr::loadPluginsFromFile(const char* filename, bool warn)
|
|||||||
*get_amxaddr(plugin->getAMX(), addr) = gpGlobals->maxClients;
|
*get_amxaddr(plugin->getAMX(), addr) = gpGlobals->maxClients;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "MapName", &addr) != AMX_ERR_NOTFOUND)
|
|
||||||
{
|
|
||||||
set_amxstring(plugin->getAMX(), addr, STRING(gpGlobals->mapname), MAX_MAPNAME_LENGTH - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto length = 0;
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "PluginName", &addr) != AMX_ERR_NOTFOUND)
|
|
||||||
{
|
|
||||||
plugin->setTitle(get_amxstring(plugin->getAMX(), addr, 0, length));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "PluginVersion", &addr) != AMX_ERR_NOTFOUND)
|
|
||||||
{
|
|
||||||
plugin->setVersion(get_amxstring(plugin->getAMX(), addr, 0, length));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "PluginAuthor", &addr) != AMX_ERR_NOTFOUND)
|
|
||||||
{
|
|
||||||
plugin->setAuthor(get_amxstring(plugin->getAMX(), addr, 0, length));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "PluginURL", &addr) != AMX_ERR_NOTFOUND)
|
|
||||||
{
|
|
||||||
plugin->setUrl(get_amxstring(plugin->getAMX(), addr, 0, length));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "PluginDescription", &addr) != AMX_ERR_NOTFOUND)
|
|
||||||
{
|
|
||||||
plugin->setDescription(get_amxstring(plugin->getAMX(), addr, 0, length));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amx_FindPubVar(plugin->getAMX(), "NULL_STRING", &addr) != AMX_ERR_NOTFOUND)
|
if (amx_FindPubVar(plugin->getAMX(), "NULL_STRING", &addr) != AMX_ERR_NOTFOUND)
|
||||||
{
|
{
|
||||||
plugin->m_pNullStringOfs = get_amxaddr(plugin->getAMX(), addr);
|
plugin->m_pNullStringOfs = get_amxaddr(plugin->getAMX(), addr);
|
||||||
@ -307,7 +275,6 @@ CPluginMngr::CPlugin::CPlugin(int i, const char* p, const char* n, char* e, size
|
|||||||
title = unk;
|
title = unk;
|
||||||
author = unk;
|
author = unk;
|
||||||
version = unk;
|
version = unk;
|
||||||
url = unk;
|
|
||||||
|
|
||||||
char file[PLATFORM_MAX_PATH];
|
char file[PLATFORM_MAX_PATH];
|
||||||
char* path = build_pathname_r(file, sizeof(file), "%s/%s", p, n);
|
char* path = build_pathname_r(file, sizeof(file), "%s/%s", p, n);
|
||||||
|
@ -56,8 +56,6 @@ public:
|
|||||||
ke::AString version;
|
ke::AString version;
|
||||||
ke::AString title;
|
ke::AString title;
|
||||||
ke::AString author;
|
ke::AString author;
|
||||||
ke::AString url;
|
|
||||||
ke::AString description;
|
|
||||||
ke::AString errorMsg;
|
ke::AString errorMsg;
|
||||||
|
|
||||||
unsigned int failcounter;
|
unsigned int failcounter;
|
||||||
@ -80,8 +78,6 @@ public:
|
|||||||
inline const char* getVersion() { return version.chars();}
|
inline const char* getVersion() { return version.chars();}
|
||||||
inline const char* getTitle() { return title.chars();}
|
inline const char* getTitle() { return title.chars();}
|
||||||
inline const char* getAuthor() { return author.chars();}
|
inline const char* getAuthor() { return author.chars();}
|
||||||
inline const char* getUrl() { return url.chars(); }
|
|
||||||
inline const char* getDescription() { return description.chars(); }
|
|
||||||
inline const char* getError() { return errorMsg.chars();}
|
inline const char* getError() { return errorMsg.chars();}
|
||||||
inline int getStatusCode() { return status; }
|
inline int getStatusCode() { return status; }
|
||||||
inline int getId() const { return id; }
|
inline int getId() const { return id; }
|
||||||
@ -90,8 +86,6 @@ public:
|
|||||||
inline void setTitle(const char* n) { title = n; }
|
inline void setTitle(const char* n) { title = n; }
|
||||||
inline void setAuthor(const char* n) { author =n; }
|
inline void setAuthor(const char* n) { author =n; }
|
||||||
inline void setVersion(const char* n) { version = n; }
|
inline void setVersion(const char* n) { version = n; }
|
||||||
inline void setUrl(const char* n) { url = n; }
|
|
||||||
inline void setDescription(const char* n) { description = n; }
|
|
||||||
inline void setError(const char* n) { errorMsg = n; }
|
inline void setError(const char* n) { errorMsg = n; }
|
||||||
inline bool isValid() const { return (status >= ps_paused); }
|
inline bool isValid() const { return (status >= ps_paused); }
|
||||||
inline bool isPaused() const { return ((status == ps_paused) || (status == ps_stopped)); }
|
inline bool isPaused() const { return ((status == ps_paused) || (status == ps_stopped)); }
|
||||||
|
@ -296,8 +296,6 @@ void CoreConfig::OnMapConfigTimer()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_legacyMapConfigNextTime <= gpGlobals->time)
|
|
||||||
{
|
|
||||||
if (m_PendingForwardPush)
|
if (m_PendingForwardPush)
|
||||||
{
|
{
|
||||||
m_PendingForwardPush = false;
|
m_PendingForwardPush = false;
|
||||||
@ -305,11 +303,10 @@ void CoreConfig::OnMapConfigTimer()
|
|||||||
|
|
||||||
executeForwards(m_ConfigsExecutedForward);
|
executeForwards(m_ConfigsExecutedForward);
|
||||||
}
|
}
|
||||||
else if (!m_LegacyMapConfigsExecuted)
|
else if (!m_LegacyMapConfigsExecuted && m_legacyMapConfigNextTime <= gpGlobals->time)
|
||||||
{
|
{
|
||||||
ExecuteMapConfig();
|
ExecuteMapConfig();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreConfig::CheckLegacyBufferedCommand(char *command)
|
void CoreConfig::CheckLegacyBufferedCommand(char *command)
|
||||||
@ -319,7 +316,6 @@ void CoreConfig::CheckLegacyBufferedCommand(char *command)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!m_LegacyMainConfigExecuted && strstr(command, MainConfigFile))
|
if (!m_LegacyMainConfigExecuted && strstr(command, MainConfigFile))
|
||||||
{
|
{
|
||||||
m_LegacyMainConfigExecuted = true;
|
m_LegacyMainConfigExecuted = true;
|
||||||
@ -328,9 +324,6 @@ void CoreConfig::CheckLegacyBufferedCommand(char *command)
|
|||||||
if (!m_LegacyMapConfigsExecuted && strstr(command, MapConfigDir))
|
if (!m_LegacyMapConfigsExecuted && strstr(command, MapConfigDir))
|
||||||
{
|
{
|
||||||
m_LegacyMapConfigsExecuted = true;
|
m_LegacyMapConfigsExecuted = true;
|
||||||
|
|
||||||
// Consider all configs be executed to m_legacyMapConfigNextTime time.
|
|
||||||
m_PendingForwardPush = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,9 +66,6 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <chrono>
|
|
||||||
#include <amxmodx.h>
|
|
||||||
#include <CPlugin.h>
|
|
||||||
|
|
||||||
/* When one or more of the AMX_funcname macris are defined, we want
|
/* When one or more of the AMX_funcname macris are defined, we want
|
||||||
* to compile only those functions. However, when none of these macros
|
* to compile only those functions. However, when none of these macros
|
||||||
@ -4176,37 +4173,3 @@ int AMXAPI amx_GetStringOld(char *dest,const cell *source,int use_wchar)
|
|||||||
dest[len]='\0'; /* store terminator */
|
dest[len]='\0'; /* store terminator */
|
||||||
return AMX_ERR_NONE;
|
return AMX_ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AMXAPI amx_ExecPerf(AMX* amx, cell* retval, int index)
|
|
||||||
{
|
|
||||||
CPluginMngr::CPlugin* perf_Plug = g_plugins.findPluginFast(amx);
|
|
||||||
if (amxmodx_perflog->value > 0.0f && perf_Plug && (perf_Plug->isDebug() || (int)amxmodx_debug->value == 2))
|
|
||||||
{
|
|
||||||
char perf_funcname[sNAMEMAX + 1];
|
|
||||||
perf_funcname[0] = '\0';
|
|
||||||
amx_GetPublic(perf_Plug->getAMX(), index, perf_funcname);
|
|
||||||
if (perf_funcname[0] == '\0')
|
|
||||||
sprintf(perf_funcname, "Unknown_ID%d", index);
|
|
||||||
|
|
||||||
const char* perf_plugname = perf_Plug->getName();
|
|
||||||
if (!perf_plugname || perf_plugname[0] == '\0')
|
|
||||||
perf_plugname = "Unknown_plugin";
|
|
||||||
|
|
||||||
using std::chrono::steady_clock;
|
|
||||||
using std::chrono::duration_cast;
|
|
||||||
using std::chrono::duration;
|
|
||||||
using std::chrono::microseconds;
|
|
||||||
|
|
||||||
auto t1 = steady_clock::now();
|
|
||||||
int err = amx_Exec(amx, retval, index);
|
|
||||||
|
|
||||||
auto ms_int = duration_cast<microseconds>(steady_clock::now() - t1);
|
|
||||||
auto ms_float = (float)(ms_int.count() / 1000.0f);
|
|
||||||
if (ms_float >= amxmodx_perflog->value)
|
|
||||||
{
|
|
||||||
AMXXLOG_Log("[%s] performance issue. Function %s executed more than %.*fms.", perf_plugname, perf_funcname, 1, ms_float);
|
|
||||||
}
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
return amx_Exec(amx, retval, index);
|
|
||||||
}
|
|
||||||
|
@ -382,7 +382,6 @@ int AMXAPI amx_Callback(AMX *amx, cell index, cell *result, cell *params);
|
|||||||
int AMXAPI amx_CheckNatives(AMX *amx, AMX_NATIVE_FILTER nf);
|
int AMXAPI amx_CheckNatives(AMX *amx, AMX_NATIVE_FILTER nf);
|
||||||
int AMXAPI amx_Cleanup(AMX *amx);
|
int AMXAPI amx_Cleanup(AMX *amx);
|
||||||
int AMXAPI amx_Clone(AMX *amxClone, AMX *amxSource, void *data);
|
int AMXAPI amx_Clone(AMX *amxClone, AMX *amxSource, void *data);
|
||||||
int AMXAPI amx_ExecPerf(AMX* amx, cell* retval, int index);
|
|
||||||
int AMXAPI amx_Exec(AMX *amx, cell *retval, int index);
|
int AMXAPI amx_Exec(AMX *amx, cell *retval, int index);
|
||||||
int AMXAPI amx_FindNative(AMX *amx, const char *name, int *index);
|
int AMXAPI amx_FindNative(AMX *amx, const char *name, int *index);
|
||||||
int AMXAPI amx_FindPublic(AMX *amx, const char *funcname, int *index);
|
int AMXAPI amx_FindPublic(AMX *amx, const char *funcname, int *index);
|
||||||
|
@ -23,31 +23,16 @@
|
|||||||
extern CFlagManager FlagMan;
|
extern CFlagManager FlagMan;
|
||||||
ke::Vector<CAdminData *> DynamicAdmins;
|
ke::Vector<CAdminData *> DynamicAdmins;
|
||||||
|
|
||||||
const char *g_sInaccessibleXVars[] =
|
|
||||||
{
|
|
||||||
"MaxClients",
|
|
||||||
"MapName",
|
|
||||||
"PluginName",
|
|
||||||
"PluginVersion",
|
|
||||||
"PluginAuthor",
|
|
||||||
"PluginURL",
|
|
||||||
"NULL_STRING",
|
|
||||||
"NULL_VECTOR"
|
|
||||||
};
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char* sName = get_amxstring(amx, params[1], 0, len);
|
char* sName = get_amxstring(amx, params[1], 0, len);
|
||||||
cell ptr;
|
cell ptr;
|
||||||
|
|
||||||
for (auto name : g_sInaccessibleXVars)
|
if (!strcmp(sName, "MaxClients") || !strcmp(sName, "NULL_STRING") || !strcmp(sName, "NULL_VECTOR"))
|
||||||
{
|
|
||||||
if (!strcmp(sName, name))
|
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for (CPluginMngr::iterator a = g_plugins.begin(); a ; ++a)
|
for (CPluginMngr::iterator a = g_plugins.begin(); a ; ++a)
|
||||||
{
|
{
|
||||||
@ -540,22 +525,20 @@ static cell AMX_NATIVE_CALL next_hudchannel(AMX *amx, cell *params)
|
|||||||
return pPlayer->NextHUDChannel();
|
return pPlayer->NextHUDChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL set_hudmessage(AMX *amx, cell *params) /* 11 param */
|
static cell AMX_NATIVE_CALL set_hudmessage(AMX *amx, cell *params) /* 13 param */
|
||||||
{
|
{
|
||||||
cell num_params = params[0] / sizeof(cell);
|
cell num_params = params[0] / sizeof(cell);
|
||||||
|
|
||||||
if (num_params >= 13)
|
if(num_params >= 13) {
|
||||||
{
|
|
||||||
cell *color2 = get_amxaddr(amx, params[13]);
|
cell *color2 = get_amxaddr(amx, params[13]);
|
||||||
|
|
||||||
g_hudset.a1 = static_cast<byte>(params[12]);
|
g_hudset.a1 = params[12];
|
||||||
g_hudset.a2 = static_cast<byte>(color2[3]);
|
g_hudset.a2 = color2[3];
|
||||||
g_hudset.r2 = static_cast<byte>(color2[0]);
|
g_hudset.r2 = color2[0];
|
||||||
g_hudset.g2 = static_cast<byte>(color2[1]);
|
g_hudset.g2 = color2[1];
|
||||||
g_hudset.b2 = static_cast<byte>(color2[2]);
|
g_hudset.b2 = color2[2];
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
g_hudset.a1 = 0;
|
g_hudset.a1 = 0;
|
||||||
g_hudset.a2 = 0;
|
g_hudset.a2 = 0;
|
||||||
g_hudset.r2 = 255;
|
g_hudset.r2 = 255;
|
||||||
@ -1434,7 +1417,7 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||||||
pPlayer->vgui = false;
|
pPlayer->vgui = false;
|
||||||
|
|
||||||
if (time == -1)
|
if (time == -1)
|
||||||
pPlayer->menuexpire = static_cast<float>(INFINITE);
|
pPlayer->menuexpire = INFINITE;
|
||||||
else
|
else
|
||||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||||
|
|
||||||
@ -1452,7 +1435,7 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||||||
pPlayer->vgui = false;
|
pPlayer->vgui = false;
|
||||||
|
|
||||||
if (time == -1)
|
if (time == -1)
|
||||||
pPlayer->menuexpire = static_cast<float>(INFINITE);
|
pPlayer->menuexpire = INFINITE;
|
||||||
else
|
else
|
||||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||||
|
|
||||||
@ -1464,34 +1447,29 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL register_plugin(AMX *amx, cell *params) /* 5 param */
|
static cell AMX_NATIVE_CALL register_plugin(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
enum { arg_count, arg_title, arg_version, arg_author, arg_url, arg_description };
|
|
||||||
|
|
||||||
CPluginMngr::CPlugin* a = g_plugins.findPluginFast(amx);
|
CPluginMngr::CPlugin* a = g_plugins.findPluginFast(amx);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
char *title = get_amxstring(amx, params[1], 0, i);
|
||||||
a->setTitle(get_amxstring(amx, params[arg_title], 0, i));
|
char *vers = get_amxstring(amx, params[2], 1, i);
|
||||||
a->setVersion(get_amxstring(amx, params[arg_version], 0, i));
|
char *author = get_amxstring(amx, params[3], 2, i);
|
||||||
a->setAuthor(get_amxstring(amx, params[arg_author], 0, i));
|
|
||||||
|
|
||||||
#if defined BINLOG_ENABLED
|
#if defined BINLOG_ENABLED
|
||||||
g_BinLog.WriteOp(BinLog_Registered, a->getId(), a->getTitle(), a->getVersion());
|
g_BinLog.WriteOp(BinLog_Registered, a->getId(), title, vers);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (params[arg_count] / sizeof(cell) > arg_author)
|
a->setTitle(title);
|
||||||
{
|
a->setVersion(vers);
|
||||||
a->setUrl(get_amxstring(amx, params[arg_url], 0, i));
|
a->setAuthor(author);
|
||||||
a->setDescription(get_amxstring(amx, params[arg_description], 0, i));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check if we need to add fail counters */
|
/* Check if we need to add fail counters */
|
||||||
i = 0;
|
i = 0;
|
||||||
unsigned int counter = 0;
|
unsigned int counter = 0;
|
||||||
while (NONGPL_PLUGIN_LIST[i].author != NULL)
|
while (NONGPL_PLUGIN_LIST[i].author != NULL)
|
||||||
{
|
{
|
||||||
if (strcmp(NONGPL_PLUGIN_LIST[i].author, a->getAuthor()) == 0)
|
if (strcmp(NONGPL_PLUGIN_LIST[i].author, author) == 0)
|
||||||
{
|
{
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
@ -1499,7 +1477,7 @@ static cell AMX_NATIVE_CALL register_plugin(AMX *amx, cell *params) /* 5 param *
|
|||||||
{
|
{
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
if (stricmp(NONGPL_PLUGIN_LIST[i].title, a->getTitle()) == 0)
|
if (stricmp(NONGPL_PLUGIN_LIST[i].title, title) == 0)
|
||||||
{
|
{
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
@ -1533,34 +1511,31 @@ static cell AMX_NATIVE_CALL register_menucmd(AMX *amx, cell *params) /* 3 param
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_plugin(AMX *amx, cell *params) /* 15 param */
|
static cell AMX_NATIVE_CALL get_plugin(AMX *amx, cell *params) /* 11 param */
|
||||||
{
|
{
|
||||||
enum
|
|
||||||
{
|
|
||||||
arg_count, arg_plugin, arg_name, arg_namelen, arg_title, arg_titlelen,
|
|
||||||
arg_version, arg_versionlen, arg_author, arg_authorlen, arg_status, arg_statuslen,
|
|
||||||
arg_url, arg_urllen, arg_description, arg_descriptionlen
|
|
||||||
};
|
|
||||||
|
|
||||||
CPluginMngr::CPlugin* a;
|
CPluginMngr::CPlugin* a;
|
||||||
|
|
||||||
if (params[arg_plugin] < 0)
|
if (params[1] < 0)
|
||||||
a = g_plugins.findPluginFast(amx);
|
a = g_plugins.findPluginFast(amx);
|
||||||
else
|
else
|
||||||
a = g_plugins.findPlugin((int)params[arg_plugin]);
|
a = g_plugins.findPlugin((int)params[1]);
|
||||||
|
|
||||||
if (a)
|
if (a)
|
||||||
{
|
{
|
||||||
set_amxstring(amx, params[arg_name], a->getName(), params[arg_namelen]);
|
set_amxstring(amx, params[2], a->getName(), params[3]);
|
||||||
set_amxstring(amx, params[arg_title], a->getTitle(), params[arg_titlelen]);
|
set_amxstring(amx, params[4], a->getTitle(), params[5]);
|
||||||
set_amxstring(amx, params[arg_version], a->getVersion(), params[arg_versionlen]);
|
set_amxstring(amx, params[6], a->getVersion(), params[7]);
|
||||||
set_amxstring(amx, params[arg_author], a->getAuthor(), params[arg_authorlen]);
|
set_amxstring(amx, params[8], a->getAuthor(), params[9]);
|
||||||
set_amxstring(amx, params[arg_status], a->getStatus(), params[arg_statuslen]);
|
set_amxstring(amx, params[10], a->getStatus(), params[11]);
|
||||||
|
|
||||||
if (params[arg_count] / sizeof(cell) > arg_url)
|
if (params[0] / sizeof(cell) >= 12)
|
||||||
{
|
{
|
||||||
set_amxstring(amx, params[arg_url], a->getUrl(), params[arg_urllen]);
|
cell *jit_info = get_amxaddr(amx, params[12]);
|
||||||
set_amxstring(amx, params[arg_description], a->getDescription(), params[arg_descriptionlen]);
|
#if defined AMD64 || !defined JIT
|
||||||
|
*jit_info = 0;
|
||||||
|
#else
|
||||||
|
*jit_info = a->isDebug() ? 0 : 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return a->getId();
|
return a->getId();
|
||||||
@ -3709,7 +3684,7 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params)
|
|||||||
amx_Push(pAmx, gparams[i]);
|
amx_Push(pAmx, gparams[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = amx_ExecPerf(pAmx, &retVal, func);
|
err = amx_Exec(pAmx, &retVal, func);
|
||||||
|
|
||||||
if (err != AMX_ERR_NONE)
|
if (err != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
|
@ -196,9 +196,7 @@ extern bool g_official_mod;
|
|||||||
extern bool g_dontprecache;
|
extern bool g_dontprecache;
|
||||||
extern int g_srvindex;
|
extern int g_srvindex;
|
||||||
extern cvar_t* amxmodx_version;
|
extern cvar_t* amxmodx_version;
|
||||||
extern cvar_t* amxmodx_debug;
|
|
||||||
extern cvar_t* amxmodx_language;
|
extern cvar_t* amxmodx_language;
|
||||||
extern cvar_t* amxmodx_perflog;
|
|
||||||
extern cvar_t* hostname;
|
extern cvar_t* hostname;
|
||||||
extern cvar_t* mp_timelimit;
|
extern cvar_t* mp_timelimit;
|
||||||
extern fakecmd_t g_fakecmd;
|
extern fakecmd_t g_fakecmd;
|
||||||
|
@ -289,18 +289,7 @@ size_t CAmxxReader::GetBufferSize()
|
|||||||
m_pFile = NULL; \
|
m_pFile = NULL; \
|
||||||
return m_Status; \
|
return m_Status; \
|
||||||
}
|
}
|
||||||
#define DATAREAD_RELEASE(addr, itemsize, itemcount) \
|
|
||||||
if (fread(addr, itemsize, itemcount, m_pFile) != static_cast<size_t>(itemcount)) \
|
|
||||||
{ \
|
|
||||||
if (feof(m_pFile)) \
|
|
||||||
m_Status = Err_FileInvalid; \
|
|
||||||
else \
|
|
||||||
m_Status = Err_FileRead; \
|
|
||||||
fclose(m_pFile); \
|
|
||||||
m_pFile = NULL; \
|
|
||||||
delete[] tempBuffer;\
|
|
||||||
return m_Status; \
|
|
||||||
}
|
|
||||||
CAmxxReader::Error CAmxxReader::GetSection(void *buffer)
|
CAmxxReader::Error CAmxxReader::GetSection(void *buffer)
|
||||||
{
|
{
|
||||||
if (!m_pFile)
|
if (!m_pFile)
|
||||||
@ -322,7 +311,7 @@ CAmxxReader::Error CAmxxReader::GetSection(void *buffer)
|
|||||||
PluginEntry *pe = &(m_Bh.plugins[m_Entry]);
|
PluginEntry *pe = &(m_Bh.plugins[m_Entry]);
|
||||||
char *tempBuffer = new char[m_SectionLength + 1];
|
char *tempBuffer = new char[m_SectionLength + 1];
|
||||||
fseek(m_pFile, pe->offs, SEEK_SET);
|
fseek(m_pFile, pe->offs, SEEK_SET);
|
||||||
DATAREAD_RELEASE((void *)tempBuffer, 1, m_SectionLength);
|
DATAREAD((void *)tempBuffer, 1, m_SectionLength);
|
||||||
uLongf destLen = GetBufferSize();
|
uLongf destLen = GetBufferSize();
|
||||||
int result = uncompress((Bytef *)buffer, &destLen, (Bytef *)tempBuffer, m_SectionLength);
|
int result = uncompress((Bytef *)buffer, &destLen, (Bytef *)tempBuffer, m_SectionLength);
|
||||||
delete [] tempBuffer;
|
delete [] tempBuffer;
|
||||||
@ -346,7 +335,7 @@ CAmxxReader::Error CAmxxReader::GetSection(void *buffer)
|
|||||||
// read the data to a temporary buffer
|
// read the data to a temporary buffer
|
||||||
char *tempBuffer = new char[m_SectionLength + 1];
|
char *tempBuffer = new char[m_SectionLength + 1];
|
||||||
//fread(tempBuffer, sizeof(char), m_SectionLength, m_pFile);
|
//fread(tempBuffer, sizeof(char), m_SectionLength, m_pFile);
|
||||||
DATAREAD_RELEASE((void*)tempBuffer, 1, m_SectionLength);
|
DATAREAD((void*)tempBuffer, 1, m_SectionLength);
|
||||||
// decompress
|
// decompress
|
||||||
int result = uncompress((Bytef *)buffer, &destLen, (Bytef *)tempBuffer, m_SectionLength);
|
int result = uncompress((Bytef *)buffer, &destLen, (Bytef *)tempBuffer, m_SectionLength);
|
||||||
delete [] tempBuffer;
|
delete [] tempBuffer;
|
||||||
|
@ -728,7 +728,7 @@ int Handler::HandleModule(const char *module, bool isClass)
|
|||||||
m_pAmx->flags |= AMX_FLAG_PRENIT;
|
m_pAmx->flags |= AMX_FLAG_PRENIT;
|
||||||
amx_Push(m_pAmx, isClass ? 1 : 0);
|
amx_Push(m_pAmx, isClass ? 1 : 0);
|
||||||
amx_PushString(m_pAmx, &hea_addr, &phys_addr, module, 0, 0);
|
amx_PushString(m_pAmx, &hea_addr, &phys_addr, module, 0, 0);
|
||||||
int err = amx_ExecPerf(m_pAmx, &retval, m_iModFunc);
|
int err = amx_Exec(m_pAmx, &retval, m_iModFunc);
|
||||||
amx_Release(m_pAmx, hea_addr);
|
amx_Release(m_pAmx, hea_addr);
|
||||||
m_pAmx->flags &= ~AMX_FLAG_PRENIT;
|
m_pAmx->flags &= ~AMX_FLAG_PRENIT;
|
||||||
|
|
||||||
@ -768,7 +768,7 @@ int Handler::HandleNative(const char *native, int index, int trap)
|
|||||||
amx_Push(m_pAmx, trap);
|
amx_Push(m_pAmx, trap);
|
||||||
amx_Push(m_pAmx, index);
|
amx_Push(m_pAmx, index);
|
||||||
amx_PushString(m_pAmx, &hea_addr, &phys_addr, native, 0, 0);
|
amx_PushString(m_pAmx, &hea_addr, &phys_addr, native, 0, 0);
|
||||||
int err = amx_ExecPerf(m_pAmx, &retval, m_iNatFunc);
|
int err = amx_Exec(m_pAmx, &retval, m_iNatFunc);
|
||||||
if (err != AMX_ERR_NONE)
|
if (err != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
//LogError() took care of something for us.
|
//LogError() took care of something for us.
|
||||||
@ -841,7 +841,7 @@ int Handler::HandleError(const char *msg)
|
|||||||
amx_PushString(m_pAmx, &hea_addr, &phys_addr, msg, 0, 0);
|
amx_PushString(m_pAmx, &hea_addr, &phys_addr, msg, 0, 0);
|
||||||
amx_Push(m_pAmx, pDebugger ? 1 : 0);
|
amx_Push(m_pAmx, pDebugger ? 1 : 0);
|
||||||
amx_Push(m_pAmx, error);
|
amx_Push(m_pAmx, error);
|
||||||
int err = amx_ExecPerf(m_pAmx, &result, m_iErrFunc);
|
int err = amx_Exec(m_pAmx, &result, m_iErrFunc);
|
||||||
if (err != AMX_ERR_NONE)
|
if (err != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
//handle this manually.
|
//handle this manually.
|
||||||
|
@ -88,15 +88,10 @@ void Client_TeamInfo(void* mValue)
|
|||||||
if (index < 1 || index > gpGlobals->maxClients) break;
|
if (index < 1 || index > gpGlobals->maxClients) break;
|
||||||
char* msg = (char*)mValue;
|
char* msg = (char*)mValue;
|
||||||
if (!msg) break;
|
if (!msg) break;
|
||||||
|
g_players[index].team = msg;
|
||||||
auto pPlayer = GET_PLAYER_POINTER_I(index);
|
|
||||||
|
|
||||||
pPlayer->team = msg;
|
|
||||||
g_teamsIds.registerTeam(msg, -1);
|
g_teamsIds.registerTeam(msg, -1);
|
||||||
pPlayer->teamId = g_teamsIds.findTeamId(msg);
|
g_players[index].teamId = g_teamsIds.findTeamId(msg);
|
||||||
|
|
||||||
if (pPlayer->teamId == -1)
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* CS fix for SPECTATOR team.
|
* CS fix for SPECTATOR team.
|
||||||
* -
|
* -
|
||||||
@ -104,30 +99,12 @@ void Client_TeamInfo(void* mValue)
|
|||||||
* This means for the first round of first spectator, SPECTATOR name is not associated with its index.
|
* This means for the first round of first spectator, SPECTATOR name is not associated with its index.
|
||||||
* The following fix manually sets the team index when we hit SPECTATOR team.
|
* The following fix manually sets the team index when we hit SPECTATOR team.
|
||||||
*/
|
*/
|
||||||
if (g_bmod_cstrike && !strcmp(msg, "SPECTATOR"))
|
if (g_players[index].teamId == -1 && g_bmod_cstrike && !strcmp(msg, "SPECTATOR"))
|
||||||
{
|
{
|
||||||
pPlayer->teamId = 3;
|
g_players[index].teamId = 3;
|
||||||
g_teamsIds.registerTeam(msg, 3);
|
g_teamsIds.registerTeam(msg, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fixes in-between situation where the team name is not yet associated with a valid index
|
|
||||||
* and ScoreInfo is executed later (used to retrieve the index). E.g. a player is dead,
|
|
||||||
* then changes team. Index will return -1 until ScoreInfo is sent, usually at the next spawn.
|
|
||||||
*/
|
|
||||||
else if ((g_bmod_cstrike || g_bmod_dod || g_bmod_tfc || g_bmod_gearbox || g_bmod_valve)
|
|
||||||
&& pPlayer->pEdict->pvPrivateData
|
|
||||||
&& !pPlayer->IsAlive())
|
|
||||||
{
|
|
||||||
GET_OFFSET_NO_ERROR("CBasePlayer", m_iTeam);
|
|
||||||
|
|
||||||
const auto teamId = get_pdata<int>(pPlayer->pEdict, m_iTeam);
|
|
||||||
|
|
||||||
pPlayer->teamId = teamId;
|
|
||||||
g_teamsIds.registerTeam(msg, teamId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,14 +96,12 @@ static cell AMX_NATIVE_CALL read_file(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
length = strlen(buffer);
|
length = strlen(buffer);
|
||||||
|
|
||||||
if (length > 0)
|
|
||||||
{
|
|
||||||
if (buffer[length - 1] == '\n')
|
if (buffer[length - 1] == '\n')
|
||||||
buffer[--length] = '\0';
|
buffer[--length] = '\0';
|
||||||
|
|
||||||
if (buffer[length - 1] == '\r')
|
if (buffer[length - 1] == '\r')
|
||||||
buffer[--length] = '\0';
|
buffer[--length] = '\0';
|
||||||
}
|
|
||||||
cell* textLen = get_amxaddr(amx, params[5]);
|
cell* textLen = get_amxaddr(amx, params[5]);
|
||||||
*textLen = set_amxstring_utf8(amx, params[3], buffer, length, params[4]);
|
*textLen = set_amxstring_utf8(amx, params[3], buffer, length, params[4]);
|
||||||
|
|
||||||
@ -758,7 +756,7 @@ struct DirectoryHandle
|
|||||||
bool valvefs;
|
bool valvefs;
|
||||||
};
|
};
|
||||||
|
|
||||||
// native open_dir(const dir[], firstfile[], length, &FileType:type = FileType_Unknown, bool:use_valve_fs=false, const valve_path_id[] = "GAME");
|
// native open_dir(dir[], firstfile[], length, &FileType:type = FileType_Unknown, bool:use_valve_fs=false, const valve_path_id[] = "GAME");
|
||||||
static cell AMX_NATIVE_CALL amx_open_dir(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL amx_open_dir(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
|
@ -135,14 +135,9 @@ cvar_t init_amxmodx_debug = {"amx_debug", "1", FCVAR_SPONLY};
|
|||||||
cvar_t init_amxmodx_mldebug = {"amx_mldebug", "", FCVAR_SPONLY};
|
cvar_t init_amxmodx_mldebug = {"amx_mldebug", "", FCVAR_SPONLY};
|
||||||
cvar_t init_amxmodx_language = {"amx_language", "en", FCVAR_SERVER};
|
cvar_t init_amxmodx_language = {"amx_language", "en", FCVAR_SERVER};
|
||||||
cvar_t init_amxmodx_cl_langs = {"amx_client_languages", "1", FCVAR_SERVER};
|
cvar_t init_amxmodx_cl_langs = {"amx_client_languages", "1", FCVAR_SERVER};
|
||||||
cvar_t init_amxmodx_perflog = { "amx_perflog_ms", "1.0", FCVAR_SPONLY };
|
|
||||||
|
|
||||||
cvar_t* amxmodx_version = NULL;
|
cvar_t* amxmodx_version = NULL;
|
||||||
cvar_t* amxmodx_modules = NULL;
|
cvar_t* amxmodx_modules = NULL;
|
||||||
cvar_t* amxmodx_debug = NULL;
|
|
||||||
cvar_t* amxmodx_language = NULL;
|
cvar_t* amxmodx_language = NULL;
|
||||||
cvar_t* amxmodx_perflog = NULL;
|
|
||||||
|
|
||||||
cvar_t* hostname = NULL;
|
cvar_t* hostname = NULL;
|
||||||
cvar_t* mp_timelimit = NULL;
|
cvar_t* mp_timelimit = NULL;
|
||||||
|
|
||||||
@ -779,15 +774,6 @@ void C_ServerDeactivate_Post()
|
|||||||
g_vault.clear();
|
g_vault.clear();
|
||||||
g_xvars.clear();
|
g_xvars.clear();
|
||||||
g_plugins.clear();
|
g_plugins.clear();
|
||||||
g_langMngr.Clear();
|
|
||||||
|
|
||||||
ArrayHandles.clear();
|
|
||||||
TrieHandles.clear();
|
|
||||||
TrieIterHandles.clear();
|
|
||||||
TrieSnapshotHandles.clear();
|
|
||||||
DataPackHandles.clear();
|
|
||||||
TextParsersHandles.clear();
|
|
||||||
GameConfigHandle.clear();
|
|
||||||
|
|
||||||
g_CvarManager.OnPluginUnloaded();
|
g_CvarManager.OnPluginUnloaded();
|
||||||
|
|
||||||
@ -1159,12 +1145,12 @@ void C_ClientCommand(edict_t *pEntity)
|
|||||||
if (item == MENU_BACK)
|
if (item == MENU_BACK)
|
||||||
{
|
{
|
||||||
if (pMenu->pageCallback >= 0)
|
if (pMenu->pageCallback >= 0)
|
||||||
executeForwards(pMenu->pageCallback, static_cast<cell>(pPlayer->index), static_cast<cell>(MENU_BACK), static_cast<cell>(menu));
|
executeForwards(pMenu->pageCallback, static_cast<cell>(pPlayer->index), static_cast<cell>(MENU_BACK));
|
||||||
|
|
||||||
pMenu->Display(pPlayer->index, pPlayer->page - 1);
|
pMenu->Display(pPlayer->index, pPlayer->page - 1);
|
||||||
} else if (item == MENU_MORE) {
|
} else if (item == MENU_MORE) {
|
||||||
if (pMenu->pageCallback >= 0)
|
if (pMenu->pageCallback >= 0)
|
||||||
executeForwards(pMenu->pageCallback, static_cast<cell>(pPlayer->index), static_cast<cell>(MENU_MORE), static_cast<cell>(menu));
|
executeForwards(pMenu->pageCallback, static_cast<cell>(pPlayer->index), static_cast<cell>(MENU_MORE));
|
||||||
|
|
||||||
pMenu->Display(pPlayer->index, pPlayer->page + 1);
|
pMenu->Display(pPlayer->index, pPlayer->page + 1);
|
||||||
} else {
|
} else {
|
||||||
@ -1632,12 +1618,9 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
|
|||||||
CVAR_REGISTER(&init_amxmodx_mldebug);
|
CVAR_REGISTER(&init_amxmodx_mldebug);
|
||||||
CVAR_REGISTER(&init_amxmodx_language);
|
CVAR_REGISTER(&init_amxmodx_language);
|
||||||
CVAR_REGISTER(&init_amxmodx_cl_langs);
|
CVAR_REGISTER(&init_amxmodx_cl_langs);
|
||||||
CVAR_REGISTER(&init_amxmodx_perflog);
|
|
||||||
|
|
||||||
amxmodx_version = CVAR_GET_POINTER(init_amxmodx_version.name);
|
amxmodx_version = CVAR_GET_POINTER(init_amxmodx_version.name);
|
||||||
amxmodx_debug = CVAR_GET_POINTER(init_amxmodx_debug.name);
|
|
||||||
amxmodx_language = CVAR_GET_POINTER(init_amxmodx_language.name);
|
amxmodx_language = CVAR_GET_POINTER(init_amxmodx_language.name);
|
||||||
amxmodx_perflog = CVAR_GET_POINTER(init_amxmodx_perflog.name);
|
|
||||||
|
|
||||||
REG_SVR_COMMAND("amxx", amx_command);
|
REG_SVR_COMMAND("amxx", amx_command);
|
||||||
|
|
||||||
@ -1747,14 +1730,6 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
|
|||||||
g_plugins.clear();
|
g_plugins.clear();
|
||||||
g_langMngr.Clear();
|
g_langMngr.Clear();
|
||||||
|
|
||||||
ArrayHandles.clear();
|
|
||||||
TrieHandles.clear();
|
|
||||||
TrieIterHandles.clear();
|
|
||||||
TrieSnapshotHandles.clear();
|
|
||||||
DataPackHandles.clear();
|
|
||||||
TextParsersHandles.clear();
|
|
||||||
GameConfigHandle.clear();
|
|
||||||
|
|
||||||
ClearMessages();
|
ClearMessages();
|
||||||
|
|
||||||
modules_callPluginsUnloaded();
|
modules_callPluginsUnloaded();
|
||||||
|
@ -187,7 +187,7 @@ int load_amxscript_internal(AMX *amx, void **program, const char *filename, char
|
|||||||
bool will_be_debugged = false;
|
bool will_be_debugged = false;
|
||||||
tagAMX_DBG *pDbg = NULL;
|
tagAMX_DBG *pDbg = NULL;
|
||||||
|
|
||||||
if ((int)amxmodx_debug->value == 2 || debug)
|
if ((int)CVAR_GET_FLOAT("amx_debug") >= 2 || debug)
|
||||||
{
|
{
|
||||||
if ((hdr->file_version < CUR_FILE_VERSION))
|
if ((hdr->file_version < CUR_FILE_VERSION))
|
||||||
{
|
{
|
||||||
@ -544,7 +544,7 @@ int set_amxnatives(AMX* amx, char error[128])
|
|||||||
|
|
||||||
if (amx_FindPublic(amx, "plugin_natives", &idx) == AMX_ERR_NONE)
|
if (amx_FindPublic(amx, "plugin_natives", &idx) == AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
if ((err = amx_ExecPerf(amx, &retval, idx)) != AMX_ERR_NONE)
|
if ((err = amx_Exec(amx, &retval, idx)) != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
Debugger::GenericMessage(amx, err);
|
Debugger::GenericMessage(amx, err);
|
||||||
AMXXLOG_Log("An error occurred in plugin_natives. This is dangerous!");
|
AMXXLOG_Log("An error occurred in plugin_natives. This is dangerous!");
|
||||||
|
@ -457,7 +457,6 @@ md -p JIT 2>NUL
|
|||||||
<None Include="..\..\plugins\include\cvars.inc" />
|
<None Include="..\..\plugins\include\cvars.inc" />
|
||||||
<None Include="..\..\plugins\include\datapack.inc" />
|
<None Include="..\..\plugins\include\datapack.inc" />
|
||||||
<None Include="..\..\plugins\include\gameconfig.inc" />
|
<None Include="..\..\plugins\include\gameconfig.inc" />
|
||||||
<None Include="..\..\plugins\include\newmenus.inc" />
|
|
||||||
<None Include="..\..\plugins\include\string_const.inc" />
|
<None Include="..\..\plugins\include\string_const.inc" />
|
||||||
<None Include="..\..\plugins\include\string_stocks.inc" />
|
<None Include="..\..\plugins\include\string_stocks.inc" />
|
||||||
<None Include="..\..\plugins\include\textparse_ini.inc" />
|
<None Include="..\..\plugins\include\textparse_ini.inc" />
|
||||||
|
@ -693,9 +693,6 @@
|
|||||||
<None Include="..\..\plugins\include\string_stocks.inc">
|
<None Include="..\..\plugins\include\string_stocks.inc">
|
||||||
<Filter>Pawn Includes</Filter>
|
<Filter>Pawn Includes</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\plugins\include\newmenus.inc">
|
|
||||||
<Filter>Pawn Includes</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Object Include="..\Jit\helpers-x86.obj">
|
<Object Include="..\Jit\helpers-x86.obj">
|
||||||
|
@ -112,7 +112,8 @@ int amxx_DynaCallback(int idx, AMX *amx, cell *params)
|
|||||||
pDebugger->BeginExec();
|
pDebugger->BeginExec();
|
||||||
}
|
}
|
||||||
|
|
||||||
err = amx_ExecPerf(pNative->amx, &ret, pNative->func);
|
err=amx_Exec(pNative->amx, &ret, pNative->func);
|
||||||
|
|
||||||
if (err != AMX_ERR_NONE)
|
if (err != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
if (pDebugger && pDebugger->ErrorExists())
|
if (pDebugger && pDebugger->ErrorExists())
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "amxmodx.h"
|
#include "amxmodx.h"
|
||||||
#include "CMenu.h"
|
#include "CMenu.h"
|
||||||
#include "newmenus.h"
|
#include "newmenus.h"
|
||||||
#include "format.h"
|
|
||||||
|
|
||||||
ke::Vector<Menu *> g_NewMenus;
|
ke::Vector<Menu *> g_NewMenus;
|
||||||
CStack<int> g_MenuFreeStack;
|
CStack<int> g_MenuFreeStack;
|
||||||
@ -91,9 +90,9 @@ bool CloseNewMenus(CPlayer *pPlayer)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu::Menu(const char *title, AMX *amx, int fid, bool use_ml) : m_Title(title), m_ItemColor("\\r"),
|
Menu::Menu(const char *title, AMX *amx, int fid) : m_Title(title), m_ItemColor("\\r"),
|
||||||
m_NeverExit(false), m_ForceExit(false), m_AutoColors(g_coloredmenus), thisId(0), func(fid),
|
m_NeverExit(false), m_AutoColors(g_coloredmenus), thisId(0), func(fid),
|
||||||
isDestroying(false), pageCallback(-1), showPageNumber(true), useMultilingual(use_ml), amx(amx), items_per_page(7)
|
isDestroying(false), pageCallback(-1), showPageNumber(true), items_per_page(7)
|
||||||
{
|
{
|
||||||
CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(amx);
|
CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(amx);
|
||||||
menuId = g_menucmds.registerMenuId(title, amx);
|
menuId = g_menucmds.registerMenuId(title, amx);
|
||||||
@ -357,32 +356,18 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
|
|
||||||
m_Text = nullptr;
|
m_Text = nullptr;
|
||||||
|
|
||||||
|
|
||||||
auto title = m_Title.chars();
|
|
||||||
|
|
||||||
if (this->useMultilingual)
|
|
||||||
{
|
|
||||||
const auto language = playerlang(player);
|
|
||||||
const auto definition = translate(this->amx, language, title);
|
|
||||||
|
|
||||||
if (definition)
|
|
||||||
{
|
|
||||||
title = definition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
char buffer[255];
|
char buffer[255];
|
||||||
if (showPageNumber && items_per_page && (pages != 1))
|
if (showPageNumber && items_per_page && (pages != 1))
|
||||||
{
|
{
|
||||||
if (m_AutoColors)
|
if (m_AutoColors)
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "\\y%s %d/%d\n\\w\n", title, page + 1, pages);
|
ke::SafeSprintf(buffer, sizeof(buffer), "\\y%s %d/%d\n\\w\n", m_Title.chars(), page + 1, pages);
|
||||||
else
|
else
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "%s %d/%d\n\n", title, page + 1, pages);
|
ke::SafeSprintf(buffer, sizeof(buffer), "%s %d/%d\n\n", m_Title.chars(), page + 1, pages);
|
||||||
} else {
|
} else {
|
||||||
if (m_AutoColors)
|
if (m_AutoColors)
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "\\y%s\n\\w\n", title);
|
ke::SafeSprintf(buffer, sizeof(buffer), "\\y%s\n\\w\n", m_Title.chars());
|
||||||
else
|
else
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "%s\n\n", title);
|
ke::SafeSprintf(buffer, sizeof(buffer), "%s\n\n", m_Title.chars());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Text = m_Text + buffer;
|
m_Text = m_Text + buffer;
|
||||||
@ -477,37 +462,24 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
option_display = 0;
|
option_display = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto itemName = pItem->name.chars();
|
|
||||||
|
|
||||||
if (this->useMultilingual)
|
|
||||||
{
|
|
||||||
const auto language = playerlang(player);
|
|
||||||
const auto definition = translate(this->amx, language, itemName);
|
|
||||||
|
|
||||||
if (definition)
|
|
||||||
{
|
|
||||||
itemName = definition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pItem->isBlank)
|
if (pItem->isBlank)
|
||||||
{
|
{
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "%s\n", itemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "%s\n", pItem->name.chars());
|
||||||
}
|
}
|
||||||
else if (enabled)
|
else if (enabled)
|
||||||
{
|
{
|
||||||
if (m_AutoColors)
|
if (m_AutoColors)
|
||||||
{
|
{
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "%s%d.\\w %s\n", m_ItemColor.chars(),option_display, itemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "%s%d.\\w %s\n", m_ItemColor.chars(),option_display, pItem->name.chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "%d. %s\n", option_display, itemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "%d. %s\n", option_display, pItem->name.chars());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_AutoColors)
|
if (m_AutoColors)
|
||||||
{
|
{
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "\\d%d. %s\n\\w", option_display, itemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "\\d%d. %s\n\\w", option_display, pItem->name.chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "#. %s\n", itemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "#. %s\n", pItem->name.chars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slots++;
|
slots++;
|
||||||
@ -544,20 +516,6 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
/* Don't bother if there is only one page */
|
/* Don't bother if there is only one page */
|
||||||
if (pages > 1)
|
if (pages > 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto tempItemName = m_OptNames[abs(MENU_BACK)].chars();
|
|
||||||
|
|
||||||
if (this->useMultilingual)
|
|
||||||
{
|
|
||||||
const auto language = playerlang(player);
|
|
||||||
const auto definition = translate(this->amx, language, tempItemName);
|
|
||||||
|
|
||||||
if (definition)
|
|
||||||
{
|
|
||||||
tempItemName = definition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flags & Display_Back)
|
if (flags & Display_Back)
|
||||||
{
|
{
|
||||||
keys |= (1<<option++);
|
keys |= (1<<option++);
|
||||||
@ -568,13 +526,13 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
"%s%d. \\w%s\n",
|
"%s%d. \\w%s\n",
|
||||||
m_ItemColor.chars(),
|
m_ItemColor.chars(),
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
tempItemName);
|
m_OptNames[abs(MENU_BACK)].chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer,
|
ke::SafeSprintf(buffer,
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"%d. %s\n",
|
"%d. %s\n",
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
tempItemName);
|
m_OptNames[abs(MENU_BACK)].chars());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
option++;
|
option++;
|
||||||
@ -584,26 +542,13 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"\\d%d. %s\n\\w",
|
"\\d%d. %s\n\\w",
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
tempItemName);
|
m_OptNames[abs(MENU_BACK)].chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "#. %s\n", tempItemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "#. %s\n", m_OptNames[abs(MENU_BACK)].chars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_Text = m_Text + buffer;
|
m_Text = m_Text + buffer;
|
||||||
|
|
||||||
tempItemName = m_OptNames[abs(MENU_MORE)].chars();
|
|
||||||
|
|
||||||
if (this->useMultilingual)
|
|
||||||
{
|
|
||||||
const auto language = playerlang(player);
|
|
||||||
const auto definition = translate(this->amx, language, tempItemName);
|
|
||||||
|
|
||||||
if (definition)
|
|
||||||
{
|
|
||||||
tempItemName = definition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flags & Display_Next)
|
if (flags & Display_Next)
|
||||||
{
|
{
|
||||||
keys |= (1<<option++);
|
keys |= (1<<option++);
|
||||||
@ -614,13 +559,13 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
"%s%d. \\w%s\n",
|
"%s%d. \\w%s\n",
|
||||||
m_ItemColor.chars(),
|
m_ItemColor.chars(),
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
tempItemName);
|
m_OptNames[abs(MENU_MORE)].chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer,
|
ke::SafeSprintf(buffer,
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"%d. %s\n",
|
"%d. %s\n",
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
tempItemName);
|
m_OptNames[abs(MENU_MORE)].chars());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
option++;
|
option++;
|
||||||
@ -630,9 +575,9 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"\\d%d. %s\n\\w",
|
"\\d%d. %s\n\\w",
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
tempItemName);
|
m_OptNames[abs(MENU_MORE)].chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer, sizeof(buffer), "#. %s\n", tempItemName);
|
ke::SafeSprintf(buffer, sizeof(buffer), "#. %s\n", m_OptNames[abs(MENU_MORE)].chars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_Text = m_Text + buffer;
|
m_Text = m_Text + buffer;
|
||||||
@ -644,19 +589,6 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
|
|
||||||
if ((items_per_page && !m_NeverExit) || (m_ForceExit && numItems < 10))
|
if ((items_per_page && !m_NeverExit) || (m_ForceExit && numItems < 10))
|
||||||
{
|
{
|
||||||
auto exitName = m_OptNames[abs(MENU_EXIT)].chars();
|
|
||||||
|
|
||||||
if (this->useMultilingual)
|
|
||||||
{
|
|
||||||
const auto language = playerlang(player);
|
|
||||||
const auto definition = translate(this->amx, language, exitName);
|
|
||||||
|
|
||||||
if (definition)
|
|
||||||
{
|
|
||||||
exitName = definition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Visual pad has not been added yet */
|
/* Visual pad has not been added yet */
|
||||||
if (!items_per_page)
|
if (!items_per_page)
|
||||||
m_Text = m_Text + "\n";
|
m_Text = m_Text + "\n";
|
||||||
@ -669,13 +601,13 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
"%s%d. \\w%s\n",
|
"%s%d. \\w%s\n",
|
||||||
m_ItemColor.chars(),
|
m_ItemColor.chars(),
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
exitName);
|
m_OptNames[abs(MENU_EXIT)].chars());
|
||||||
} else {
|
} else {
|
||||||
ke::SafeSprintf(buffer,
|
ke::SafeSprintf(buffer,
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"%d. %s\n",
|
"%d. %s\n",
|
||||||
option == 10 ? 0 : option,
|
option == 10 ? 0 : option,
|
||||||
exitName);
|
m_OptNames[abs(MENU_EXIT)].chars());
|
||||||
}
|
}
|
||||||
m_Text = m_Text + buffer;
|
m_Text = m_Text + buffer;
|
||||||
}
|
}
|
||||||
@ -688,45 +620,38 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid menu id %d(%d)", p, g_NewMenus.length()); \
|
LogError(amx, AMX_ERR_NATIVE, "Invalid menu id %d(%d)", p, g_NewMenus.length()); \
|
||||||
return 0; }
|
return 0; }
|
||||||
|
|
||||||
// native menu_create(const title[], const handler[], bool:ml = false);
|
//Makes a new menu handle (-1 for failure)
|
||||||
|
//native csdm_makemenu(title[]);
|
||||||
static cell AMX_NATIVE_CALL menu_create(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL menu_create(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
enum args { arg_count, arg_title, arg_handler, arg_ml };
|
int len;
|
||||||
|
char *title = get_amxstring(amx, params[1], 0, len);
|
||||||
|
validate_menu_text(title);
|
||||||
|
char *handler = get_amxstring(amx, params[2], 1, len);
|
||||||
|
|
||||||
int length;
|
int func = registerSPForwardByName(amx, handler, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
||||||
const auto title = get_amxstring(amx, params[arg_title], 0, length);
|
|
||||||
const auto handler = get_amxstring(amx, params[arg_handler], 1, length);
|
|
||||||
const auto callback = registerSPForwardByName(amx, handler, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
|
||||||
|
|
||||||
if (callback == -1)
|
if (func == -1)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NOTFOUND, R"(Invalid function "%s")", handler);
|
LogError(amx, AMX_ERR_NOTFOUND, "Invalid function \"%s\"", handler);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_menu_text(title);
|
Menu *pMenu = new Menu(title, amx, func);
|
||||||
|
|
||||||
auto pMenu = new Menu(title, amx, callback, params[arg_ml] != 0);
|
|
||||||
|
|
||||||
if (g_MenuFreeStack.empty())
|
if (g_MenuFreeStack.empty())
|
||||||
{
|
{
|
||||||
g_NewMenus.append(pMenu);
|
g_NewMenus.append(pMenu);
|
||||||
|
pMenu->thisId = (int)g_NewMenus.length() - 1;
|
||||||
pMenu->thisId = static_cast<int>(g_NewMenus.length()) - 1;
|
} else {
|
||||||
}
|
int pos = g_MenuFreeStack.front();
|
||||||
else
|
|
||||||
{
|
|
||||||
const auto position = g_MenuFreeStack.front();
|
|
||||||
|
|
||||||
g_MenuFreeStack.pop();
|
g_MenuFreeStack.pop();
|
||||||
g_NewMenus[position] = pMenu;
|
g_NewMenus[pos] = pMenu;
|
||||||
|
pMenu->thisId = pos;
|
||||||
pMenu->thisId = position;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pMenu->thisId;
|
return pMenu->thisId;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL menu_addblank(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL menu_addblank(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
GETMENU(params[1]);
|
GETMENU(params[1]);
|
||||||
@ -930,7 +855,7 @@ static cell AMX_NATIVE_CALL menu_display(AMX *amx, cell *params)
|
|||||||
time = params[4];
|
time = params[4];
|
||||||
|
|
||||||
if (time < 0)
|
if (time < 0)
|
||||||
pPlayer->menuexpire = static_cast<float>(INFINITE);
|
pPlayer->menuexpire = INFINITE;
|
||||||
else
|
else
|
||||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||||
|
|
||||||
@ -1046,20 +971,6 @@ static cell AMX_NATIVE_CALL menu_item_setcall(AMX *amx, cell *params)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL menu_item_setaccess(AMX *amx, cell *params)
|
|
||||||
{
|
|
||||||
GETMENU(params[1]);
|
|
||||||
|
|
||||||
menuitem *pItem = pMenu->GetMenuItem(static_cast<item_t>(params[2]));
|
|
||||||
|
|
||||||
if (!pItem)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
pItem->access = params[3];
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL menu_setprop(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL menu_setprop(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
GETMENU(params[1]);
|
GETMENU(params[1]);
|
||||||
@ -1083,7 +994,7 @@ static cell AMX_NATIVE_CALL menu_setprop(AMX *amx, cell *params)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int callback = registerSPForwardByName(amx, str, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
|
int callback = registerSPForwardByName(amx, str, FP_CELL, FP_CELL, FP_DONE);
|
||||||
if (callback < 0)
|
if (callback < 0)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Function %s not present", str);
|
LogError(amx, AMX_ERR_NATIVE, "Function %s not present", str);
|
||||||
@ -1291,7 +1202,6 @@ AMX_NATIVE_INFO g_NewMenuNatives[] =
|
|||||||
{"menu_item_getinfo", menu_item_getinfo},
|
{"menu_item_getinfo", menu_item_getinfo},
|
||||||
{"menu_makecallback", menu_makecallback},
|
{"menu_makecallback", menu_makecallback},
|
||||||
{"menu_item_setcall", menu_item_setcall},
|
{"menu_item_setcall", menu_item_setcall},
|
||||||
{"menu_item_setaccess", menu_item_setaccess},
|
|
||||||
{"menu_item_setcmd", menu_item_setcmd},
|
{"menu_item_setcmd", menu_item_setcmd},
|
||||||
{"menu_item_setname", menu_item_setname},
|
{"menu_item_setname", menu_item_setname},
|
||||||
{"menu_destroy", menu_destroy},
|
{"menu_destroy", menu_destroy},
|
||||||
|
@ -95,7 +95,7 @@ typedef unsigned int page_t;
|
|||||||
class Menu
|
class Menu
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Menu(const char *title, AMX *amx, int fid, bool use_ml);
|
Menu(const char *title, AMX *amx, int fid);
|
||||||
~Menu();
|
~Menu();
|
||||||
|
|
||||||
menuitem *GetMenuItem(item_t item);
|
menuitem *GetMenuItem(item_t item);
|
||||||
@ -127,8 +127,6 @@ public:
|
|||||||
bool isDestroying;
|
bool isDestroying;
|
||||||
int pageCallback;
|
int pageCallback;
|
||||||
bool showPageNumber;
|
bool showPageNumber;
|
||||||
bool useMultilingual;
|
|
||||||
AMX *amx;
|
|
||||||
public:
|
public:
|
||||||
unsigned int items_per_page;
|
unsigned int items_per_page;
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#include "amxmodx.h"
|
#include "amxmodx.h"
|
||||||
#include <amxmodx_version.h>
|
#include <amxmodx_version.h>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
void amx_command()
|
void amx_command()
|
||||||
{
|
{
|
||||||
@ -26,7 +25,7 @@ void amx_command()
|
|||||||
if (!strcmp(cmd, "plugins") || !strcmp(cmd, "list"))
|
if (!strcmp(cmd, "plugins") || !strcmp(cmd, "list"))
|
||||||
{
|
{
|
||||||
print_srvconsole("Currently loaded plugins:\n");
|
print_srvconsole("Currently loaded plugins:\n");
|
||||||
print_srvconsole(" %-3.2s %-23.22s %-11.10s %-17.16s %-32.31s %-12.11s %-9.8s\n", "id", "name", "version", "author", "url", "file", "status");
|
print_srvconsole(" %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", "name", "version", "author", "file", "status");
|
||||||
|
|
||||||
int plugins = 0;
|
int plugins = 0;
|
||||||
int running = 0;
|
int running = 0;
|
||||||
@ -41,7 +40,7 @@ void amx_command()
|
|||||||
if ((*a).isValid() && !(*a).isPaused())
|
if ((*a).isValid() && !(*a).isPaused())
|
||||||
++running;
|
++running;
|
||||||
|
|
||||||
print_srvconsole(" [%3d] %-3i %-23.22s %-11.10s %-17.16s %-32.31s %-12.11s %-9.8s\n", plugins, (*a).getId(), (*a).getTitle(), (*a).getVersion(), (*a).getAuthor(), (*a).getUrl(), (*a).getName(), (*a).getStatus());
|
print_srvconsole(" [%3d] %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", plugins, (*a).getTitle(), (*a).getVersion(), (*a).getAuthor(), (*a).getName(), (*a).getStatus());
|
||||||
}
|
}
|
||||||
++a;
|
++a;
|
||||||
}
|
}
|
||||||
@ -64,52 +63,6 @@ void amx_command()
|
|||||||
|
|
||||||
print_srvconsole("%d plugins, %d running\n", plugins, running);
|
print_srvconsole("%d plugins, %d running\n", plugins, running);
|
||||||
}
|
}
|
||||||
else if (!strcmp(cmd, "plugin"))
|
|
||||||
{
|
|
||||||
if (CMD_ARGC() < 3)
|
|
||||||
{
|
|
||||||
print_srvconsole("Usage: amxx plugin [ id ]\nFor a list of plugins, use the \"amxx plugins\" command\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char *pEnd;
|
|
||||||
auto id = strtol(CMD_ARGV(2), &pEnd, 10);
|
|
||||||
|
|
||||||
if (!pEnd)
|
|
||||||
{
|
|
||||||
print_srvconsole("Invalid plugin index %i.\n", id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto plugin = g_plugins.findPlugin(id);
|
|
||||||
|
|
||||||
if (plugin && plugin->isValid())
|
|
||||||
{
|
|
||||||
print_srvconsole(" Name: %s\n", plugin->getTitle());
|
|
||||||
print_srvconsole(" Version: %s\n", plugin->getVersion());
|
|
||||||
print_srvconsole(" Author: %s\n", plugin->getAuthor());
|
|
||||||
|
|
||||||
auto url = plugin->getUrl();
|
|
||||||
if (url[0])
|
|
||||||
{
|
|
||||||
print_srvconsole(" URL: %s\n", url);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto description = plugin->getDescription();
|
|
||||||
if (description[0])
|
|
||||||
{
|
|
||||||
print_srvconsole(" Description: %s\n", description);
|
|
||||||
}
|
|
||||||
|
|
||||||
print_srvconsole(" Filename: %s\n", plugin->getName());
|
|
||||||
print_srvconsole(" Status: %s\n", plugin->getStatus());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print_srvconsole("Plugin index %i not found.\n", id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!strcmp(cmd, "pause") && CMD_ARGC() > 2)
|
else if (!strcmp(cmd, "pause") && CMD_ARGC() > 2)
|
||||||
{
|
{
|
||||||
const char* sPlugin = CMD_ARGV(2);
|
const char* sPlugin = CMD_ARGV(2);
|
||||||
@ -291,7 +244,6 @@ void amx_command()
|
|||||||
print_srvconsole(" version - display amxx version info\n");
|
print_srvconsole(" version - display amxx version info\n");
|
||||||
print_srvconsole(" gpl - print the license\n");
|
print_srvconsole(" gpl - print the license\n");
|
||||||
print_srvconsole(" plugins [ criteria ] - list plugins currently loaded or ones matching given search criteria\n");
|
print_srvconsole(" plugins [ criteria ] - list plugins currently loaded or ones matching given search criteria\n");
|
||||||
print_srvconsole(" plugin [ id ] - information about a plugin\n");
|
|
||||||
print_srvconsole(" modules - list modules currently loaded\n");
|
print_srvconsole(" modules - list modules currently loaded\n");
|
||||||
print_srvconsole(" cvars [ plugin ] [ index ] - list cvars handled by amxx or show information about a cvar if index is provided\n");
|
print_srvconsole(" cvars [ plugin ] [ index ] - list cvars handled by amxx or show information about a cvar if index is provided\n");
|
||||||
print_srvconsole(" cmds [ plugin ] - list commands registered by plugins\n");
|
print_srvconsole(" cmds [ plugin ] - list commands registered by plugins\n");
|
||||||
|
@ -26,7 +26,7 @@ static cell AMX_NATIVE_CALL TrieClear(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
t->map.clear();
|
t->map.clear();
|
||||||
@ -40,7 +40,7 @@ static cell AMX_NATIVE_CALL TrieSetCell(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ static cell AMX_NATIVE_CALL TrieSetString(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ static cell AMX_NATIVE_CALL TrieSetArray(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ static cell AMX_NATIVE_CALL TrieGetCell(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ static cell AMX_NATIVE_CALL TrieGetString(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ static cell AMX_NATIVE_CALL TrieGetArray(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ static cell AMX_NATIVE_CALL TrieKeyExists(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ static cell AMX_NATIVE_CALL TrieDeleteKey(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ static cell AMX_NATIVE_CALL TrieGetSize(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,7 +386,7 @@ static cell AMX_NATIVE_CALL TrieSnapshotCreate(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ static cell AMX_NATIVE_CALL TrieIterCreate(AMX *amx, cell *params)
|
|||||||
|
|
||||||
if (!handle)
|
if (!handle)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[arg_handle]);
|
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[arg_handle]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
156
appveyor.yml
156
appveyor.yml
@ -1,126 +1,32 @@
|
|||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
|
clone_folder: c:\projects\amxmodx
|
||||||
environment:
|
install:
|
||||||
fast_finish: false
|
- git submodule update --init --recursive
|
||||||
allow_failures: true
|
- 'c:'
|
||||||
matrix:
|
- mkdir c:\nasm
|
||||||
- job_name: MacOS
|
- set PATH=c:\nasm\nasm-2.13.03;%PATH%
|
||||||
appveyor_build_worker_image: macos-mojave
|
- curl -L -o "c:\nasm\nasm.zip" https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
|
||||||
job_group: Build
|
- chdir c:\nasm
|
||||||
|
- 7z x nasm.zip
|
||||||
- job_name: Windows
|
- chdir c:\projects
|
||||||
appveyor_build_worker_image: Visual Studio 2015
|
- git clone https://github.com/alliedmodders/ambuild
|
||||||
job_group: Build
|
- git clone https://github.com/alliedmodders/metamod-hl1
|
||||||
|
- git clone https://github.com/alliedmodders/hlsdk
|
||||||
for:
|
- ps: Start-FileDownload 'https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-6.1.1-win32.zip'
|
||||||
-
|
- 7z x mysql-connector-c-6.1.1-win32.zip -o"mysql"
|
||||||
matrix:
|
- cd mysql
|
||||||
only:
|
- dir
|
||||||
- job_name: Windows
|
- ren mysql-connector-c-6.1.1-win32 mysql-5.5
|
||||||
|
- move /Y mysql-5.5 ..\
|
||||||
clone_folder: c:\projects\amxmodx
|
- cd ..\ambuild
|
||||||
install:
|
- c:\python27\python setup.py install
|
||||||
- cmd: >-
|
- cd ..\amxmodx
|
||||||
git submodule update --init --recursive
|
cache:
|
||||||
|
- c:\projects\*.zip -> appveyor.yml
|
||||||
c:
|
- c:\projects\mysql-5.5 -> appveyor.yml
|
||||||
|
build_script:
|
||||||
mkdir c:\nasm
|
- '"%VS140COMNTOOLS%\vsvars32.bat"'
|
||||||
|
- mkdir build
|
||||||
set PATH=c:\nasm\nasm-2.13.03;%PATH%
|
- cd build
|
||||||
|
- c:\python27\python ../configure.py --enable-optimize --nasm="C:\nasm\nasm-2.13.03\nasm.exe"
|
||||||
curl -L -o "c:\nasm\nasm.zip" https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
|
- c:\python27\scripts\ambuild
|
||||||
|
|
||||||
chdir c:\nasm
|
|
||||||
|
|
||||||
7z x nasm.zip
|
|
||||||
|
|
||||||
chdir c:\projects
|
|
||||||
|
|
||||||
git clone https://github.com/alliedmodders/ambuild
|
|
||||||
|
|
||||||
git clone https://github.com/alliedmodders/metamod-hl1
|
|
||||||
|
|
||||||
git clone https://github.com/alliedmodders/hlsdk
|
|
||||||
|
|
||||||
curl -L -o "mysql-connector-c-6.1.1-win32.zip" https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-6.1.1-win32.zip
|
|
||||||
|
|
||||||
7z x mysql-connector-c-6.1.1-win32.zip -o"mysql"
|
|
||||||
|
|
||||||
cd mysql
|
|
||||||
|
|
||||||
dir
|
|
||||||
|
|
||||||
ren mysql-connector-c-6.1.1-win32 mysql-5.5
|
|
||||||
|
|
||||||
move /Y mysql-5.5 ..\
|
|
||||||
|
|
||||||
cd ..\ambuild
|
|
||||||
|
|
||||||
c:\python38\python setup.py install
|
|
||||||
|
|
||||||
set PATH=C:\Python38;C:\Python38\Scripts;%PATH%
|
|
||||||
|
|
||||||
cd ..\amxmodx
|
|
||||||
|
|
||||||
# cache:
|
|
||||||
# - c:\projects\*.zip -> appveyor.yml
|
|
||||||
# - c:\projects\mysql-5.5 -> appveyor.yml
|
|
||||||
build_script:
|
|
||||||
- cmd: >-
|
|
||||||
"%VS140COMNTOOLS%\vsvars32.bat"
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
|
|
||||||
cd build
|
|
||||||
|
|
||||||
c:\python38\python ../configure.py --enable-optimize --nasm="C:\nasm\nasm-2.13.03\nasm.exe"
|
|
||||||
|
|
||||||
echo %PATH%
|
|
||||||
|
|
||||||
ambuild
|
|
||||||
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- job_name: MacOS
|
|
||||||
|
|
||||||
install:
|
|
||||||
- >-
|
|
||||||
git submodule update --init --recursive
|
|
||||||
|
|
||||||
mkdir -p $APPVEYOR_BUILD_FOLDER/deps
|
|
||||||
|
|
||||||
ls -alh
|
|
||||||
|
|
||||||
cd $APPVEYOR_BUILD_FOLDER/deps
|
|
||||||
|
|
||||||
mkdir -p amxmodx
|
|
||||||
|
|
||||||
../support/checkout-deps.sh
|
|
||||||
|
|
||||||
brew install nasm
|
|
||||||
|
|
||||||
nasm -v
|
|
||||||
|
|
||||||
export CC=clang
|
|
||||||
|
|
||||||
export CXX=clang++
|
|
||||||
|
|
||||||
clang --version
|
|
||||||
|
|
||||||
clang++ --version
|
|
||||||
|
|
||||||
cd $APPVEYOR_BUILD_FOLDER
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- >-
|
|
||||||
echo $PATH
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
|
|
||||||
cd build
|
|
||||||
|
|
||||||
python3 ../configure.py --enable-optimize --metamod=$APPVEYOR_BUILD_FOLDER/deps/metamod-am --hlsdk=$APPVEYOR_BUILD_FOLDER/deps/hlsdk --mysql=$APPVEYOR_BUILD_FOLDER/deps/mysql-5.5
|
|
||||||
|
|
||||||
ambuild
|
|
||||||
|
@ -359,7 +359,6 @@ void show_help()
|
|||||||
printf("\t-o<name> set base name of output file\n");
|
printf("\t-o<name> set base name of output file\n");
|
||||||
printf("\t-p<name> set name of \"prefix\" file\n");
|
printf("\t-p<name> set name of \"prefix\" file\n");
|
||||||
printf("\t-r[name] write cross reference report to console or to specified file\n");
|
printf("\t-r[name] write cross reference report to console or to specified file\n");
|
||||||
printf("\t-sui[+/-] show stack usage info\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
#if defined(__linux__) || defined(__APPLE__)
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#define CTRL_CHAR '^' /* default control character */
|
#define CTRL_CHAR '^' /* default control character */
|
||||||
#define sCHARBITS 8 /* size of a packed character */
|
#define sCHARBITS 8 /* size of a packed character */
|
||||||
|
|
||||||
#define sDIMEN_MAX 4 /* maximum number of array dimensions */
|
#define sDIMEN_MAX 3 /* maximum number of array dimensions */
|
||||||
#define sLINEMAX 4095 /* input line length (in characters) */
|
#define sLINEMAX 4095 /* input line length (in characters) */
|
||||||
#define sCOMP_STACK 32 /* maximum nesting of #if .. #endif sections */
|
#define sCOMP_STACK 32 /* maximum nesting of #if .. #endif sections */
|
||||||
#define sDEF_LITMAX 500 /* initial size of the literal pool, in "cells" */
|
#define sDEF_LITMAX 500 /* initial size of the literal pool, in "cells" */
|
||||||
@ -280,12 +280,6 @@ typedef struct s_stringpair {
|
|||||||
char *documentation;
|
char *documentation;
|
||||||
} stringpair;
|
} stringpair;
|
||||||
|
|
||||||
typedef struct s_valuepair {
|
|
||||||
struct s_valuepair *next;
|
|
||||||
long first;
|
|
||||||
long second;
|
|
||||||
} valuepair;
|
|
||||||
|
|
||||||
/* macros for code generation */
|
/* macros for code generation */
|
||||||
#define opcodes(n) ((n)*sizeof(cell)) /* opcode size */
|
#define opcodes(n) ((n)*sizeof(cell)) /* opcode size */
|
||||||
#define opargs(n) ((n)*sizeof(cell)) /* size of typical argument */
|
#define opargs(n) ((n)*sizeof(cell)) /* size of typical argument */
|
||||||
@ -706,9 +700,6 @@ SC_FUNC void delete_docstringtable(void);
|
|||||||
SC_FUNC stringlist *insert_autolist(char *string);
|
SC_FUNC stringlist *insert_autolist(char *string);
|
||||||
SC_FUNC char *get_autolist(int index);
|
SC_FUNC char *get_autolist(int index);
|
||||||
SC_FUNC void delete_autolisttable(void);
|
SC_FUNC void delete_autolisttable(void);
|
||||||
SC_FUNC valuepair *push_heaplist(long first, long second);
|
|
||||||
SC_FUNC int popfront_heaplist(long *first, long *second);
|
|
||||||
SC_FUNC void delete_heaplisttable(void);
|
|
||||||
SC_FUNC stringlist *insert_dbgfile(const char *filename);
|
SC_FUNC stringlist *insert_dbgfile(const char *filename);
|
||||||
SC_FUNC stringlist *insert_dbgline(int linenr);
|
SC_FUNC stringlist *insert_dbgline(int linenr);
|
||||||
SC_FUNC stringlist *insert_dbgsymbol(symbol *sym);
|
SC_FUNC stringlist *insert_dbgsymbol(symbol *sym);
|
||||||
@ -812,7 +803,6 @@ SC_VDECL int rational_digits; /* number of fractional digits */
|
|||||||
SC_VDECL int sc_allowproccall;/* allow/detect tagnames in lex() */
|
SC_VDECL int sc_allowproccall;/* allow/detect tagnames in lex() */
|
||||||
SC_VDECL char *pc_deprecate; /* if non-NULL, mark next declaration as deprecated */
|
SC_VDECL char *pc_deprecate; /* if non-NULL, mark next declaration as deprecated */
|
||||||
SC_VDECL int sc_warnings_are_errors;
|
SC_VDECL int sc_warnings_are_errors;
|
||||||
SC_VDECL int sc_stkusageinfo; /* show stack usage info? */
|
|
||||||
|
|
||||||
SC_VDECL constvalue sc_automaton_tab; /* automaton table */
|
SC_VDECL constvalue sc_automaton_tab; /* automaton table */
|
||||||
SC_VDECL constvalue sc_state_tab; /* state table */
|
SC_VDECL constvalue sc_state_tab; /* state table */
|
||||||
|
@ -628,7 +628,6 @@ int pc_compile(int argc, char *argv[])
|
|||||||
/* reset "defined" flag of all functions and global variables */
|
/* reset "defined" flag of all functions and global variables */
|
||||||
reduce_referrers(&glbtab);
|
reduce_referrers(&glbtab);
|
||||||
delete_symbols(&glbtab,0,TRUE,FALSE);
|
delete_symbols(&glbtab,0,TRUE,FALSE);
|
||||||
delete_heaplisttable();
|
|
||||||
#if !defined NO_DEFINE
|
#if !defined NO_DEFINE
|
||||||
delete_substtable();
|
delete_substtable();
|
||||||
inst_datetime_defines();
|
inst_datetime_defines();
|
||||||
@ -756,55 +755,14 @@ cleanup:
|
|||||||
|
|
||||||
#if !defined SC_LIGHT
|
#if !defined SC_LIGHT
|
||||||
if (errnum==0 && strlen(errfname)==0) {
|
if (errnum==0 && strlen(errfname)==0) {
|
||||||
int recursion = 0, flag_exceed = 0;
|
int flag_exceed=0;
|
||||||
long stacksize = 0L;
|
if (sc_amxlimit > 0 && (long)(hdrsize+code_idx+glb_declared*sizeof(cell)+sc_stksize*sizeof(cell)) >= sc_amxlimit)
|
||||||
unsigned long maxStackUsage = 0L;
|
flag_exceed=1;
|
||||||
unsigned long dynamicStackSizeLimit = (long)sc_stksize * sizeof(cell);
|
if ((sc_debug & sSYMBOLIC)!=0 || verbosity>=2 || flag_exceed) {
|
||||||
|
|
||||||
if (sc_amxlimit > 0) {
|
|
||||||
long totalsize = hdrsize + code_idx + glb_declared * sizeof(cell) + dynamicStackSizeLimit;
|
|
||||||
if (totalsize >= sc_amxlimit)
|
|
||||||
flag_exceed = 1;
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
/* if */
|
|
||||||
if(sc_stkusageinfo) {
|
|
||||||
stacksize = max_stacksize(&glbtab, &recursion);
|
|
||||||
maxStackUsage = stacksize * sizeof(cell);
|
|
||||||
|
|
||||||
if (recursion) {
|
|
||||||
pc_printf("Note: estimated max. usage: unknown, due to recursion\n");
|
|
||||||
} /* if */
|
|
||||||
else if (maxStackUsage >= dynamicStackSizeLimit) {
|
|
||||||
pc_printf("Note: estimated max. stack usage is %ld cells %ld bytes, limit %ld bytes\n", stacksize, maxStackUsage, dynamicStackSizeLimit);
|
|
||||||
}
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
/* if */
|
|
||||||
/* Note: Seems like `stacksize + 32 >= (long)sc_stksize` condition in original compiler invented to show stack usage warning if it's exceeded, that's why it's defined */
|
|
||||||
if ((sc_debug & sSYMBOLIC)!=0 || verbosity>=2 || /* stacksize + 32 >= (long)sc_stksize || */ flag_exceed) {
|
|
||||||
pc_printf("Header size: %8ld bytes\n", (long)hdrsize);
|
pc_printf("Header size: %8ld bytes\n", (long)hdrsize);
|
||||||
pc_printf("Code size: %8ld bytes\n", (long)code_idx);
|
pc_printf("Code size: %8ld bytes\n", (long)code_idx);
|
||||||
pc_printf("Data size: %8ld bytes\n", (long)glb_declared*sizeof(cell));
|
pc_printf("Data size: %8ld bytes\n", (long)glb_declared*sizeof(cell));
|
||||||
pc_printf("Stack/heap size: %8ld bytes", dynamicStackSizeLimit);
|
pc_printf("Stack/heap size: %8ld bytes\n", (long)sc_stksize*sizeof(cell));
|
||||||
|
|
||||||
if(sc_stkusageinfo) {
|
|
||||||
pc_printf(" | estimated max. usage");
|
|
||||||
|
|
||||||
/* if */
|
|
||||||
if (recursion) {
|
|
||||||
pc_printf(": unknown, due to recursion\n");
|
|
||||||
}
|
|
||||||
/* else if ((pc_memflags & suSLEEP_INSTR) != 0)
|
|
||||||
pc_printf(": unknown, due to the \"sleep\" instruction\n");*/
|
|
||||||
else {
|
|
||||||
pc_printf("=%ld cells (%ld bytes)\n", stacksize, maxStackUsage);
|
|
||||||
} /* if */
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
pc_printf("\n");
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
pc_printf("Total requirements:%8ld bytes\n", (long)hdrsize+(long)code_idx+(long)glb_declared*sizeof(cell)+(long)sc_stksize*sizeof(cell));
|
pc_printf("Total requirements:%8ld bytes\n", (long)hdrsize+(long)code_idx+(long)glb_declared*sizeof(cell)+(long)sc_stksize*sizeof(cell));
|
||||||
} /* if */
|
} /* if */
|
||||||
if (flag_exceed)
|
if (flag_exceed)
|
||||||
@ -847,7 +805,6 @@ cleanup:
|
|||||||
free(sc_documentation);
|
free(sc_documentation);
|
||||||
#endif
|
#endif
|
||||||
delete_autolisttable();
|
delete_autolisttable();
|
||||||
delete_heaplisttable();
|
|
||||||
if (errnum!=0) {
|
if (errnum!=0) {
|
||||||
if (strlen(errfname)==0)
|
if (strlen(errfname)==0)
|
||||||
pc_printf("\n%d Error%s.\n",errnum,(errnum>1) ? "s" : "");
|
pc_printf("\n%d Error%s.\n",errnum,(errnum>1) ? "s" : "");
|
||||||
@ -1003,8 +960,6 @@ static void initglobals(void)
|
|||||||
sc_documentation=NULL;
|
sc_documentation=NULL;
|
||||||
sc_makereport=FALSE; /* do not generate a cross-reference report */
|
sc_makereport=FALSE; /* do not generate a cross-reference report */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sc_stkusageinfo=FALSE;/* stack usage info disabled by default */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set_extension
|
/* set_extension
|
||||||
@ -1067,8 +1022,6 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam
|
|||||||
const char *ptr;
|
const char *ptr;
|
||||||
int arg,i,isoption;
|
int arg,i,isoption;
|
||||||
|
|
||||||
static const char stackusageinfo[4] = { 's', 'u', 'i', '\0' };
|
|
||||||
|
|
||||||
for (arg=1; arg<argc; arg++) {
|
for (arg=1; arg<argc; arg++) {
|
||||||
#if DIRSEP_CHAR=='/'
|
#if DIRSEP_CHAR=='/'
|
||||||
isoption= argv[arg][0]=='-';
|
isoption= argv[arg][0]=='-';
|
||||||
@ -1197,18 +1150,9 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam
|
|||||||
else
|
else
|
||||||
about();
|
about();
|
||||||
break;
|
break;
|
||||||
case 's': {
|
case 's':
|
||||||
if(strlen(ptr) >= (sizeof(stackusageinfo) - 1)) {
|
|
||||||
if(*(ptr+1) == stackusageinfo[1] && *(ptr+2) == stackusageinfo[2]) {
|
|
||||||
ptr += 2;
|
|
||||||
sc_stkusageinfo = toggle_option(ptr, sc_stkusageinfo);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
skipinput=atoi(option_value(ptr));
|
skipinput=atoi(option_value(ptr));
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 't':
|
case 't':
|
||||||
i=atoi(option_value(ptr));
|
i=atoi(option_value(ptr));
|
||||||
if (i>0)
|
if (i>0)
|
||||||
@ -1488,7 +1432,6 @@ static void about(void)
|
|||||||
#endif
|
#endif
|
||||||
pc_printf(" -S<num> stack/heap size in cells (default=%d)\n",(int)sc_stksize);
|
pc_printf(" -S<num> stack/heap size in cells (default=%d)\n",(int)sc_stksize);
|
||||||
pc_printf(" -s<num> skip lines from the input file\n");
|
pc_printf(" -s<num> skip lines from the input file\n");
|
||||||
pc_printf(" -sui[+/-] show stack usage info\n");
|
|
||||||
pc_printf(" -t<num> TAB indent size (in character positions, default=%d)\n",sc_tabsize);
|
pc_printf(" -t<num> TAB indent size (in character positions, default=%d)\n",sc_tabsize);
|
||||||
pc_printf(" -v<num> verbosity level; 0=quiet, 1=normal, 2=verbose (default=%d)\n",verbosity);
|
pc_printf(" -v<num> verbosity level; 0=quiet, 1=normal, 2=verbose (default=%d)\n",verbosity);
|
||||||
pc_printf(" -w<num> disable a specific warning by its number\n");
|
pc_printf(" -w<num> disable a specific warning by its number\n");
|
||||||
@ -2227,24 +2170,26 @@ static cell calc_arraysize(int dim[],int numdim,int cur)
|
|||||||
return dim[cur]+(dim[cur]*calc_arraysize(dim,numdim,cur+1));
|
return dim[cur]+(dim[cur]*calc_arraysize(dim,numdim,cur+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void adjust_indirectiontables(int dim[],int numdim,int startlit,
|
static cell adjust_indirectiontables(int dim[],int numdim,int cur,cell increment,
|
||||||
constvalue *lastdim,int *skipdim)
|
int startlit,constvalue *lastdim,int *skipdim)
|
||||||
{
|
{
|
||||||
static int base;
|
static int base;
|
||||||
int cur;
|
int d;
|
||||||
int i,d;
|
|
||||||
cell accum;
|
cell accum;
|
||||||
cell size;
|
|
||||||
|
|
||||||
assert(startlit==-1 || startlit>=0 && startlit<=litidx);
|
assert(cur>=0 && cur<numdim);
|
||||||
|
assert(increment>=0);
|
||||||
|
assert(cur>0 && startlit==-1 || startlit>=0 && startlit<=litidx);
|
||||||
|
if (cur==0)
|
||||||
base=startlit;
|
base=startlit;
|
||||||
size=1;
|
if (cur==numdim-1)
|
||||||
for (cur=0; cur<numdim-1; cur++) {
|
return 0;
|
||||||
/* 2 or more dimensions left, fill in an indirection vector */
|
/* 2 or more dimensions left, fill in an indirection vector */
|
||||||
|
assert(dim[cur]>0);
|
||||||
if (dim[cur+1]>0) {
|
if (dim[cur+1]>0) {
|
||||||
for (i=0; i<size; i++)
|
|
||||||
for (d=0; d<dim[cur]; d++)
|
for (d=0; d<dim[cur]; d++)
|
||||||
litq[base++]=(size*dim[cur]+(dim[cur+1]-1)*(dim[cur]*i+d)) * sizeof(cell);
|
litq[base++]=(dim[cur]+d*(dim[cur+1]-1)+increment) * sizeof(cell);
|
||||||
|
accum=dim[cur]*(dim[cur+1]-1);
|
||||||
} else {
|
} else {
|
||||||
/* final dimension is variable length */
|
/* final dimension is variable length */
|
||||||
constvalue *ld;
|
constvalue *ld;
|
||||||
@ -2252,7 +2197,6 @@ static int base;
|
|||||||
assert(lastdim!=NULL);
|
assert(lastdim!=NULL);
|
||||||
assert(skipdim!=NULL);
|
assert(skipdim!=NULL);
|
||||||
accum=0;
|
accum=0;
|
||||||
for (i=0; i<size; i++) {
|
|
||||||
/* skip the final dimension sizes for all earlier major dimensions */
|
/* skip the final dimension sizes for all earlier major dimensions */
|
||||||
for (d=0,ld=lastdim->next; d<*skipdim; d++,ld=ld->next) {
|
for (d=0,ld=lastdim->next; d<*skipdim; d++,ld=ld->next) {
|
||||||
assert(ld!=NULL);
|
assert(ld!=NULL);
|
||||||
@ -2260,15 +2204,19 @@ static int base;
|
|||||||
for (d=0; d<dim[cur]; d++) {
|
for (d=0; d<dim[cur]; d++) {
|
||||||
assert(ld!=NULL);
|
assert(ld!=NULL);
|
||||||
assert(strtol(ld->name,NULL,16)==d);
|
assert(strtol(ld->name,NULL,16)==d);
|
||||||
litq[base++]=(size*dim[cur]+accum) * sizeof(cell);
|
litq[base++]=(dim[cur]+accum+increment) * sizeof(cell);
|
||||||
accum+=ld->value-1;
|
accum+=ld->value-1;
|
||||||
*skipdim+=1;
|
*skipdim+=1;
|
||||||
ld=ld->next;
|
ld=ld->next;
|
||||||
} /* for */
|
} /* for */
|
||||||
} /* for */
|
|
||||||
} /* if */
|
} /* if */
|
||||||
size*=dim[cur];
|
/* create the indirection tables for the lower level */
|
||||||
} /* for */
|
if (cur+2<numdim) { /* are there at least 2 dimensions below this one? */
|
||||||
|
increment+=(dim[cur]-1)*dim[cur+1]; /* this many indirection tables follow */
|
||||||
|
for (d=0; d<dim[cur]; d++)
|
||||||
|
increment+=adjust_indirectiontables(dim,numdim,cur+1,increment,-1,lastdim,skipdim);
|
||||||
|
} /* if */
|
||||||
|
return accum;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initials
|
/* initials
|
||||||
@ -2326,7 +2274,7 @@ static void initials2(int ident,int tag,cell *size,int dim[],int numdim,
|
|||||||
for (tablesize=calc_arraysize(dim,numdim-1,0); tablesize>0; tablesize--)
|
for (tablesize=calc_arraysize(dim,numdim-1,0); tablesize>0; tablesize--)
|
||||||
litadd(0);
|
litadd(0);
|
||||||
if (dim[numdim-1]!=0) /* error 9 has already been given */
|
if (dim[numdim-1]!=0) /* error 9 has already been given */
|
||||||
adjust_indirectiontables(dim,numdim,curlit,NULL,NULL);
|
adjust_indirectiontables(dim,numdim,0,0,curlit,NULL,NULL);
|
||||||
} /* if */
|
} /* if */
|
||||||
return;
|
return;
|
||||||
} /* if */
|
} /* if */
|
||||||
@ -2392,7 +2340,7 @@ static void initials2(int ident,int tag,cell *size,int dim[],int numdim,
|
|||||||
* of the array and we can properly adjust the indirection vectors
|
* of the array and we can properly adjust the indirection vectors
|
||||||
*/
|
*/
|
||||||
if (err==0)
|
if (err==0)
|
||||||
adjust_indirectiontables(dim,numdim,curlit,&lastdim,&skipdim);
|
adjust_indirectiontables(dim,numdim,0,0,curlit,&lastdim,&skipdim);
|
||||||
delete_consttable(&lastdim); /* clear list of minor dimension sizes */
|
delete_consttable(&lastdim); /* clear list of minor dimension sizes */
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* if */
|
} /* if */
|
||||||
@ -5507,16 +5455,6 @@ static void doreturn(void)
|
|||||||
/* nothing */;
|
/* nothing */;
|
||||||
sub=addvariable(curfunc->name,(argcount+3)*sizeof(cell),iREFARRAY,sGLOBAL,curfunc->tag,dim,numdim,idxtag);
|
sub=addvariable(curfunc->name,(argcount+3)*sizeof(cell),iREFARRAY,sGLOBAL,curfunc->tag,dim,numdim,idxtag);
|
||||||
sub->parent=curfunc;
|
sub->parent=curfunc;
|
||||||
/* Function that returns array can be used before it is defined, so at
|
|
||||||
* the call point (if it is before definition) we may not know if this
|
|
||||||
* function returns array and what is its size (for example inside the
|
|
||||||
* conditional operator), so we don't know how many cells on the heap
|
|
||||||
* we need. Calculating heap consumption is required for the fix of
|
|
||||||
* incorrect heap deallocation on conditional operator. That's why we
|
|
||||||
* need an additional pass.
|
|
||||||
*/
|
|
||||||
if ((curfunc->usage & uREAD)!=0)
|
|
||||||
sc_reparse=TRUE;
|
|
||||||
} /* if */
|
} /* if */
|
||||||
/* get the hidden parameter, copy the array (the array is on the heap;
|
/* get the hidden parameter, copy the array (the array is on the heap;
|
||||||
* it stays on the heap for the moment, and it is removed -usually- at
|
* it stays on the heap for the moment, and it is removed -usually- at
|
||||||
@ -5789,137 +5727,3 @@ static int *readwhile(void)
|
|||||||
return (wqptr-wqSIZE);
|
return (wqptr-wqSIZE);
|
||||||
} /* if */
|
} /* if */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined SC_LIGHT
|
|
||||||
static long max_stacksize_recurse(symbol** sourcesym, symbol* sym, symbol** rsourcesym, long basesize, int* pubfuncparams, int* recursion)
|
|
||||||
{
|
|
||||||
long size, maxsize;
|
|
||||||
int i, stkpos;
|
|
||||||
|
|
||||||
assert(sourcesym != NULL);
|
|
||||||
assert(sym != NULL);
|
|
||||||
assert(sym->ident == iFUNCTN);
|
|
||||||
assert((sym->usage & uNATIVE) == 0);
|
|
||||||
assert(recursion != NULL);
|
|
||||||
|
|
||||||
maxsize = sym->x.stacksize;
|
|
||||||
for (i = 0; i < sym->numrefers; i++) {
|
|
||||||
if (sym->refer[i] != NULL) {
|
|
||||||
assert(sym->refer[i]->ident == iFUNCTN);
|
|
||||||
assert((sym->refer[i]->usage & uNATIVE) == 0); /* a native function cannot refer to a user-function */
|
|
||||||
*(rsourcesym) = sym;
|
|
||||||
*(rsourcesym + 1) = NULL;
|
|
||||||
for (stkpos = 0; sourcesym[stkpos] != NULL; stkpos++) {
|
|
||||||
if (sym->refer[i] == sourcesym[stkpos]) { /* recursion detection */
|
|
||||||
*recursion = 1;
|
|
||||||
goto break_recursion; /* recursion was detected, quit loop */
|
|
||||||
} /* if */
|
|
||||||
} /* for */
|
|
||||||
/* add this symbol to the stack */
|
|
||||||
sourcesym[stkpos] = sym;
|
|
||||||
sourcesym[stkpos + 1] = NULL;
|
|
||||||
/* check size of callee */
|
|
||||||
size = max_stacksize_recurse(sourcesym, sym->refer[i], rsourcesym + 1, sym->x.stacksize, pubfuncparams, recursion);
|
|
||||||
if (maxsize < size)
|
|
||||||
maxsize = size;
|
|
||||||
/* remove this symbol from the stack */
|
|
||||||
sourcesym[stkpos] = NULL;
|
|
||||||
} /* if */
|
|
||||||
} /* for */
|
|
||||||
break_recursion:
|
|
||||||
|
|
||||||
if ((sym->usage & uPUBLIC) != 0) {
|
|
||||||
/* Find out how many parameters a public function has, then see if this
|
|
||||||
* is bigger than some maximum
|
|
||||||
*/
|
|
||||||
arginfo* arg = sym->dim.arglist;
|
|
||||||
int count = 0;
|
|
||||||
assert(arg != 0);
|
|
||||||
while (arg->ident != 0) {
|
|
||||||
count++;
|
|
||||||
arg++;
|
|
||||||
} /* while */
|
|
||||||
assert(pubfuncparams != 0);
|
|
||||||
if (count > * pubfuncparams)
|
|
||||||
*pubfuncparams = count;
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
return maxsize + basesize;
|
|
||||||
}
|
|
||||||
|
|
||||||
static long max_stacksize(symbol* root, int* recursion)
|
|
||||||
{
|
|
||||||
/* Loop over all non-native functions. For each function, loop
|
|
||||||
* over all of its referrers, accumulating the stack requirements.
|
|
||||||
* Detect (indirect) recursion with a "mark-and-sweep" algorithm.
|
|
||||||
* I (mis-)use the "compound" field of the symbol structure for
|
|
||||||
* the marker, as this field is unused for functions.
|
|
||||||
*
|
|
||||||
* Note that the stack is shared with the heap. A host application
|
|
||||||
* may "eat" cells from the heap as well, through amx_Allot(). The
|
|
||||||
* stack requirements are thus only an estimate.
|
|
||||||
*/
|
|
||||||
long size, maxsize;
|
|
||||||
int maxparams, numfunctions;
|
|
||||||
symbol* sym;
|
|
||||||
symbol** symstack, ** rsymstack;
|
|
||||||
|
|
||||||
assert(root != NULL);
|
|
||||||
assert(recursion != NULL);
|
|
||||||
/* count number of functions (for allocating the stack for recursion detection) */
|
|
||||||
numfunctions = 0;
|
|
||||||
for (sym = root->next; sym != NULL; sym = sym->next) {
|
|
||||||
if (sym->ident == iFUNCTN) {
|
|
||||||
assert(sym->compound == 0);
|
|
||||||
if ((sym->usage & uNATIVE) == 0)
|
|
||||||
numfunctions++;
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
|
||||||
/* allocate function symbol stack */
|
|
||||||
symstack = (symbol**)malloc((numfunctions + 1) * sizeof(symbol*));
|
|
||||||
rsymstack = (symbol**)malloc((numfunctions + 1) * sizeof(symbol*));
|
|
||||||
if (symstack == NULL || rsymstack == NULL)
|
|
||||||
error(103); /* insufficient memory (fatal error) */
|
|
||||||
memset(symstack, 0, (numfunctions + 1) * sizeof(symbol*));
|
|
||||||
memset(rsymstack, 0, (numfunctions + 1) * sizeof(symbol*));
|
|
||||||
|
|
||||||
maxsize = 0;
|
|
||||||
maxparams = 0;
|
|
||||||
*recursion = 0; /* assume no recursion */
|
|
||||||
for (sym = root->next; sym != NULL; sym = sym->next) {
|
|
||||||
int recursion_detected;
|
|
||||||
/* drop out if this is not a user-implemented function */
|
|
||||||
if (sym->ident != iFUNCTN || (sym->usage & uNATIVE) != 0)
|
|
||||||
continue;
|
|
||||||
/* accumulate stack size for this symbol */
|
|
||||||
symstack[0] = sym;
|
|
||||||
assert(symstack[1] == NULL);
|
|
||||||
recursion_detected = 0;
|
|
||||||
size = max_stacksize_recurse(symstack, sym, rsymstack, 0L, &maxparams, &recursion_detected);
|
|
||||||
if (recursion_detected) {
|
|
||||||
if (rsymstack[1] == NULL) {
|
|
||||||
pc_printf("recursion detected: function %s directly calls itself\n", sym->name);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
int i;
|
|
||||||
pc_printf("recursion detected: function %s indirectly calls itself:\n", sym->name);
|
|
||||||
pc_printf("%s ", sym->name);
|
|
||||||
for (i = 1; rsymstack[i] != NULL; i++) {
|
|
||||||
pc_printf("<- %s ", rsymstack[i]->name);
|
|
||||||
}
|
|
||||||
pc_printf("<- %s\n", sym->name);
|
|
||||||
}
|
|
||||||
*recursion = recursion_detected;
|
|
||||||
}
|
|
||||||
assert(size >= 0);
|
|
||||||
if (maxsize < size)
|
|
||||||
maxsize = size;
|
|
||||||
} /* for */
|
|
||||||
|
|
||||||
free((void*)symstack);
|
|
||||||
free((void*)rsymstack);
|
|
||||||
maxsize++; /* +1 because a zero cell is always pushed on top
|
|
||||||
* of the stack to catch stack overwrites */
|
|
||||||
return maxsize + (maxparams + 1);/* +1 because # of parameters is always pushed on entry */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@ -1190,8 +1190,6 @@ static int command(void)
|
|||||||
if (comma)
|
if (comma)
|
||||||
lptr++;
|
lptr++;
|
||||||
} while (comma);
|
} while (comma);
|
||||||
} else if (strcmp(str, "showstackusageinfo")==0) {
|
|
||||||
sc_stkusageinfo=TRUE;
|
|
||||||
} else {
|
} else {
|
||||||
error(207); /* unknown #pragma */
|
error(207); /* unknown #pragma */
|
||||||
} /* if */
|
} /* if */
|
||||||
|
63
compiler/libpc300/sc3.c
Normal file → Executable file
63
compiler/libpc300/sc3.c
Normal file → Executable file
@ -1010,60 +1010,38 @@ static int hier13(value *lval)
|
|||||||
{
|
{
|
||||||
int lvalue=plnge1(hier12,lval);
|
int lvalue=plnge1(hier12,lval);
|
||||||
if (matchtoken('?')) {
|
if (matchtoken('?')) {
|
||||||
int locheap=decl_heap; /* save current heap delta */
|
|
||||||
long heap1,heap2; /* max. heap delta either branch */
|
|
||||||
valuepair *heaplist_node;
|
|
||||||
int flab1=getlabel();
|
int flab1=getlabel();
|
||||||
int flab2=getlabel();
|
int flab2=getlabel();
|
||||||
value lval2 = {0};
|
value lval2 = {0};
|
||||||
int array1,array2;
|
int array1,array2;
|
||||||
|
|
||||||
|
int orig_heap=decl_heap;
|
||||||
|
int diff1=0,diff2=0;
|
||||||
if (lvalue) {
|
if (lvalue) {
|
||||||
rvalue(lval);
|
rvalue(lval);
|
||||||
} else if (lval->ident==iCONSTEXPR) {
|
} else if (lval->ident==iCONSTEXPR) {
|
||||||
ldconst(lval->constval,sPRI);
|
ldconst(lval->constval,sPRI);
|
||||||
error(lval->constval ? 206 : 205); /* redundant test */
|
error(lval->constval ? 206 : 205); /* redundant test */
|
||||||
} /* if */
|
} /* if */
|
||||||
if (sc_status==statFIRST) {
|
|
||||||
/* We should push a new node right now otherwise we will pop it in the
|
|
||||||
* wrong order on the write stage.
|
|
||||||
*/
|
|
||||||
heaplist_node=push_heaplist(0,0); /* save the pointer to write the actual data later */
|
|
||||||
} else if (sc_status==statWRITE || sc_status==statSKIP) {
|
|
||||||
#if !defined NDEBUG
|
|
||||||
int result=
|
|
||||||
#endif
|
|
||||||
popfront_heaplist(&heap1,&heap2);
|
|
||||||
assert(result); /* pop off equally many items than were pushed */
|
|
||||||
} /* if */
|
|
||||||
jmp_eq0(flab1); /* go to second expression if primary register==0 */
|
jmp_eq0(flab1); /* go to second expression if primary register==0 */
|
||||||
PUSHSTK_I(sc_allowtags);
|
PUSHSTK_I(sc_allowtags);
|
||||||
sc_allowtags=FALSE; /* do not allow tagnames here (colon is a special token) */
|
sc_allowtags=FALSE; /* do not allow tagnames here (colon is a special token) */
|
||||||
if (sc_status==statWRITE) {
|
|
||||||
modheap(heap1*sizeof(cell));
|
|
||||||
decl_heap+=heap1; /* equilibrate the heap (see comment below) */
|
|
||||||
} /* if */
|
|
||||||
if (hier13(lval))
|
if (hier13(lval))
|
||||||
rvalue(lval);
|
rvalue(lval);
|
||||||
if (lval->ident==iCONSTEXPR) /* load constant here */
|
if (lval->ident==iCONSTEXPR) /* load constant here */
|
||||||
ldconst(lval->constval,sPRI);
|
ldconst(lval->constval,sPRI);
|
||||||
sc_allowtags=(short)POPSTK_I(); /* restore */
|
sc_allowtags=(short)POPSTK_I(); /* restore */
|
||||||
heap1=decl_heap-locheap; /* save heap space used in "true" branch */
|
|
||||||
assert(heap1>=0);
|
|
||||||
decl_heap=locheap; /* restore heap delta */
|
|
||||||
jumplabel(flab2);
|
jumplabel(flab2);
|
||||||
setlabel(flab1);
|
setlabel(flab1);
|
||||||
|
if (orig_heap!=decl_heap) {
|
||||||
|
diff1=abs(decl_heap-orig_heap);
|
||||||
|
decl_heap=orig_heap;
|
||||||
|
}
|
||||||
needtoken(':');
|
needtoken(':');
|
||||||
if (sc_status==statWRITE) {
|
|
||||||
modheap(heap2*sizeof(cell));
|
|
||||||
decl_heap+=heap2; /* equilibrate the heap (see comment below) */
|
|
||||||
} /* if */
|
|
||||||
if (hier13(&lval2))
|
if (hier13(&lval2))
|
||||||
rvalue(&lval2);
|
rvalue(&lval2);
|
||||||
if (lval2.ident==iCONSTEXPR) /* load constant here */
|
if (lval2.ident==iCONSTEXPR) /* load constant here */
|
||||||
ldconst(lval2.constval,sPRI);
|
ldconst(lval2.constval,sPRI);
|
||||||
heap2=decl_heap-locheap; /* save heap space used in "false" branch */
|
|
||||||
assert(heap2>=0);
|
|
||||||
array1= (lval->ident==iARRAY || lval->ident==iREFARRAY);
|
array1= (lval->ident==iARRAY || lval->ident==iREFARRAY);
|
||||||
array2= (lval2.ident==iARRAY || lval2.ident==iREFARRAY);
|
array2= (lval2.ident==iARRAY || lval2.ident==iREFARRAY);
|
||||||
if (array1 && !array2) {
|
if (array1 && !array2) {
|
||||||
@ -1077,26 +1055,19 @@ static int hier13(value *lval)
|
|||||||
if (!matchtag(lval->tag,lval2.tag,FALSE))
|
if (!matchtag(lval->tag,lval2.tag,FALSE))
|
||||||
error(213); /* tagname mismatch ('true' and 'false' expressions) */
|
error(213); /* tagname mismatch ('true' and 'false' expressions) */
|
||||||
setlabel(flab2);
|
setlabel(flab2);
|
||||||
if (sc_status==statFIRST) {
|
|
||||||
/* Calculate the max. heap space used by either branch and save values of
|
|
||||||
* max - heap1 and max - heap2. On the second pass, we use these values
|
|
||||||
* to equilibrate the heap space used by either branch. This is needed
|
|
||||||
* because we don't know (at compile time) which branch will be taken,
|
|
||||||
* but the heap cannot be restored inside each branch because the result
|
|
||||||
* on the heap may needed by the remaining expression.
|
|
||||||
*/
|
|
||||||
int max=(heap1>heap2) ? heap1 : heap2;
|
|
||||||
heaplist_node->first=max-heap1;
|
|
||||||
heaplist_node->second=max-heap2;
|
|
||||||
decl_heap=locheap+max; /* otherwise it will contain locheap+heap2 and the
|
|
||||||
* max. heap usage will be wrong for the upper
|
|
||||||
* expression */
|
|
||||||
} /* if */
|
|
||||||
assert(sc_status!=statWRITE || heap1==heap2);
|
|
||||||
if (lval->ident==iARRAY)
|
if (lval->ident==iARRAY)
|
||||||
lval->ident=iREFARRAY; /* iARRAY becomes iREFARRAY */
|
lval->ident=iREFARRAY; /* iARRAY becomes iREFARRAY */
|
||||||
else if (lval->ident!=iREFARRAY)
|
else if (lval->ident!=iREFARRAY)
|
||||||
lval->ident=iEXPRESSION; /* iREFARRAY stays iREFARRAY, rest becomes iEXPRESSION */
|
lval->ident=iEXPRESSION; /* iREFARRAY stays iREFARRAY, rest becomes iEXPRESSION */
|
||||||
|
if (orig_heap!=decl_heap) {
|
||||||
|
diff2=abs(decl_heap-orig_heap);
|
||||||
|
decl_heap=orig_heap;
|
||||||
|
}
|
||||||
|
if (diff1==diff2) {
|
||||||
|
decl_heap+=(diff1/2);
|
||||||
|
} else {
|
||||||
|
decl_heap+=(diff1+diff2);
|
||||||
|
}
|
||||||
return FALSE; /* conditional expression is no lvalue */
|
return FALSE; /* conditional expression is no lvalue */
|
||||||
} else {
|
} else {
|
||||||
return lvalue;
|
return lvalue;
|
||||||
@ -2087,8 +2058,7 @@ static int nesting=0;
|
|||||||
error(35,argidx+1); /* argument type mismatch */
|
error(35,argidx+1); /* argument type mismatch */
|
||||||
/* Verify that the dimensions match with those in arg[argidx].
|
/* Verify that the dimensions match with those in arg[argidx].
|
||||||
* A literal array always has a single dimension.
|
* A literal array always has a single dimension.
|
||||||
* An iARRAYCELL parameter is also assumed to have a single dimension,
|
* An iARRAYCELL parameter is also assumed to have a single dimension.
|
||||||
* but its size may be >1 in case of an enumeration pseudo-array.
|
|
||||||
*/
|
*/
|
||||||
if (lval.sym==NULL || lval.ident==iARRAYCELL) {
|
if (lval.sym==NULL || lval.ident==iARRAYCELL) {
|
||||||
if (arg[argidx].numdim!=1) {
|
if (arg[argidx].numdim!=1) {
|
||||||
@ -2096,7 +2066,6 @@ static int nesting=0;
|
|||||||
} else if (arg[argidx].dim[0]!=0) {
|
} else if (arg[argidx].dim[0]!=0) {
|
||||||
assert(arg[argidx].dim[0]>0);
|
assert(arg[argidx].dim[0]>0);
|
||||||
if (lval.ident==iARRAYCELL) {
|
if (lval.ident==iARRAYCELL) {
|
||||||
if (lval.constval==0 || arg[argidx].dim[0]!=lval.constval)
|
|
||||||
error(47); /* array sizes must match */
|
error(47); /* array sizes must match */
|
||||||
} else {
|
} else {
|
||||||
assert(lval.constval!=0); /* literal array must have a size */
|
assert(lval.constval!=0); /* literal array must have a size */
|
||||||
|
@ -70,7 +70,7 @@ static ucell hex2long(char *s,char **n)
|
|||||||
s++;
|
s++;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
assert((*s>='0' && *s<='9') || (*s>='a' && *s<='f') || (*s>='A' && *s<='F'));
|
assert((*s>='0' && *s<='9') || (*s>='a' && *s<='f') || (*s>='a' && *s<='f'));
|
||||||
for ( ;; ) {
|
for ( ;; ) {
|
||||||
if (*s>='0' && *s<='9')
|
if (*s>='0' && *s<='9')
|
||||||
digit=*s-'0';
|
digit=*s-'0';
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#define _MAX_PATH 250
|
#define _MAX_PATH 250
|
||||||
#endif
|
#endif
|
||||||
#if !defined DIRSEP_CHAR
|
#if !defined DIRSEP_CHAR
|
||||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE___
|
||||||
#define DIRSEP_CHAR '/'
|
#define DIRSEP_CHAR '/'
|
||||||
#elif defined macintosh
|
#elif defined macintosh
|
||||||
#define DIRSEP_CHAR ':'
|
#define DIRSEP_CHAR ':'
|
||||||
|
@ -443,52 +443,6 @@ SC_FUNC void delete_autolisttable(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ----- value pair list ----------------------------------------- */
|
|
||||||
static valuepair heaplist = {NULL, 0, 0};
|
|
||||||
|
|
||||||
SC_FUNC valuepair *push_heaplist(long first, long second)
|
|
||||||
{
|
|
||||||
valuepair *cur, *last;
|
|
||||||
if ((cur=malloc(sizeof(valuepair)))==NULL)
|
|
||||||
error(103); /* insufficient memory (fatal error) */
|
|
||||||
|
|
||||||
cur->first=first;
|
|
||||||
cur->second=second;
|
|
||||||
cur->next=NULL;
|
|
||||||
|
|
||||||
for (last=&heaplist; last->next!=NULL; last=last->next)
|
|
||||||
/* nothing */;
|
|
||||||
last->next=cur;
|
|
||||||
return cur;
|
|
||||||
}
|
|
||||||
|
|
||||||
SC_FUNC int popfront_heaplist(long *first, long *second)
|
|
||||||
{
|
|
||||||
valuepair *front=heaplist.next;
|
|
||||||
if (front==NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* copy fields */
|
|
||||||
*first=front->first;
|
|
||||||
*second=front->second;
|
|
||||||
|
|
||||||
/* unlink and free */
|
|
||||||
heaplist.next=front->next;
|
|
||||||
free(front);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
SC_FUNC void delete_heaplisttable(void)
|
|
||||||
{
|
|
||||||
valuepair *cur;
|
|
||||||
while (heaplist.next!=NULL) {
|
|
||||||
cur=heaplist.next;
|
|
||||||
heaplist.next=cur->next;
|
|
||||||
free(cur);
|
|
||||||
} /* while */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ----- debug information --------------------------------------- */
|
/* ----- debug information --------------------------------------- */
|
||||||
|
|
||||||
static stringlist dbgstrings = {NULL, NULL};
|
static stringlist dbgstrings = {NULL, NULL};
|
||||||
|
@ -87,7 +87,6 @@ SC_VDEFINE int sc_allowproccall=0; /* allow/detect tagnames in lex() */
|
|||||||
SC_VDEFINE char *pc_deprecate = NULL;/* if non-null, mark next declaration as deprecated */
|
SC_VDEFINE char *pc_deprecate = NULL;/* if non-null, mark next declaration as deprecated */
|
||||||
SC_VDEFINE int sc_showincludes=0; /* show include files */
|
SC_VDEFINE int sc_showincludes=0; /* show include files */
|
||||||
SC_VDEFINE int sc_warnings_are_errors=0;
|
SC_VDEFINE int sc_warnings_are_errors=0;
|
||||||
SC_VDEFINE int sc_stkusageinfo = FALSE; /* show stack usage info? */
|
|
||||||
|
|
||||||
SC_VDEFINE constvalue sc_automaton_tab = { NULL, "", 0, 0}; /* automaton table */
|
SC_VDEFINE constvalue sc_automaton_tab = { NULL, "", 0, 0}; /* automaton table */
|
||||||
SC_VDEFINE constvalue sc_state_tab = { NULL, "", 0, 0}; /* state table */
|
SC_VDEFINE constvalue sc_state_tab = { NULL, "", 0, 0}; /* state table */
|
||||||
|
@ -181,13 +181,3 @@ amx_debug 1
|
|||||||
//
|
//
|
||||||
// Default value: ""
|
// Default value: ""
|
||||||
amx_mldebug ""
|
amx_mldebug ""
|
||||||
|
|
||||||
// Performance monitor
|
|
||||||
//
|
|
||||||
// If function executed more than amx_perflog_ms milliseconds
|
|
||||||
// print plugin and function name to current amxmodx log file.
|
|
||||||
//
|
|
||||||
// Time in milliseconds
|
|
||||||
// Default value: 1.0
|
|
||||||
//
|
|
||||||
amx_perflog_ms 1.0
|
|
@ -221,12 +221,3 @@ amx_statsx_freeze -2.0
|
|||||||
// Default value: 0
|
// Default value: 0
|
||||||
amx_restrmapsettings 0
|
amx_restrmapsettings 0
|
||||||
|
|
||||||
// Performance monitor
|
|
||||||
//
|
|
||||||
// If function executed more than amx_perflog_ms milliseconds
|
|
||||||
// print plugin and function name to current amxmodx log file.
|
|
||||||
//
|
|
||||||
// Time in milliseconds
|
|
||||||
// Default value: 1.0
|
|
||||||
//
|
|
||||||
amx_perflog_ms 1.0
|
|
4719
configs/hamdata.ini
Normal file
4719
configs/hamdata.ini
Normal file
File diff suppressed because it is too large
Load Diff
@ -218,14 +218,3 @@ amx_idle_ignore_immunity 1
|
|||||||
//
|
//
|
||||||
// Default value: 4
|
// Default value: 4
|
||||||
amx_unstuck_frequency 4
|
amx_unstuck_frequency 4
|
||||||
|
|
||||||
|
|
||||||
// Performance monitor
|
|
||||||
//
|
|
||||||
// If function executed more than amx_perflog_ms milliseconds
|
|
||||||
// print plugin and function name to current amxmodx log file.
|
|
||||||
//
|
|
||||||
// Time in milliseconds
|
|
||||||
// Default value: 1.0
|
|
||||||
//
|
|
||||||
amx_perflog_ms 1.0
|
|
@ -4105,67 +4105,4 @@
|
|||||||
"game" "valve"
|
"game" "valve"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Virtual Functions
|
|
||||||
//
|
|
||||||
|
|
||||||
"virtual.games/ag/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "ag"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/cstrike/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "cstrike"
|
|
||||||
"game" "czero"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/dod/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "dod"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/esf/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "esf"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/esf_openbeta/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "esf_openbeta"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/gearbox/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "gearbox"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/ns/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "ns"
|
|
||||||
"game" "nsp"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/svencoop/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "svencoop"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/tfc/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "tfc"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/ts/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "ts"
|
|
||||||
}
|
|
||||||
|
|
||||||
"virtual.games/valve/offsets-common.txt"
|
|
||||||
{
|
|
||||||
"game" "valve"
|
|
||||||
"game" "dmc"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,938 +0,0 @@
|
|||||||
/**
|
|
||||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
|
||||||
* updater or by upgrading your AMX Mod X install.
|
|
||||||
*
|
|
||||||
* To override data in this file, create a subdirectory named "custom" and
|
|
||||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
|
||||||
* after AMXX's own.
|
|
||||||
*
|
|
||||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)
|
|
||||||
*/
|
|
||||||
|
|
||||||
"Games"
|
|
||||||
{
|
|
||||||
"#default"
|
|
||||||
{
|
|
||||||
"Offsets"
|
|
||||||
{
|
|
||||||
"pev"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"base"
|
|
||||||
{
|
|
||||||
"windows" "0x0"
|
|
||||||
"linux" "0x60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"spawn"
|
|
||||||
{
|
|
||||||
"windows" "0"
|
|
||||||
"linux" "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
"precache"
|
|
||||||
{
|
|
||||||
"windows" "1"
|
|
||||||
"linux" "3"
|
|
||||||
}
|
|
||||||
|
|
||||||
"keyvalue"
|
|
||||||
{
|
|
||||||
"windows" "2"
|
|
||||||
"linux" "4"
|
|
||||||
}
|
|
||||||
|
|
||||||
"objectcaps"
|
|
||||||
{
|
|
||||||
"windows" "5"
|
|
||||||
"linux" "7"
|
|
||||||
}
|
|
||||||
|
|
||||||
"activate"
|
|
||||||
{
|
|
||||||
"windows" "6"
|
|
||||||
"linux" "8"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setobjectcollisionbox"
|
|
||||||
{
|
|
||||||
"windows" "7"
|
|
||||||
"linux" "9"
|
|
||||||
}
|
|
||||||
|
|
||||||
"classify"
|
|
||||||
{
|
|
||||||
"windows" "8"
|
|
||||||
"linux" "10"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathnotice"
|
|
||||||
{
|
|
||||||
"windows" "9"
|
|
||||||
"linux" "11"
|
|
||||||
}
|
|
||||||
|
|
||||||
"traceattack"
|
|
||||||
{
|
|
||||||
"windows" "10"
|
|
||||||
"linux" "12"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takedamage"
|
|
||||||
{
|
|
||||||
"windows" "11"
|
|
||||||
"linux" "13"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takehealth"
|
|
||||||
{
|
|
||||||
"windows" "12"
|
|
||||||
"linux" "14"
|
|
||||||
}
|
|
||||||
|
|
||||||
"killed"
|
|
||||||
{
|
|
||||||
"windows" "13"
|
|
||||||
"linux" "15"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bloodcolor"
|
|
||||||
{
|
|
||||||
"windows" "14"
|
|
||||||
"linux" "16"
|
|
||||||
}
|
|
||||||
|
|
||||||
"tracebleed"
|
|
||||||
{
|
|
||||||
"windows" "15"
|
|
||||||
"linux" "17"
|
|
||||||
}
|
|
||||||
|
|
||||||
"istriggered"
|
|
||||||
{
|
|
||||||
"windows" "16"
|
|
||||||
"linux" "18"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mymonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "17"
|
|
||||||
"linux" "19"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mysquadmonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "18"
|
|
||||||
"linux" "20"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gettogglestate"
|
|
||||||
{
|
|
||||||
"windows" "19"
|
|
||||||
"linux" "21"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpoints"
|
|
||||||
{
|
|
||||||
"windows" "20"
|
|
||||||
"linux" "22"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpointstoteam"
|
|
||||||
{
|
|
||||||
"windows" "21"
|
|
||||||
"linux" "23"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "22"
|
|
||||||
"linux" "24"
|
|
||||||
}
|
|
||||||
|
|
||||||
"removeplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "23"
|
|
||||||
"linux" "25"
|
|
||||||
}
|
|
||||||
|
|
||||||
"giveammo"
|
|
||||||
{
|
|
||||||
"windows" "24"
|
|
||||||
"linux" "26"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdelay"
|
|
||||||
{
|
|
||||||
"windows" "25"
|
|
||||||
"linux" "27"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ismoving"
|
|
||||||
{
|
|
||||||
"windows" "26"
|
|
||||||
"linux" "28"
|
|
||||||
}
|
|
||||||
|
|
||||||
"overridereset"
|
|
||||||
{
|
|
||||||
"windows" "27"
|
|
||||||
"linux" "29"
|
|
||||||
}
|
|
||||||
|
|
||||||
"damagedecal"
|
|
||||||
{
|
|
||||||
"windows" "28"
|
|
||||||
"linux" "30"
|
|
||||||
}
|
|
||||||
|
|
||||||
"settogglestate"
|
|
||||||
{
|
|
||||||
"windows" "29"
|
|
||||||
"linux" "31"
|
|
||||||
}
|
|
||||||
|
|
||||||
"startsneaking"
|
|
||||||
{
|
|
||||||
"windows" "30"
|
|
||||||
"linux" "32"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopsneaking"
|
|
||||||
{
|
|
||||||
"windows" "31"
|
|
||||||
"linux" "33"
|
|
||||||
}
|
|
||||||
|
|
||||||
"oncontrols"
|
|
||||||
{
|
|
||||||
"windows" "32"
|
|
||||||
"linux" "34"
|
|
||||||
}
|
|
||||||
|
|
||||||
"issneaking"
|
|
||||||
{
|
|
||||||
"windows" "33"
|
|
||||||
"linux" "35"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isalive"
|
|
||||||
{
|
|
||||||
"windows" "34"
|
|
||||||
"linux" "36"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isbspmodel"
|
|
||||||
{
|
|
||||||
"windows" "35"
|
|
||||||
"linux" "37"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reflectgauss"
|
|
||||||
{
|
|
||||||
"windows" "36"
|
|
||||||
"linux" "38"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hastarget"
|
|
||||||
{
|
|
||||||
"windows" "37"
|
|
||||||
"linux" "39"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isinworld"
|
|
||||||
{
|
|
||||||
"windows" "38"
|
|
||||||
"linux" "40"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isplayer"
|
|
||||||
{
|
|
||||||
"windows" "39"
|
|
||||||
"linux" "41"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isnetclient"
|
|
||||||
{
|
|
||||||
"windows" "40"
|
|
||||||
"linux" "42"
|
|
||||||
}
|
|
||||||
|
|
||||||
"teamid"
|
|
||||||
{
|
|
||||||
"windows" "41"
|
|
||||||
"linux" "43"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getnexttarget"
|
|
||||||
{
|
|
||||||
"windows" "42"
|
|
||||||
"linux" "44"
|
|
||||||
}
|
|
||||||
|
|
||||||
"think"
|
|
||||||
{
|
|
||||||
"windows" "43"
|
|
||||||
"linux" "45"
|
|
||||||
}
|
|
||||||
|
|
||||||
"touch"
|
|
||||||
{
|
|
||||||
"windows" "44"
|
|
||||||
"linux" "46"
|
|
||||||
}
|
|
||||||
|
|
||||||
"use"
|
|
||||||
{
|
|
||||||
"windows" "45"
|
|
||||||
"linux" "47"
|
|
||||||
}
|
|
||||||
|
|
||||||
"blocked"
|
|
||||||
{
|
|
||||||
"windows" "46"
|
|
||||||
"linux" "48"
|
|
||||||
}
|
|
||||||
|
|
||||||
"respawn"
|
|
||||||
{
|
|
||||||
"windows" "48"
|
|
||||||
"linux" "50"
|
|
||||||
}
|
|
||||||
|
|
||||||
"updateowner"
|
|
||||||
{
|
|
||||||
"windows" "49"
|
|
||||||
"linux" "51"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fbecomeprone"
|
|
||||||
{
|
|
||||||
"windows" "50"
|
|
||||||
"linux" "52"
|
|
||||||
}
|
|
||||||
|
|
||||||
"center"
|
|
||||||
{
|
|
||||||
"windows" "51"
|
|
||||||
"linux" "53"
|
|
||||||
}
|
|
||||||
|
|
||||||
"eyeposition"
|
|
||||||
{
|
|
||||||
"windows" "52"
|
|
||||||
"linux" "54"
|
|
||||||
}
|
|
||||||
|
|
||||||
"earposition"
|
|
||||||
{
|
|
||||||
"windows" "53"
|
|
||||||
"linux" "55"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bodytarget"
|
|
||||||
{
|
|
||||||
"windows" "54"
|
|
||||||
"linux" "56"
|
|
||||||
}
|
|
||||||
|
|
||||||
"illumination"
|
|
||||||
{
|
|
||||||
"windows" "55"
|
|
||||||
"linux" "57"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvisible"
|
|
||||||
{
|
|
||||||
"windows" "56"
|
|
||||||
"linux" "58"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecvisible"
|
|
||||||
{
|
|
||||||
"windows" "57"
|
|
||||||
"linux" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"look"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"changeyaw"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"irelationship"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinitdead"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"becomedead"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bestvisibleenemy"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"finviewcone"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecinviewcone"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"runai"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterthink"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinit"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checklocalmove"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"move"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"moveexecute"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"shouldadvanceroute"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getstoppedactivity"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stop"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkrangeattack1"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkrangeattack2"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkmeleeattack1"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkmeleeattack2"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"schedulechange"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"canplaysequence"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"canplaysentence"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"playsentence"
|
|
||||||
{
|
|
||||||
"windows" "91"
|
|
||||||
"linux" "93"
|
|
||||||
}
|
|
||||||
|
|
||||||
"playscriptedsentence"
|
|
||||||
{
|
|
||||||
"windows" "92"
|
|
||||||
"linux" "94"
|
|
||||||
}
|
|
||||||
|
|
||||||
"sentencestop"
|
|
||||||
{
|
|
||||||
"windows" "93"
|
|
||||||
"linux" "95"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getidealstate"
|
|
||||||
{
|
|
||||||
"windows" "94"
|
|
||||||
"linux" "96"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setactivity"
|
|
||||||
{
|
|
||||||
"windows" "95"
|
|
||||||
"linux" "97"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reportaistate"
|
|
||||||
{
|
|
||||||
"windows" "96"
|
|
||||||
"linux" "98"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkenemy"
|
|
||||||
{
|
|
||||||
"windows" "97"
|
|
||||||
"linux" "99"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ftriangulate"
|
|
||||||
{
|
|
||||||
"windows" "98"
|
|
||||||
"linux" "100"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setyawspeed"
|
|
||||||
{
|
|
||||||
"windows" "99"
|
|
||||||
"linux" "101"
|
|
||||||
}
|
|
||||||
|
|
||||||
"buildnearestroute"
|
|
||||||
{
|
|
||||||
"windows" "100"
|
|
||||||
"linux" "102"
|
|
||||||
}
|
|
||||||
|
|
||||||
"findcover"
|
|
||||||
{
|
|
||||||
"windows" "101"
|
|
||||||
"linux" "103"
|
|
||||||
}
|
|
||||||
|
|
||||||
"coverradius"
|
|
||||||
{
|
|
||||||
"windows" "103"
|
|
||||||
"linux" "105"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fcancheckattacks"
|
|
||||||
{
|
|
||||||
"windows" "104"
|
|
||||||
"linux" "106"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkammo"
|
|
||||||
{
|
|
||||||
"windows" "105"
|
|
||||||
"linux" "107"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ignoreconditions"
|
|
||||||
{
|
|
||||||
"windows" "106"
|
|
||||||
"linux" "108"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvalidatehinttype"
|
|
||||||
{
|
|
||||||
"windows" "107"
|
|
||||||
"linux" "109"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fcanactiveidle"
|
|
||||||
{
|
|
||||||
"windows" "108"
|
|
||||||
"linux" "110"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isoundmask"
|
|
||||||
{
|
|
||||||
"windows" "109"
|
|
||||||
"linux" "111"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hearingsensitivity"
|
|
||||||
{
|
|
||||||
"windows" "112"
|
|
||||||
"linux" "114"
|
|
||||||
}
|
|
||||||
|
|
||||||
"barnaclevictimbitten"
|
|
||||||
{
|
|
||||||
"windows" "113"
|
|
||||||
"linux" "115"
|
|
||||||
}
|
|
||||||
|
|
||||||
"barnaclevictimreleased"
|
|
||||||
{
|
|
||||||
"windows" "114"
|
|
||||||
"linux" "116"
|
|
||||||
}
|
|
||||||
|
|
||||||
"preschedulethink"
|
|
||||||
{
|
|
||||||
"windows" "115"
|
|
||||||
"linux" "117"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdeathactivity"
|
|
||||||
{
|
|
||||||
"windows" "116"
|
|
||||||
"linux" "118"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gibmonster"
|
|
||||||
{
|
|
||||||
"windows" "117"
|
|
||||||
"linux" "119"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hashumangibs"
|
|
||||||
{
|
|
||||||
"windows" "118"
|
|
||||||
"linux" "120"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hasaliengibs"
|
|
||||||
{
|
|
||||||
"windows" "119"
|
|
||||||
"linux" "121"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fademonster"
|
|
||||||
{
|
|
||||||
"windows" "120"
|
|
||||||
"linux" "122"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathsound"
|
|
||||||
{
|
|
||||||
"windows" "122"
|
|
||||||
"linux" "124"
|
|
||||||
}
|
|
||||||
|
|
||||||
"alertsound"
|
|
||||||
{
|
|
||||||
"windows" "123"
|
|
||||||
"linux" "125"
|
|
||||||
}
|
|
||||||
|
|
||||||
"idlesound"
|
|
||||||
{
|
|
||||||
"windows" "124"
|
|
||||||
"linux" "126"
|
|
||||||
}
|
|
||||||
|
|
||||||
"painsound"
|
|
||||||
{
|
|
||||||
"windows" "125"
|
|
||||||
"linux" "127"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopfollowing"
|
|
||||||
{
|
|
||||||
"windows" "126"
|
|
||||||
"linux" "128"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_jump"
|
|
||||||
{
|
|
||||||
"windows" "127"
|
|
||||||
"linux" "129"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_duck"
|
|
||||||
{
|
|
||||||
"windows" "128"
|
|
||||||
"linux" "130"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_prethink"
|
|
||||||
{
|
|
||||||
"windows" "129"
|
|
||||||
"linux" "131"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_postthink"
|
|
||||||
{
|
|
||||||
"windows" "130"
|
|
||||||
"linux" "132"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_getgunposition"
|
|
||||||
{
|
|
||||||
"windows" "121"
|
|
||||||
"linux" "123"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_shouldfadeondeath"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_impulsecommands"
|
|
||||||
{
|
|
||||||
"windows" "132"
|
|
||||||
"linux" "134"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "131"
|
|
||||||
"linux" "133"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addduplicate"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_candeploy"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_deploy"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_canholster"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_holster"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_preframe"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_postframe"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_drop"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_kill"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_attachtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_primaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_secondaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getweaponptr"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_itemslot"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractammo"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractclipammo"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_addweapon"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_playemptysound"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_resetemptysound"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_sendweaponanim"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_isusable"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_primaryattack"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_secondaryattack"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_reload"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_weaponidle"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "89"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_retireweapon"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_shouldweaponidle"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_usedecrement"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,874 +0,0 @@
|
|||||||
/**
|
|
||||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
|
||||||
* updater or by upgrading your AMX Mod X install.
|
|
||||||
*
|
|
||||||
* To override data in this file, create a subdirectory named "custom" and
|
|
||||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
|
||||||
* after AMXX's own.
|
|
||||||
*
|
|
||||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)
|
|
||||||
*/
|
|
||||||
|
|
||||||
"Games"
|
|
||||||
{
|
|
||||||
"#default"
|
|
||||||
{
|
|
||||||
"Offsets"
|
|
||||||
{
|
|
||||||
"pev"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "4"
|
|
||||||
"mac" "4"
|
|
||||||
}
|
|
||||||
|
|
||||||
"base"
|
|
||||||
{
|
|
||||||
"windows" "0x0"
|
|
||||||
"linux" "0x0"
|
|
||||||
"mac" "0x0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"spawn"
|
|
||||||
{
|
|
||||||
"windows" "0"
|
|
||||||
"linux" "0"
|
|
||||||
"mac" "0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"precache"
|
|
||||||
{
|
|
||||||
"windows" "1"
|
|
||||||
"linux" "1"
|
|
||||||
"mac" "1"
|
|
||||||
}
|
|
||||||
|
|
||||||
"keyvalue"
|
|
||||||
{
|
|
||||||
"windows" "3"
|
|
||||||
"linux" "3"
|
|
||||||
"mac" "3"
|
|
||||||
}
|
|
||||||
|
|
||||||
"objectcaps"
|
|
||||||
{
|
|
||||||
"windows" "6"
|
|
||||||
"linux" "6"
|
|
||||||
"mac" "6"
|
|
||||||
}
|
|
||||||
|
|
||||||
"activate"
|
|
||||||
{
|
|
||||||
"windows" "7"
|
|
||||||
"linux" "7"
|
|
||||||
"mac" "7"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setobjectcollisionbox"
|
|
||||||
{
|
|
||||||
"windows" "8"
|
|
||||||
"linux" "8"
|
|
||||||
"mac" "8"
|
|
||||||
}
|
|
||||||
|
|
||||||
"classify"
|
|
||||||
{
|
|
||||||
"windows" "9"
|
|
||||||
"linux" "9"
|
|
||||||
"mac" "9"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathnotice"
|
|
||||||
{
|
|
||||||
"windows" "10"
|
|
||||||
"linux" "10"
|
|
||||||
"mac" "10"
|
|
||||||
}
|
|
||||||
|
|
||||||
"traceattack"
|
|
||||||
{
|
|
||||||
"windows" "11"
|
|
||||||
"linux" "11"
|
|
||||||
"mac" "11"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takedamage"
|
|
||||||
{
|
|
||||||
"windows" "12"
|
|
||||||
"linux" "12"
|
|
||||||
"mac" "12"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takehealth"
|
|
||||||
{
|
|
||||||
"windows" "13"
|
|
||||||
"linux" "13"
|
|
||||||
"mac" "13"
|
|
||||||
}
|
|
||||||
|
|
||||||
"killed"
|
|
||||||
{
|
|
||||||
"windows" "14"
|
|
||||||
"linux" "14"
|
|
||||||
"mac" "14"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bloodcolor"
|
|
||||||
{
|
|
||||||
"windows" "15"
|
|
||||||
"linux" "15"
|
|
||||||
"mac" "15"
|
|
||||||
}
|
|
||||||
|
|
||||||
"tracebleed"
|
|
||||||
{
|
|
||||||
"windows" "16"
|
|
||||||
"linux" "16"
|
|
||||||
"mac" "16"
|
|
||||||
}
|
|
||||||
|
|
||||||
"istriggered"
|
|
||||||
{
|
|
||||||
"windows" "17"
|
|
||||||
"linux" "17"
|
|
||||||
"mac" "17"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mymonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "18"
|
|
||||||
"linux" "18"
|
|
||||||
"mac" "18"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mysquadmonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "19"
|
|
||||||
"linux" "19"
|
|
||||||
"mac" "19"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gettogglestate"
|
|
||||||
{
|
|
||||||
"windows" "20"
|
|
||||||
"linux" "20"
|
|
||||||
"mac" "20"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpoints"
|
|
||||||
{
|
|
||||||
"windows" "21"
|
|
||||||
"linux" "21"
|
|
||||||
"mac" "21"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpointstoteam"
|
|
||||||
{
|
|
||||||
"windows" "22"
|
|
||||||
"linux" "22"
|
|
||||||
"mac" "22"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "23"
|
|
||||||
"linux" "23"
|
|
||||||
"mac" "23"
|
|
||||||
}
|
|
||||||
|
|
||||||
"removeplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "24"
|
|
||||||
"linux" "24"
|
|
||||||
"mac" "24"
|
|
||||||
}
|
|
||||||
|
|
||||||
"giveammo"
|
|
||||||
{
|
|
||||||
"windows" "25"
|
|
||||||
"linux" "25"
|
|
||||||
"mac" "25"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdelay"
|
|
||||||
{
|
|
||||||
"windows" "26"
|
|
||||||
"linux" "26"
|
|
||||||
"mac" "26"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ismoving"
|
|
||||||
{
|
|
||||||
"windows" "27"
|
|
||||||
"linux" "27"
|
|
||||||
"mac" "27"
|
|
||||||
}
|
|
||||||
|
|
||||||
"overridereset"
|
|
||||||
{
|
|
||||||
"windows" "28"
|
|
||||||
"linux" "28"
|
|
||||||
"mac" "28"
|
|
||||||
}
|
|
||||||
|
|
||||||
"damagedecal"
|
|
||||||
{
|
|
||||||
"windows" "29"
|
|
||||||
"linux" "29"
|
|
||||||
"mac" "29"
|
|
||||||
}
|
|
||||||
|
|
||||||
"settogglestate"
|
|
||||||
{
|
|
||||||
"windows" "30"
|
|
||||||
"linux" "30"
|
|
||||||
"mac" "30"
|
|
||||||
}
|
|
||||||
|
|
||||||
"startsneaking"
|
|
||||||
{
|
|
||||||
"windows" "31"
|
|
||||||
"linux" "31"
|
|
||||||
"mac" "31"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopsneaking"
|
|
||||||
{
|
|
||||||
"windows" "32"
|
|
||||||
"linux" "32"
|
|
||||||
"mac" "32"
|
|
||||||
}
|
|
||||||
|
|
||||||
"oncontrols"
|
|
||||||
{
|
|
||||||
"windows" "33"
|
|
||||||
"linux" "33"
|
|
||||||
"mac" "33"
|
|
||||||
}
|
|
||||||
|
|
||||||
"issneaking"
|
|
||||||
{
|
|
||||||
"windows" "34"
|
|
||||||
"linux" "34"
|
|
||||||
"mac" "34"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isalive"
|
|
||||||
{
|
|
||||||
"windows" "35"
|
|
||||||
"linux" "35"
|
|
||||||
"mac" "35"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isbspmodel"
|
|
||||||
{
|
|
||||||
"windows" "36"
|
|
||||||
"linux" "36"
|
|
||||||
"mac" "36"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reflectgauss"
|
|
||||||
{
|
|
||||||
"windows" "37"
|
|
||||||
"linux" "37"
|
|
||||||
"mac" "37"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hastarget"
|
|
||||||
{
|
|
||||||
"windows" "38"
|
|
||||||
"linux" "38"
|
|
||||||
"mac" "38"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isinworld"
|
|
||||||
{
|
|
||||||
"windows" "39"
|
|
||||||
"linux" "39"
|
|
||||||
"mac" "39"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isplayer"
|
|
||||||
{
|
|
||||||
"windows" "40"
|
|
||||||
"linux" "40"
|
|
||||||
"mac" "40"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isnetclient"
|
|
||||||
{
|
|
||||||
"windows" "41"
|
|
||||||
"linux" "41"
|
|
||||||
"mac" "41"
|
|
||||||
}
|
|
||||||
|
|
||||||
"teamid"
|
|
||||||
{
|
|
||||||
"windows" "42"
|
|
||||||
"linux" "42"
|
|
||||||
"mac" "42"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getnexttarget"
|
|
||||||
{
|
|
||||||
"windows" "43"
|
|
||||||
"linux" "43"
|
|
||||||
"mac" "43"
|
|
||||||
}
|
|
||||||
|
|
||||||
"think"
|
|
||||||
{
|
|
||||||
"windows" "44"
|
|
||||||
"linux" "44"
|
|
||||||
"mac" "44"
|
|
||||||
}
|
|
||||||
|
|
||||||
"touch"
|
|
||||||
{
|
|
||||||
"windows" "45"
|
|
||||||
"linux" "45"
|
|
||||||
"mac" "45"
|
|
||||||
}
|
|
||||||
|
|
||||||
"use"
|
|
||||||
{
|
|
||||||
"windows" "46"
|
|
||||||
"linux" "46"
|
|
||||||
"mac" "46"
|
|
||||||
}
|
|
||||||
|
|
||||||
"blocked"
|
|
||||||
{
|
|
||||||
"windows" "47"
|
|
||||||
"linux" "47"
|
|
||||||
"mac" "47"
|
|
||||||
}
|
|
||||||
|
|
||||||
"respawn"
|
|
||||||
{
|
|
||||||
"windows" "48"
|
|
||||||
"linux" "48"
|
|
||||||
"mac" "48"
|
|
||||||
}
|
|
||||||
|
|
||||||
"updateowner"
|
|
||||||
{
|
|
||||||
"windows" "49"
|
|
||||||
"linux" "49"
|
|
||||||
"mac" "49"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fbecomeprone"
|
|
||||||
{
|
|
||||||
"windows" "50"
|
|
||||||
"linux" "50"
|
|
||||||
"mac" "50"
|
|
||||||
}
|
|
||||||
|
|
||||||
"center"
|
|
||||||
{
|
|
||||||
"windows" "51"
|
|
||||||
"linux" "51"
|
|
||||||
"mac" "51"
|
|
||||||
}
|
|
||||||
|
|
||||||
"eyeposition"
|
|
||||||
{
|
|
||||||
"windows" "52"
|
|
||||||
"linux" "52"
|
|
||||||
"mac" "52"
|
|
||||||
}
|
|
||||||
|
|
||||||
"earposition"
|
|
||||||
{
|
|
||||||
"windows" "53"
|
|
||||||
"linux" "53"
|
|
||||||
"mac" "53"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bodytarget"
|
|
||||||
{
|
|
||||||
"windows" "54"
|
|
||||||
"linux" "54"
|
|
||||||
"mac" "54"
|
|
||||||
}
|
|
||||||
|
|
||||||
"illumination"
|
|
||||||
{
|
|
||||||
"windows" "55"
|
|
||||||
"linux" "55"
|
|
||||||
"mac" "55"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvisible"
|
|
||||||
{
|
|
||||||
"windows" "56"
|
|
||||||
"linux" "56"
|
|
||||||
"mac" "56"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecvisible"
|
|
||||||
{
|
|
||||||
"windows" "57"
|
|
||||||
"linux" "57"
|
|
||||||
"mac" "57"
|
|
||||||
}
|
|
||||||
|
|
||||||
"changeyaw"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "59"
|
|
||||||
"mac" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hashumangibs"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "60"
|
|
||||||
"mac" "60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hasaliengibs"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "61"
|
|
||||||
"mac" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fademonster"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "62"
|
|
||||||
"mac" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gibmonster"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "63"
|
|
||||||
"mac" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdeathactivity"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "64"
|
|
||||||
"mac" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"becomedead"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "65"
|
|
||||||
"mac" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"irelationship"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "67"
|
|
||||||
"mac" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"painsound"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "68"
|
|
||||||
"mac" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reportaistate"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "70"
|
|
||||||
"mac" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinitdead"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "71"
|
|
||||||
"mac" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"look"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "72"
|
|
||||||
"mac" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bestvisibleenemy"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "73"
|
|
||||||
"mac" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"finviewcone"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "74"
|
|
||||||
"mac" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecinviewcone"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "75"
|
|
||||||
"mac" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_jump"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "76"
|
|
||||||
"mac" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_duck"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "77"
|
|
||||||
"mac" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_prethink"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "78"
|
|
||||||
"mac" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_postthink"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "79"
|
|
||||||
"mac" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_getgunposition"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "80"
|
|
||||||
"mac" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_shouldfadeondeath"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "66"
|
|
||||||
"mac" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_impulsecommands"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "83"
|
|
||||||
"mac" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "82"
|
|
||||||
"mac" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "59"
|
|
||||||
"mac" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addduplicate"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "60"
|
|
||||||
"mac" "60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "61"
|
|
||||||
"mac" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_candeploy"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "62"
|
|
||||||
"mac" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_deploy"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "64"
|
|
||||||
"mac" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_canholster"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "66"
|
|
||||||
"mac" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_holster"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "67"
|
|
||||||
"mac" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "68"
|
|
||||||
"mac" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_preframe"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "69"
|
|
||||||
"mac" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_postframe"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "70"
|
|
||||||
"mac" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_drop"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "71"
|
|
||||||
"mac" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_kill"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "72"
|
|
||||||
"mac" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_attachtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "73"
|
|
||||||
"mac" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_primaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "74"
|
|
||||||
"mac" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_secondaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "75"
|
|
||||||
"mac" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "76"
|
|
||||||
"mac" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getweaponptr"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "77"
|
|
||||||
"mac" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_itemslot"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "79"
|
|
||||||
"mac" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractammo"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "80"
|
|
||||||
"mac" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractclipammo"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "81"
|
|
||||||
"mac" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_addweapon"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "82"
|
|
||||||
"mac" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_playemptysound"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "83"
|
|
||||||
"mac" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_resetemptysound"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "84"
|
|
||||||
"mac" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_isusable"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "86"
|
|
||||||
"mac" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_primaryattack"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "87"
|
|
||||||
"mac" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_secondaryattack"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "88"
|
|
||||||
"mac" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_reload"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "89"
|
|
||||||
"mac" "89"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_weaponidle"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "90"
|
|
||||||
"mac" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_retireweapon"
|
|
||||||
{
|
|
||||||
"windows" "91"
|
|
||||||
"linux" "91"
|
|
||||||
"mac" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_shouldweaponidle"
|
|
||||||
{
|
|
||||||
"windows" "92"
|
|
||||||
"linux" "92"
|
|
||||||
"mac" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_usedecrement"
|
|
||||||
{
|
|
||||||
"windows" "93"
|
|
||||||
"linux" "93"
|
|
||||||
"mac" "93"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_restart"
|
|
||||||
{
|
|
||||||
"windows" "2"
|
|
||||||
"linux" "2"
|
|
||||||
"mac" "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_roundrespawn"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "84"
|
|
||||||
"mac" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_item_candrop"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "63"
|
|
||||||
"mac" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_item_isweapon"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "65"
|
|
||||||
"mac" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_item_getmaxspeed"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "78"
|
|
||||||
"mac" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_weapon_sendweaponanim"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "85"
|
|
||||||
"mac" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_player_resetmaxspeed"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "69"
|
|
||||||
"mac" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_player_isbot"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "81"
|
|
||||||
"mac" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_player_getautoaimvector"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "85"
|
|
||||||
"mac" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_player_blind"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "86"
|
|
||||||
"mac" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"cstrike_player_ontouchingweapon"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "87"
|
|
||||||
"mac" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,902 +0,0 @@
|
|||||||
/**
|
|
||||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
|
||||||
* updater or by upgrading your AMX Mod X install.
|
|
||||||
*
|
|
||||||
* To override data in this file, create a subdirectory named "custom" and
|
|
||||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
|
||||||
* after AMXX's own.
|
|
||||||
*
|
|
||||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)
|
|
||||||
*/
|
|
||||||
|
|
||||||
"Games"
|
|
||||||
{
|
|
||||||
"#default"
|
|
||||||
{
|
|
||||||
"Offsets"
|
|
||||||
{
|
|
||||||
"pev"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"base"
|
|
||||||
{
|
|
||||||
"windows" "0x0"
|
|
||||||
"linux" "0x60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"spawn"
|
|
||||||
{
|
|
||||||
"windows" "0"
|
|
||||||
"linux" "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
"precache"
|
|
||||||
{
|
|
||||||
"windows" "1"
|
|
||||||
"linux" "3"
|
|
||||||
}
|
|
||||||
|
|
||||||
"keyvalue"
|
|
||||||
{
|
|
||||||
"windows" "2"
|
|
||||||
"linux" "4"
|
|
||||||
}
|
|
||||||
|
|
||||||
"objectcaps"
|
|
||||||
{
|
|
||||||
"windows" "5"
|
|
||||||
"linux" "7"
|
|
||||||
}
|
|
||||||
|
|
||||||
"activate"
|
|
||||||
{
|
|
||||||
"windows" "6"
|
|
||||||
"linux" "8"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setobjectcollisionbox"
|
|
||||||
{
|
|
||||||
"windows" "7"
|
|
||||||
"linux" "9"
|
|
||||||
}
|
|
||||||
|
|
||||||
"classify"
|
|
||||||
{
|
|
||||||
"windows" "8"
|
|
||||||
"linux" "10"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathnotice"
|
|
||||||
{
|
|
||||||
"windows" "9"
|
|
||||||
"linux" "11"
|
|
||||||
}
|
|
||||||
|
|
||||||
"traceattack"
|
|
||||||
{
|
|
||||||
"windows" "10"
|
|
||||||
"linux" "12"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takedamage"
|
|
||||||
{
|
|
||||||
"windows" "11"
|
|
||||||
"linux" "13"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takehealth"
|
|
||||||
{
|
|
||||||
"windows" "12"
|
|
||||||
"linux" "14"
|
|
||||||
}
|
|
||||||
|
|
||||||
"killed"
|
|
||||||
{
|
|
||||||
"windows" "13"
|
|
||||||
"linux" "15"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bloodcolor"
|
|
||||||
{
|
|
||||||
"windows" "14"
|
|
||||||
"linux" "16"
|
|
||||||
}
|
|
||||||
|
|
||||||
"tracebleed"
|
|
||||||
{
|
|
||||||
"windows" "15"
|
|
||||||
"linux" "17"
|
|
||||||
}
|
|
||||||
|
|
||||||
"istriggered"
|
|
||||||
{
|
|
||||||
"windows" "16"
|
|
||||||
"linux" "18"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mymonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "17"
|
|
||||||
"linux" "19"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mysquadmonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "18"
|
|
||||||
"linux" "20"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gettogglestate"
|
|
||||||
{
|
|
||||||
"windows" "19"
|
|
||||||
"linux" "21"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpoints"
|
|
||||||
{
|
|
||||||
"windows" "20"
|
|
||||||
"linux" "22"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpointstoteam"
|
|
||||||
{
|
|
||||||
"windows" "21"
|
|
||||||
"linux" "23"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "22"
|
|
||||||
"linux" "24"
|
|
||||||
}
|
|
||||||
|
|
||||||
"removeplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "23"
|
|
||||||
"linux" "25"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdelay"
|
|
||||||
{
|
|
||||||
"windows" "24"
|
|
||||||
"linux" "26"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ismoving"
|
|
||||||
{
|
|
||||||
"windows" "25"
|
|
||||||
"linux" "27"
|
|
||||||
}
|
|
||||||
|
|
||||||
"overridereset"
|
|
||||||
{
|
|
||||||
"windows" "26"
|
|
||||||
"linux" "28"
|
|
||||||
}
|
|
||||||
|
|
||||||
"damagedecal"
|
|
||||||
{
|
|
||||||
"windows" "27"
|
|
||||||
"linux" "29"
|
|
||||||
}
|
|
||||||
|
|
||||||
"settogglestate"
|
|
||||||
{
|
|
||||||
"windows" "28"
|
|
||||||
"linux" "30"
|
|
||||||
}
|
|
||||||
|
|
||||||
"startsneaking"
|
|
||||||
{
|
|
||||||
"windows" "29"
|
|
||||||
"linux" "31"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopsneaking"
|
|
||||||
{
|
|
||||||
"windows" "30"
|
|
||||||
"linux" "32"
|
|
||||||
}
|
|
||||||
|
|
||||||
"oncontrols"
|
|
||||||
{
|
|
||||||
"windows" "31"
|
|
||||||
"linux" "33"
|
|
||||||
}
|
|
||||||
|
|
||||||
"issneaking"
|
|
||||||
{
|
|
||||||
"windows" "32"
|
|
||||||
"linux" "34"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isalive"
|
|
||||||
{
|
|
||||||
"windows" "33"
|
|
||||||
"linux" "35"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isbspmodel"
|
|
||||||
{
|
|
||||||
"windows" "34"
|
|
||||||
"linux" "36"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reflectgauss"
|
|
||||||
{
|
|
||||||
"windows" "35"
|
|
||||||
"linux" "37"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hastarget"
|
|
||||||
{
|
|
||||||
"windows" "36"
|
|
||||||
"linux" "38"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isinworld"
|
|
||||||
{
|
|
||||||
"windows" "37"
|
|
||||||
"linux" "39"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isplayer"
|
|
||||||
{
|
|
||||||
"windows" "38"
|
|
||||||
"linux" "40"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isnetclient"
|
|
||||||
{
|
|
||||||
"windows" "39"
|
|
||||||
"linux" "41"
|
|
||||||
}
|
|
||||||
|
|
||||||
"teamid"
|
|
||||||
{
|
|
||||||
"windows" "40"
|
|
||||||
"linux" "42"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getnexttarget"
|
|
||||||
{
|
|
||||||
"windows" "41"
|
|
||||||
"linux" "43"
|
|
||||||
}
|
|
||||||
|
|
||||||
"think"
|
|
||||||
{
|
|
||||||
"windows" "42"
|
|
||||||
"linux" "44"
|
|
||||||
}
|
|
||||||
|
|
||||||
"touch"
|
|
||||||
{
|
|
||||||
"windows" "43"
|
|
||||||
"linux" "45"
|
|
||||||
}
|
|
||||||
|
|
||||||
"use"
|
|
||||||
{
|
|
||||||
"windows" "44"
|
|
||||||
"linux" "46"
|
|
||||||
}
|
|
||||||
|
|
||||||
"blocked"
|
|
||||||
{
|
|
||||||
"windows" "45"
|
|
||||||
"linux" "47"
|
|
||||||
}
|
|
||||||
|
|
||||||
"respawn"
|
|
||||||
{
|
|
||||||
"windows" "46"
|
|
||||||
"linux" "48"
|
|
||||||
}
|
|
||||||
|
|
||||||
"updateowner"
|
|
||||||
{
|
|
||||||
"windows" "47"
|
|
||||||
"linux" "49"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fbecomeprone"
|
|
||||||
{
|
|
||||||
"windows" "48"
|
|
||||||
"linux" "50"
|
|
||||||
}
|
|
||||||
|
|
||||||
"center"
|
|
||||||
{
|
|
||||||
"windows" "49"
|
|
||||||
"linux" "51"
|
|
||||||
}
|
|
||||||
|
|
||||||
"eyeposition"
|
|
||||||
{
|
|
||||||
"windows" "50"
|
|
||||||
"linux" "52"
|
|
||||||
}
|
|
||||||
|
|
||||||
"earposition"
|
|
||||||
{
|
|
||||||
"windows" "51"
|
|
||||||
"linux" "53"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bodytarget"
|
|
||||||
{
|
|
||||||
"windows" "52"
|
|
||||||
"linux" "54"
|
|
||||||
}
|
|
||||||
|
|
||||||
"illumination"
|
|
||||||
{
|
|
||||||
"windows" "53"
|
|
||||||
"linux" "55"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvisible"
|
|
||||||
{
|
|
||||||
"windows" "54"
|
|
||||||
"linux" "56"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecvisible"
|
|
||||||
{
|
|
||||||
"windows" "55"
|
|
||||||
"linux" "57"
|
|
||||||
}
|
|
||||||
|
|
||||||
"look"
|
|
||||||
{
|
|
||||||
"windows" "57"
|
|
||||||
"linux" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"changeyaw"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"irelationship"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinitdead"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"becomedead"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bestvisibleenemy"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"finviewcone"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecinviewcone"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"runai"
|
|
||||||
{
|
|
||||||
"windows" "58"
|
|
||||||
"linux" "60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterthink"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinit"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checklocalmove"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"move"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"moveexecute"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"shouldadvanceroute"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getstoppedactivity"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stop"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkrangeattack1"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkrangeattack2"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkmeleeattack1"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkmeleeattack2"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"schedulechange"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"canplaysequence"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"canplaysentence"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "89"
|
|
||||||
}
|
|
||||||
|
|
||||||
"playsentence"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"playscriptedsentence"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"sentencestop"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getidealstate"
|
|
||||||
{
|
|
||||||
"windows" "91"
|
|
||||||
"linux" "93"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setactivity"
|
|
||||||
{
|
|
||||||
"windows" "92"
|
|
||||||
"linux" "94"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reportaistate"
|
|
||||||
{
|
|
||||||
"windows" "93"
|
|
||||||
"linux" "95"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkenemy"
|
|
||||||
{
|
|
||||||
"windows" "94"
|
|
||||||
"linux" "96"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ftriangulate"
|
|
||||||
{
|
|
||||||
"windows" "95"
|
|
||||||
"linux" "97"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setyawspeed"
|
|
||||||
{
|
|
||||||
"windows" "96"
|
|
||||||
"linux" "98"
|
|
||||||
}
|
|
||||||
|
|
||||||
"buildnearestroute"
|
|
||||||
{
|
|
||||||
"windows" "97"
|
|
||||||
"linux" "99"
|
|
||||||
}
|
|
||||||
|
|
||||||
"findcover"
|
|
||||||
{
|
|
||||||
"windows" "98"
|
|
||||||
"linux" "100"
|
|
||||||
}
|
|
||||||
|
|
||||||
"coverradius"
|
|
||||||
{
|
|
||||||
"windows" "100"
|
|
||||||
"linux" "102"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fcancheckattacks"
|
|
||||||
{
|
|
||||||
"windows" "101"
|
|
||||||
"linux" "103"
|
|
||||||
}
|
|
||||||
|
|
||||||
"checkammo"
|
|
||||||
{
|
|
||||||
"windows" "102"
|
|
||||||
"linux" "104"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ignoreconditions"
|
|
||||||
{
|
|
||||||
"windows" "103"
|
|
||||||
"linux" "105"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvalidatehinttype"
|
|
||||||
{
|
|
||||||
"windows" "104"
|
|
||||||
"linux" "106"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fcanactiveidle"
|
|
||||||
{
|
|
||||||
"windows" "105"
|
|
||||||
"linux" "107"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isoundmask"
|
|
||||||
{
|
|
||||||
"windows" "106"
|
|
||||||
"linux" "108"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hearingsensitivity"
|
|
||||||
{
|
|
||||||
"windows" "109"
|
|
||||||
"linux" "111"
|
|
||||||
}
|
|
||||||
|
|
||||||
"barnaclevictimbitten"
|
|
||||||
{
|
|
||||||
"windows" "110"
|
|
||||||
"linux" "112"
|
|
||||||
}
|
|
||||||
|
|
||||||
"barnaclevictimreleased"
|
|
||||||
{
|
|
||||||
"windows" "111"
|
|
||||||
"linux" "113"
|
|
||||||
}
|
|
||||||
|
|
||||||
"preschedulethink"
|
|
||||||
{
|
|
||||||
"windows" "112"
|
|
||||||
"linux" "114"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdeathactivity"
|
|
||||||
{
|
|
||||||
"windows" "113"
|
|
||||||
"linux" "115"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gibmonster"
|
|
||||||
{
|
|
||||||
"windows" "114"
|
|
||||||
"linux" "116"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hashumangibs"
|
|
||||||
{
|
|
||||||
"windows" "115"
|
|
||||||
"linux" "117"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hasaliengibs"
|
|
||||||
{
|
|
||||||
"windows" "116"
|
|
||||||
"linux" "118"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fademonster"
|
|
||||||
{
|
|
||||||
"windows" "117"
|
|
||||||
"linux" "119"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathsound"
|
|
||||||
{
|
|
||||||
"windows" "119"
|
|
||||||
"linux" "121"
|
|
||||||
}
|
|
||||||
|
|
||||||
"alertsound"
|
|
||||||
{
|
|
||||||
"windows" "120"
|
|
||||||
"linux" "122"
|
|
||||||
}
|
|
||||||
|
|
||||||
"idlesound"
|
|
||||||
{
|
|
||||||
"windows" "121"
|
|
||||||
"linux" "123"
|
|
||||||
}
|
|
||||||
|
|
||||||
"painsound"
|
|
||||||
{
|
|
||||||
"windows" "122"
|
|
||||||
"linux" "124"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopfollowing"
|
|
||||||
{
|
|
||||||
"windows" "123"
|
|
||||||
"linux" "125"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_jump"
|
|
||||||
{
|
|
||||||
"windows" "124"
|
|
||||||
"linux" "126"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_prethink"
|
|
||||||
{
|
|
||||||
"windows" "125"
|
|
||||||
"linux" "127"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_postthink"
|
|
||||||
{
|
|
||||||
"windows" "126"
|
|
||||||
"linux" "128"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_getgunposition"
|
|
||||||
{
|
|
||||||
"windows" "118"
|
|
||||||
"linux" "120"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_shouldfadeondeath"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_impulsecommands"
|
|
||||||
{
|
|
||||||
"windows" "128"
|
|
||||||
"linux" "130"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "127"
|
|
||||||
"linux" "129"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "57"
|
|
||||||
"linux" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addduplicate"
|
|
||||||
{
|
|
||||||
"windows" "58"
|
|
||||||
"linux" "60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_candeploy"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_deploy"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_canholster"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_holster"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_preframe"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_postframe"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_drop"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_kill"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_attachtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_primaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_secondaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getweaponptr"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_itemslot"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_playemptysound"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_resetemptysound"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_sendweaponanim"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_primaryattack"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_secondaryattack"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_weaponidle"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_retireweapon"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_shouldweaponidle"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_usedecrement"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"esf_weapon_holsterwhenmeleed"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,878 +0,0 @@
|
|||||||
/**
|
|
||||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
|
||||||
* updater or by upgrading your AMX Mod X install.
|
|
||||||
*
|
|
||||||
* To override data in this file, create a subdirectory named "custom" and
|
|
||||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
|
||||||
* after AMXX's own.
|
|
||||||
*
|
|
||||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)
|
|
||||||
*/
|
|
||||||
|
|
||||||
"Games"
|
|
||||||
{
|
|
||||||
"#default"
|
|
||||||
{
|
|
||||||
"Offsets"
|
|
||||||
{
|
|
||||||
"pev"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "4"
|
|
||||||
}
|
|
||||||
|
|
||||||
"base"
|
|
||||||
{
|
|
||||||
"windows" "0x0"
|
|
||||||
"linux" "0x0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"spawn"
|
|
||||||
{
|
|
||||||
"windows" "0"
|
|
||||||
"linux" "0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"precache"
|
|
||||||
{
|
|
||||||
"windows" "1"
|
|
||||||
"linux" "1"
|
|
||||||
}
|
|
||||||
|
|
||||||
"keyvalue"
|
|
||||||
{
|
|
||||||
"windows" "2"
|
|
||||||
"linux" "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
"objectcaps"
|
|
||||||
{
|
|
||||||
"windows" "5"
|
|
||||||
"linux" "5"
|
|
||||||
}
|
|
||||||
|
|
||||||
"activate"
|
|
||||||
{
|
|
||||||
"windows" "6"
|
|
||||||
"linux" "6"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setobjectcollisionbox"
|
|
||||||
{
|
|
||||||
"windows" "7"
|
|
||||||
"linux" "7"
|
|
||||||
}
|
|
||||||
|
|
||||||
"classify"
|
|
||||||
{
|
|
||||||
"windows" "8"
|
|
||||||
"linux" "8"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathnotice"
|
|
||||||
{
|
|
||||||
"windows" "9"
|
|
||||||
"linux" "9"
|
|
||||||
}
|
|
||||||
|
|
||||||
"traceattack"
|
|
||||||
{
|
|
||||||
"windows" "10"
|
|
||||||
"linux" "10"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takedamage"
|
|
||||||
{
|
|
||||||
"windows" "11"
|
|
||||||
"linux" "11"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takehealth"
|
|
||||||
{
|
|
||||||
"windows" "12"
|
|
||||||
"linux" "12"
|
|
||||||
}
|
|
||||||
|
|
||||||
"killed"
|
|
||||||
{
|
|
||||||
"windows" "14"
|
|
||||||
"linux" "14"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bloodcolor"
|
|
||||||
{
|
|
||||||
"windows" "16"
|
|
||||||
"linux" "16"
|
|
||||||
}
|
|
||||||
|
|
||||||
"tracebleed"
|
|
||||||
{
|
|
||||||
"windows" "17"
|
|
||||||
"linux" "17"
|
|
||||||
}
|
|
||||||
|
|
||||||
"istriggered"
|
|
||||||
{
|
|
||||||
"windows" "18"
|
|
||||||
"linux" "18"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mymonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "19"
|
|
||||||
"linux" "19"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mysquadmonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "20"
|
|
||||||
"linux" "20"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gettogglestate"
|
|
||||||
{
|
|
||||||
"windows" "21"
|
|
||||||
"linux" "21"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpoints"
|
|
||||||
{
|
|
||||||
"windows" "22"
|
|
||||||
"linux" "22"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpointstoteam"
|
|
||||||
{
|
|
||||||
"windows" "23"
|
|
||||||
"linux" "23"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "24"
|
|
||||||
"linux" "24"
|
|
||||||
}
|
|
||||||
|
|
||||||
"removeplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "25"
|
|
||||||
"linux" "25"
|
|
||||||
}
|
|
||||||
|
|
||||||
"giveammo"
|
|
||||||
{
|
|
||||||
"windows" "26"
|
|
||||||
"linux" "26"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdelay"
|
|
||||||
{
|
|
||||||
"windows" "27"
|
|
||||||
"linux" "27"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ismoving"
|
|
||||||
{
|
|
||||||
"windows" "28"
|
|
||||||
"linux" "28"
|
|
||||||
}
|
|
||||||
|
|
||||||
"overridereset"
|
|
||||||
{
|
|
||||||
"windows" "29"
|
|
||||||
"linux" "29"
|
|
||||||
}
|
|
||||||
|
|
||||||
"damagedecal"
|
|
||||||
{
|
|
||||||
"windows" "30"
|
|
||||||
"linux" "30"
|
|
||||||
}
|
|
||||||
|
|
||||||
"settogglestate"
|
|
||||||
{
|
|
||||||
"windows" "31"
|
|
||||||
"linux" "31"
|
|
||||||
}
|
|
||||||
|
|
||||||
"startsneaking"
|
|
||||||
{
|
|
||||||
"windows" "32"
|
|
||||||
"linux" "32"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopsneaking"
|
|
||||||
{
|
|
||||||
"windows" "33"
|
|
||||||
"linux" "33"
|
|
||||||
}
|
|
||||||
|
|
||||||
"oncontrols"
|
|
||||||
{
|
|
||||||
"windows" "34"
|
|
||||||
"linux" "34"
|
|
||||||
}
|
|
||||||
|
|
||||||
"issneaking"
|
|
||||||
{
|
|
||||||
"windows" "35"
|
|
||||||
"linux" "35"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isalive"
|
|
||||||
{
|
|
||||||
"windows" "36"
|
|
||||||
"linux" "36"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isbspmodel"
|
|
||||||
{
|
|
||||||
"windows" "37"
|
|
||||||
"linux" "37"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reflectgauss"
|
|
||||||
{
|
|
||||||
"windows" "38"
|
|
||||||
"linux" "38"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hastarget"
|
|
||||||
{
|
|
||||||
"windows" "39"
|
|
||||||
"linux" "39"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isinworld"
|
|
||||||
{
|
|
||||||
"windows" "40"
|
|
||||||
"linux" "40"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isplayer"
|
|
||||||
{
|
|
||||||
"windows" "41"
|
|
||||||
"linux" "41"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isnetclient"
|
|
||||||
{
|
|
||||||
"windows" "42"
|
|
||||||
"linux" "42"
|
|
||||||
}
|
|
||||||
|
|
||||||
"teamid"
|
|
||||||
{
|
|
||||||
"windows" "43"
|
|
||||||
"linux" "43"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getnexttarget"
|
|
||||||
{
|
|
||||||
"windows" "46"
|
|
||||||
"linux" "46"
|
|
||||||
}
|
|
||||||
|
|
||||||
"think"
|
|
||||||
{
|
|
||||||
"windows" "47"
|
|
||||||
"linux" "47"
|
|
||||||
}
|
|
||||||
|
|
||||||
"touch"
|
|
||||||
{
|
|
||||||
"windows" "48"
|
|
||||||
"linux" "48"
|
|
||||||
}
|
|
||||||
|
|
||||||
"use"
|
|
||||||
{
|
|
||||||
"windows" "49"
|
|
||||||
"linux" "49"
|
|
||||||
}
|
|
||||||
|
|
||||||
"blocked"
|
|
||||||
{
|
|
||||||
"windows" "50"
|
|
||||||
"linux" "50"
|
|
||||||
}
|
|
||||||
|
|
||||||
"respawn"
|
|
||||||
{
|
|
||||||
"windows" "52"
|
|
||||||
"linux" "52"
|
|
||||||
}
|
|
||||||
|
|
||||||
"updateowner"
|
|
||||||
{
|
|
||||||
"windows" "53"
|
|
||||||
"linux" "53"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fbecomeprone"
|
|
||||||
{
|
|
||||||
"windows" "54"
|
|
||||||
"linux" "54"
|
|
||||||
}
|
|
||||||
|
|
||||||
"center"
|
|
||||||
{
|
|
||||||
"windows" "55"
|
|
||||||
"linux" "55"
|
|
||||||
}
|
|
||||||
|
|
||||||
"eyeposition"
|
|
||||||
{
|
|
||||||
"windows" "56"
|
|
||||||
"linux" "56"
|
|
||||||
}
|
|
||||||
|
|
||||||
"earposition"
|
|
||||||
{
|
|
||||||
"windows" "57"
|
|
||||||
"linux" "57"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bodytarget"
|
|
||||||
{
|
|
||||||
"windows" "58"
|
|
||||||
"linux" "58"
|
|
||||||
}
|
|
||||||
|
|
||||||
"illumination"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvisible"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecvisible"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"changeyaw"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hashumangibs"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hasaliengibs"
|
|
||||||
{
|
|
||||||
"windows" "67"
|
|
||||||
"linux" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fademonster"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gibmonster"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdeathactivity"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"becomedead"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"irelationship"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"painsound"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reportaistate"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinitdead"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"look"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bestvisibleenemy"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"finviewcone"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecinviewcone"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_jump"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_duck"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_prethink"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_postthink"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_getgunposition"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_shouldfadeondeath"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_impulsecommands"
|
|
||||||
{
|
|
||||||
"windows" "101"
|
|
||||||
"linux" "101"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "99"
|
|
||||||
"linux" "99"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addduplicate"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_candeploy"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "69"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_deploy"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_canholster"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_holster"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_preframe"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_postframe"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_drop"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_kill"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_attachtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_primaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_secondaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getweaponptr"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_itemslot"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractammo"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractclipammo"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_addweapon"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_playemptysound"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_resetemptysound"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "89"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_sendweaponanim"
|
|
||||||
{
|
|
||||||
"windows" "94"
|
|
||||||
"linux" "94"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_isusable"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_primaryattack"
|
|
||||||
{
|
|
||||||
"windows" "98"
|
|
||||||
"linux" "98"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_secondaryattack"
|
|
||||||
{
|
|
||||||
"windows" "99"
|
|
||||||
"linux" "99"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_reload"
|
|
||||||
{
|
|
||||||
"windows" "100"
|
|
||||||
"linux" "100"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_weaponidle"
|
|
||||||
{
|
|
||||||
"windows" "101"
|
|
||||||
"linux" "101"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_retireweapon"
|
|
||||||
{
|
|
||||||
"windows" "102"
|
|
||||||
"linux" "102"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_shouldweaponidle"
|
|
||||||
{
|
|
||||||
"windows" "103"
|
|
||||||
"linux" "103"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_usedecrement"
|
|
||||||
{
|
|
||||||
"windows" "104"
|
|
||||||
"linux" "104"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_getpointvalue"
|
|
||||||
{
|
|
||||||
"windows" "13"
|
|
||||||
"linux" "13"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_awardkill"
|
|
||||||
{
|
|
||||||
"windows" "15"
|
|
||||||
"linux" "15"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_resetentity"
|
|
||||||
{
|
|
||||||
"windows" "45"
|
|
||||||
"linux" "45"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_updateonremove"
|
|
||||||
{
|
|
||||||
"windows" "51"
|
|
||||||
"linux" "51"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_setbonecontroller"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_savedataforreset"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_gethull"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_getmaxwalkspeed"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_setteamid"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_geteffectiveplayerclass"
|
|
||||||
{
|
|
||||||
"windows" "91"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_getauthenticationmask"
|
|
||||||
{
|
|
||||||
"windows" "92"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_effectiveplayerclasschanged"
|
|
||||||
{
|
|
||||||
"windows" "93"
|
|
||||||
"linux" "93"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_needsteamupdate"
|
|
||||||
{
|
|
||||||
"windows" "94"
|
|
||||||
"linux" "94"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_sendteamupdate"
|
|
||||||
{
|
|
||||||
"windows" "95"
|
|
||||||
"linux" "95"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_sendweaponupdate"
|
|
||||||
{
|
|
||||||
"windows" "96"
|
|
||||||
"linux" "96"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_initplayerfromspawn"
|
|
||||||
{
|
|
||||||
"windows" "97"
|
|
||||||
"linux" "97"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_packdeadplayeritems"
|
|
||||||
{
|
|
||||||
"windows" "98"
|
|
||||||
"linux" "98"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_getanimationforactivity"
|
|
||||||
{
|
|
||||||
"windows" "100"
|
|
||||||
"linux" "100"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_startobserver"
|
|
||||||
{
|
|
||||||
"windows" "102"
|
|
||||||
"linux" "102"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_stopobserver"
|
|
||||||
{
|
|
||||||
"windows" "103"
|
|
||||||
"linux" "103"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_getadrenalinefactor"
|
|
||||||
{
|
|
||||||
"windows" "104"
|
|
||||||
"linux" "104"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_givenameditem"
|
|
||||||
{
|
|
||||||
"windows" "106"
|
|
||||||
"linux" "106"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_suicide"
|
|
||||||
{
|
|
||||||
"windows" "107"
|
|
||||||
"linux" "107"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_getcanuseweapon"
|
|
||||||
{
|
|
||||||
"windows" "108"
|
|
||||||
"linux" "108"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_getweaponprimetime"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_primeweapon"
|
|
||||||
{
|
|
||||||
"windows" "91"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_getisweaponprimed"
|
|
||||||
{
|
|
||||||
"windows" "92"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_getisweaponpriming"
|
|
||||||
{
|
|
||||||
"windows" "93"
|
|
||||||
"linux" "93"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_defaultdeploy"
|
|
||||||
{
|
|
||||||
"windows" "95"
|
|
||||||
"linux" "95"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_defaultreload"
|
|
||||||
{
|
|
||||||
"windows" "96"
|
|
||||||
"linux" "96"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ns_weapon_getdeploytime"
|
|
||||||
{
|
|
||||||
"windows" "97"
|
|
||||||
"linux" "97"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,746 +0,0 @@
|
|||||||
/**
|
|
||||||
* Do not edit this file. Any changes will be overwritten by the gamedata
|
|
||||||
* updater or by upgrading your AMX Mod X install.
|
|
||||||
*
|
|
||||||
* To override data in this file, create a subdirectory named "custom" and
|
|
||||||
* place your own gamedata file(s) inside of it. Such files will be parsed
|
|
||||||
* after AMXX's own.
|
|
||||||
*
|
|
||||||
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)
|
|
||||||
*/
|
|
||||||
|
|
||||||
"Games"
|
|
||||||
{
|
|
||||||
"#default"
|
|
||||||
{
|
|
||||||
"Offsets"
|
|
||||||
{
|
|
||||||
"pev"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "0"
|
|
||||||
}
|
|
||||||
|
|
||||||
"base"
|
|
||||||
{
|
|
||||||
"windows" "0x0"
|
|
||||||
"linux" "0x60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"spawn"
|
|
||||||
{
|
|
||||||
"windows" "7"
|
|
||||||
"linux" "9"
|
|
||||||
}
|
|
||||||
|
|
||||||
"precache"
|
|
||||||
{
|
|
||||||
"windows" "8"
|
|
||||||
"linux" "10"
|
|
||||||
}
|
|
||||||
|
|
||||||
"keyvalue"
|
|
||||||
{
|
|
||||||
"windows" "9"
|
|
||||||
"linux" "11"
|
|
||||||
}
|
|
||||||
|
|
||||||
"objectcaps"
|
|
||||||
{
|
|
||||||
"windows" "12"
|
|
||||||
"linux" "14"
|
|
||||||
}
|
|
||||||
|
|
||||||
"activate"
|
|
||||||
{
|
|
||||||
"windows" "13"
|
|
||||||
"linux" "15"
|
|
||||||
}
|
|
||||||
|
|
||||||
"setobjectcollisionbox"
|
|
||||||
{
|
|
||||||
"windows" "16"
|
|
||||||
"linux" "18"
|
|
||||||
}
|
|
||||||
|
|
||||||
"classify"
|
|
||||||
{
|
|
||||||
"windows" "17"
|
|
||||||
"linux" "19"
|
|
||||||
}
|
|
||||||
|
|
||||||
"deathnotice"
|
|
||||||
{
|
|
||||||
"windows" "18"
|
|
||||||
"linux" "20"
|
|
||||||
}
|
|
||||||
|
|
||||||
"traceattack"
|
|
||||||
{
|
|
||||||
"windows" "19"
|
|
||||||
"linux" "21"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takedamage"
|
|
||||||
{
|
|
||||||
"windows" "20"
|
|
||||||
"linux" "22"
|
|
||||||
}
|
|
||||||
|
|
||||||
"takehealth"
|
|
||||||
{
|
|
||||||
"windows" "21"
|
|
||||||
"linux" "23"
|
|
||||||
}
|
|
||||||
|
|
||||||
"killed"
|
|
||||||
{
|
|
||||||
"windows" "22"
|
|
||||||
"linux" "24"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bloodcolor"
|
|
||||||
{
|
|
||||||
"windows" "23"
|
|
||||||
"linux" "25"
|
|
||||||
}
|
|
||||||
|
|
||||||
"tracebleed"
|
|
||||||
{
|
|
||||||
"windows" "24"
|
|
||||||
"linux" "26"
|
|
||||||
}
|
|
||||||
|
|
||||||
"istriggered"
|
|
||||||
{
|
|
||||||
"windows" "25"
|
|
||||||
"linux" "27"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mymonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "26"
|
|
||||||
"linux" "28"
|
|
||||||
}
|
|
||||||
|
|
||||||
"mysquadmonsterpointer"
|
|
||||||
{
|
|
||||||
"windows" "27"
|
|
||||||
"linux" "29"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gettogglestate"
|
|
||||||
{
|
|
||||||
"windows" "28"
|
|
||||||
"linux" "30"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpoints"
|
|
||||||
{
|
|
||||||
"windows" "29"
|
|
||||||
"linux" "31"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addpointstoteam"
|
|
||||||
{
|
|
||||||
"windows" "30"
|
|
||||||
"linux" "32"
|
|
||||||
}
|
|
||||||
|
|
||||||
"addplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "31"
|
|
||||||
"linux" "33"
|
|
||||||
}
|
|
||||||
|
|
||||||
"removeplayeritem"
|
|
||||||
{
|
|
||||||
"windows" "32"
|
|
||||||
"linux" "34"
|
|
||||||
}
|
|
||||||
|
|
||||||
"giveammo"
|
|
||||||
{
|
|
||||||
"windows" "33"
|
|
||||||
"linux" "35"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdelay"
|
|
||||||
{
|
|
||||||
"windows" "34"
|
|
||||||
"linux" "36"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ismoving"
|
|
||||||
{
|
|
||||||
"windows" "35"
|
|
||||||
"linux" "37"
|
|
||||||
}
|
|
||||||
|
|
||||||
"overridereset"
|
|
||||||
{
|
|
||||||
"windows" "36"
|
|
||||||
"linux" "38"
|
|
||||||
}
|
|
||||||
|
|
||||||
"damagedecal"
|
|
||||||
{
|
|
||||||
"windows" "37"
|
|
||||||
"linux" "39"
|
|
||||||
}
|
|
||||||
|
|
||||||
"settogglestate"
|
|
||||||
{
|
|
||||||
"windows" "38"
|
|
||||||
"linux" "40"
|
|
||||||
}
|
|
||||||
|
|
||||||
"startsneaking"
|
|
||||||
{
|
|
||||||
"windows" "39"
|
|
||||||
"linux" "41"
|
|
||||||
}
|
|
||||||
|
|
||||||
"stopsneaking"
|
|
||||||
{
|
|
||||||
"windows" "40"
|
|
||||||
"linux" "42"
|
|
||||||
}
|
|
||||||
|
|
||||||
"oncontrols"
|
|
||||||
{
|
|
||||||
"windows" "41"
|
|
||||||
"linux" "43"
|
|
||||||
}
|
|
||||||
|
|
||||||
"issneaking"
|
|
||||||
{
|
|
||||||
"windows" "42"
|
|
||||||
"linux" "44"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isalive"
|
|
||||||
{
|
|
||||||
"windows" "43"
|
|
||||||
"linux" "45"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isbspmodel"
|
|
||||||
{
|
|
||||||
"windows" "44"
|
|
||||||
"linux" "46"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reflectgauss"
|
|
||||||
{
|
|
||||||
"windows" "45"
|
|
||||||
"linux" "47"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hastarget"
|
|
||||||
{
|
|
||||||
"windows" "46"
|
|
||||||
"linux" "48"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isinworld"
|
|
||||||
{
|
|
||||||
"windows" "47"
|
|
||||||
"linux" "49"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isplayer"
|
|
||||||
{
|
|
||||||
"windows" "48"
|
|
||||||
"linux" "50"
|
|
||||||
}
|
|
||||||
|
|
||||||
"isnetclient"
|
|
||||||
{
|
|
||||||
"windows" "49"
|
|
||||||
"linux" "51"
|
|
||||||
}
|
|
||||||
|
|
||||||
"teamid"
|
|
||||||
{
|
|
||||||
"windows" "50"
|
|
||||||
"linux" "52"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getnexttarget"
|
|
||||||
{
|
|
||||||
"windows" "51"
|
|
||||||
"linux" "53"
|
|
||||||
}
|
|
||||||
|
|
||||||
"think"
|
|
||||||
{
|
|
||||||
"windows" "52"
|
|
||||||
"linux" "54"
|
|
||||||
}
|
|
||||||
|
|
||||||
"touch"
|
|
||||||
{
|
|
||||||
"windows" "53"
|
|
||||||
"linux" "55"
|
|
||||||
}
|
|
||||||
|
|
||||||
"use"
|
|
||||||
{
|
|
||||||
"windows" "54"
|
|
||||||
"linux" "56"
|
|
||||||
}
|
|
||||||
|
|
||||||
"blocked"
|
|
||||||
{
|
|
||||||
"windows" "55"
|
|
||||||
"linux" "57"
|
|
||||||
}
|
|
||||||
|
|
||||||
"respawn"
|
|
||||||
{
|
|
||||||
"windows" "57"
|
|
||||||
"linux" "59"
|
|
||||||
}
|
|
||||||
|
|
||||||
"updateowner"
|
|
||||||
{
|
|
||||||
"windows" "58"
|
|
||||||
"linux" "60"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fbecomeprone"
|
|
||||||
{
|
|
||||||
"windows" "59"
|
|
||||||
"linux" "61"
|
|
||||||
}
|
|
||||||
|
|
||||||
"center"
|
|
||||||
{
|
|
||||||
"windows" "60"
|
|
||||||
"linux" "62"
|
|
||||||
}
|
|
||||||
|
|
||||||
"eyeposition"
|
|
||||||
{
|
|
||||||
"windows" "61"
|
|
||||||
"linux" "63"
|
|
||||||
}
|
|
||||||
|
|
||||||
"earposition"
|
|
||||||
{
|
|
||||||
"windows" "62"
|
|
||||||
"linux" "64"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bodytarget"
|
|
||||||
{
|
|
||||||
"windows" "63"
|
|
||||||
"linux" "65"
|
|
||||||
}
|
|
||||||
|
|
||||||
"illumination"
|
|
||||||
{
|
|
||||||
"windows" "64"
|
|
||||||
"linux" "66"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvisible"
|
|
||||||
{
|
|
||||||
"windows" "65"
|
|
||||||
"linux" "67"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecvisible"
|
|
||||||
{
|
|
||||||
"windows" "66"
|
|
||||||
"linux" "68"
|
|
||||||
}
|
|
||||||
|
|
||||||
"changeyaw"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hashumangibs"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"hasaliengibs"
|
|
||||||
{
|
|
||||||
"windows" "70"
|
|
||||||
"linux" "72"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fademonster"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"gibmonster"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"getdeathactivity"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"becomedead"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"irelationship"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"painsound"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"reportaistate"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"monsterinitdead"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"look"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"bestvisibleenemy"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"finviewcone"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"fvecinviewcone"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_jump"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_duck"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_prethink"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_postthink"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "89"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_getgunposition"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_shouldfadeondeath"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_impulsecommands"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"player_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "68"
|
|
||||||
"linux" "70"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_addduplicate"
|
|
||||||
{
|
|
||||||
"windows" "69"
|
|
||||||
"linux" "71"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_candeploy"
|
|
||||||
{
|
|
||||||
"windows" "71"
|
|
||||||
"linux" "73"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_deploy"
|
|
||||||
{
|
|
||||||
"windows" "72"
|
|
||||||
"linux" "74"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_canholster"
|
|
||||||
{
|
|
||||||
"windows" "73"
|
|
||||||
"linux" "75"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_holster"
|
|
||||||
{
|
|
||||||
"windows" "74"
|
|
||||||
"linux" "76"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateiteminfo"
|
|
||||||
{
|
|
||||||
"windows" "75"
|
|
||||||
"linux" "77"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_preframe"
|
|
||||||
{
|
|
||||||
"windows" "76"
|
|
||||||
"linux" "78"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_postframe"
|
|
||||||
{
|
|
||||||
"windows" "77"
|
|
||||||
"linux" "79"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_drop"
|
|
||||||
{
|
|
||||||
"windows" "78"
|
|
||||||
"linux" "80"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_kill"
|
|
||||||
{
|
|
||||||
"windows" "79"
|
|
||||||
"linux" "81"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_attachtoplayer"
|
|
||||||
{
|
|
||||||
"windows" "80"
|
|
||||||
"linux" "82"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_primaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "81"
|
|
||||||
"linux" "83"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_secondaryammoindex"
|
|
||||||
{
|
|
||||||
"windows" "82"
|
|
||||||
"linux" "84"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_updateclientdata"
|
|
||||||
{
|
|
||||||
"windows" "83"
|
|
||||||
"linux" "85"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_getweaponptr"
|
|
||||||
{
|
|
||||||
"windows" "84"
|
|
||||||
"linux" "86"
|
|
||||||
}
|
|
||||||
|
|
||||||
"item_itemslot"
|
|
||||||
{
|
|
||||||
"windows" "85"
|
|
||||||
"linux" "87"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractammo"
|
|
||||||
{
|
|
||||||
"windows" "86"
|
|
||||||
"linux" "88"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_extractclipammo"
|
|
||||||
{
|
|
||||||
"windows" "87"
|
|
||||||
"linux" "89"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_addweapon"
|
|
||||||
{
|
|
||||||
"windows" "88"
|
|
||||||
"linux" "90"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_playemptysound"
|
|
||||||
{
|
|
||||||
"windows" "89"
|
|
||||||
"linux" "91"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_resetemptysound"
|
|
||||||
{
|
|
||||||
"windows" "90"
|
|
||||||
"linux" "92"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_sendweaponanim"
|
|
||||||
{
|
|
||||||
"windows" "91"
|
|
||||||
"linux" "93"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_isusable"
|
|
||||||
{
|
|
||||||
"windows" "92"
|
|
||||||
"linux" "94"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_primaryattack"
|
|
||||||
{
|
|
||||||
"windows" "93"
|
|
||||||
"linux" "95"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_secondaryattack"
|
|
||||||
{
|
|
||||||
"windows" "94"
|
|
||||||
"linux" "96"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_reload"
|
|
||||||
{
|
|
||||||
"windows" "96"
|
|
||||||
"linux" "98"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_weaponidle"
|
|
||||||
{
|
|
||||||
"windows" "97"
|
|
||||||
"linux" "99"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_retireweapon"
|
|
||||||
{
|
|
||||||
"windows" "98"
|
|
||||||
"linux" "100"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_shouldweaponidle"
|
|
||||||
{
|
|
||||||
"windows" "99"
|
|
||||||
"linux" "101"
|
|
||||||
}
|
|
||||||
|
|
||||||
"weapon_usedecrement"
|
|
||||||
{
|
|
||||||
"windows" "100"
|
|
||||||
"linux" "102"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_breakablerespawn"
|
|
||||||
{
|
|
||||||
"windows" "0"
|
|
||||||
"linux" "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_canusedthroughwalls"
|
|
||||||
{
|
|
||||||
"windows" "1"
|
|
||||||
"linux" "3"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_giveslowmul"
|
|
||||||
{
|
|
||||||
"windows" "2"
|
|
||||||
"linux" "4"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_goslow"
|
|
||||||
{
|
|
||||||
"windows" "3"
|
|
||||||
"linux" "5"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_inslow"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "6"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_isobjective"
|
|
||||||
{
|
|
||||||
"windows" "5"
|
|
||||||
"linux" "7"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_enableobjective"
|
|
||||||
{
|
|
||||||
"windows" "6"
|
|
||||||
"linux" "8"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_onfreeentprivatedata"
|
|
||||||
{
|
|
||||||
"windows" "10"
|
|
||||||
"linux" "12"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_shouldcollide"
|
|
||||||
{
|
|
||||||
"windows" "11"
|
|
||||||
"linux" "13"
|
|
||||||
}
|
|
||||||
|
|
||||||
"ts_weapon_alternateattack"
|
|
||||||
{
|
|
||||||
"windows" "95"
|
|
||||||
"linux" "97"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -110,6 +110,7 @@ Section "MainSection" SEC01
|
|||||||
File "installer\files\base\addons\amxmodx\configs\core.ini"
|
File "installer\files\base\addons\amxmodx\configs\core.ini"
|
||||||
File "installer\files\base\addons\amxmodx\configs\custommenuitems.cfg"
|
File "installer\files\base\addons\amxmodx\configs\custommenuitems.cfg"
|
||||||
File "installer\files\base\addons\amxmodx\configs\cvars.ini"
|
File "installer\files\base\addons\amxmodx\configs\cvars.ini"
|
||||||
|
File "installer\files\base\addons\amxmodx\configs\hamdata.ini"
|
||||||
File "installer\files\base\addons\amxmodx\configs\maps.ini"
|
File "installer\files\base\addons\amxmodx\configs\maps.ini"
|
||||||
File "installer\files\base\addons\amxmodx\configs\modules.ini"
|
File "installer\files\base\addons\amxmodx\configs\modules.ini"
|
||||||
File "installer\files\base\addons\amxmodx\configs\plugins.ini"
|
File "installer\files\base\addons\amxmodx\configs\plugins.ini"
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'csx')
|
binary = AMXX.MetaModule(builder, 'csx')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../../public/sdk/amxxmodule.cpp',
|
'../../../public/sdk/amxxmodule.cpp',
|
||||||
'CRank.cpp',
|
'CRank.cpp',
|
||||||
|
@ -127,11 +127,11 @@ void CPlayer::Connect(const char* address ){
|
|||||||
|
|
||||||
void CPlayer::restartStats(bool all)
|
void CPlayer::restartStats(bool all)
|
||||||
{
|
{
|
||||||
if ( all ) memset(&weapons,0,sizeof(weapons));
|
if ( all ) memset(weapons,0,sizeof(weapons));
|
||||||
memset(&weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
|
memset(weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
|
||||||
memset(&attackers,0,sizeof(attackers));
|
memset(attackers,0,sizeof(attackers));
|
||||||
memset(&victims,0,sizeof(victims));
|
memset(victims,0,sizeof(victims));
|
||||||
life = {};
|
memset(&life,0,sizeof(life));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Init( int pi, edict_t* pe )
|
void CPlayer::Init( int pi, edict_t* pe )
|
||||||
|
@ -229,8 +229,8 @@ void ListboxItemSelected(HWND hDlg) {
|
|||||||
// Retrieve complete stats record of this position. Position in listbox should be same as rank in our records!
|
// Retrieve complete stats record of this position. Position in listbox should be same as rank in our records!
|
||||||
RankSystem::RankStats* stats = g_rank.findEntryInRankByPos((int)nItem + 1);
|
RankSystem::RankStats* stats = g_rank.findEntryInRankByPos((int)nItem + 1);
|
||||||
if (stats == NULL) {
|
if (stats == NULL) {
|
||||||
char msg[512];
|
char msg[] = "Error: Couldn't find the record by position! (nItem = %d)";
|
||||||
sprintf(msg, "Error: Couldn't find the record by position! (nItem = %d)", nItem);
|
sprintf(msg, msg, nItem);
|
||||||
MessageBox(hDlg, msg, "Oh fiddlesticks!", MB_OK);
|
MessageBox(hDlg, msg, "Oh fiddlesticks!", MB_OK);
|
||||||
ClearStatsfields(hDlg);
|
ClearStatsfields(hDlg);
|
||||||
return;
|
return;
|
||||||
|
@ -307,10 +307,10 @@ static cell AMX_NATIVE_CALL custom_wpn_dmg(AMX *amx, cell *params){ // wid,att,v
|
|||||||
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
|
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
|
||||||
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
|
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
|
||||||
|
|
||||||
if ( !pAtt ) pAtt = pVic;
|
|
||||||
pVic->pEdict->v.dmg_inflictor = NULL;
|
pVic->pEdict->v.dmg_inflictor = NULL;
|
||||||
pAtt->saveHit( pVic , weapon , dmg, aim );
|
pAtt->saveHit( pVic , weapon , dmg, aim );
|
||||||
|
|
||||||
|
if ( !pAtt ) pAtt = pVic;
|
||||||
int TA = 0;
|
int TA = 0;
|
||||||
if ( (pVic->teamId == pAtt->teamId) && ( pVic != pAtt) )
|
if ( (pVic->teamId == pAtt->teamId) && ( pVic != pAtt) )
|
||||||
TA = 1;
|
TA = 1;
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'dodfun')
|
binary = AMXX.MetaModule(builder, 'dodfun')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../../public/sdk/amxxmodule.cpp',
|
'../../../public/sdk/amxxmodule.cpp',
|
||||||
'NBase.cpp',
|
'NBase.cpp',
|
||||||
|
@ -506,7 +506,7 @@ static cell AMX_NATIVE_CALL objective_set_data(AMX *amx, cell *params){ // index
|
|||||||
GET_CP_PD(pent).model_body_neutral = ivalue;
|
GET_CP_PD(pent).model_body_neutral = ivalue;
|
||||||
return 1;
|
return 1;
|
||||||
case CP_model_body_allies :
|
case CP_model_body_allies :
|
||||||
GET_CP_PD(pent).model_body_allies = ivalue;
|
GET_CP_PD(pent).model_body_axis = ivalue;
|
||||||
return 1;
|
return 1;
|
||||||
case CP_model_body_axis :
|
case CP_model_body_axis :
|
||||||
GET_CP_PD(pent).model_body_axis = ivalue;
|
GET_CP_PD(pent).model_body_axis = ivalue;
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'dodx')
|
binary = AMXX.MetaModule(builder, 'dodx')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../../public/sdk/amxxmodule.cpp',
|
'../../../public/sdk/amxxmodule.cpp',
|
||||||
'CRank.cpp',
|
'CRank.cpp',
|
||||||
|
@ -94,15 +94,15 @@ void CPlayer::restartStats(bool all)
|
|||||||
{
|
{
|
||||||
if ( all )
|
if ( all )
|
||||||
{
|
{
|
||||||
memset(&weapons,0,sizeof(weapons));
|
memset(weapons,0,sizeof(weapons));
|
||||||
memset(static_cast<void *>(&round),0,sizeof(round));
|
memset(&round,0,sizeof(round));
|
||||||
memset(&weaponsRnd,0,sizeof(weaponsRnd));
|
memset(weaponsRnd,0,sizeof(weaponsRnd));
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&weaponsLife,0,sizeof(weaponsLife)); //DEC-Weapon (Round) stats
|
memset(weaponsLife,0,sizeof(weaponsLife)); //DEC-Weapon (Round) stats
|
||||||
memset(&attackers,0,sizeof(attackers));
|
memset(attackers,0,sizeof(attackers));
|
||||||
memset(&victims,0,sizeof(victims));
|
memset(victims,0,sizeof(victims));
|
||||||
life = {};
|
memset(&life,0,sizeof(life));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Init( int pi, edict_t* pe )
|
void CPlayer::Init( int pi, edict_t* pe )
|
||||||
@ -434,7 +434,7 @@ void CPlayer::WeaponsCheck(int weapons)
|
|||||||
int old;
|
int old;
|
||||||
int cur;
|
int cur;
|
||||||
|
|
||||||
for(int i = 1; i < DODMAX_WEAPONS; ++i)
|
for(int i = 1; i < MAX_WEAPONS; ++i)
|
||||||
{
|
{
|
||||||
// Check to see we are not talking about a grenade and we have changed
|
// Check to see we are not talking about a grenade and we have changed
|
||||||
if(i != 13 && i != 14 && i != 15 && i != 16 && i != 36)
|
if(i != 13 && i != 14 && i != 15 && i != 16 && i != 36)
|
||||||
|
@ -263,7 +263,7 @@ static cell AMX_NATIVE_CALL dod_weapon_type(AMX *amx, cell *params) /* 2 params
|
|||||||
{
|
{
|
||||||
int weaponsbit = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element
|
int weaponsbit = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element
|
||||||
|
|
||||||
for(int x = 1; x < DODMAX_WEAPONS; ++x)
|
for(int x = 1; x < MAX_WEAPONS; ++x)
|
||||||
{
|
{
|
||||||
if((weaponsbit&(1<<x)) > 0)
|
if((weaponsbit&(1<<x)) > 0)
|
||||||
{
|
{
|
||||||
@ -387,12 +387,12 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params)
|
|||||||
|
|
||||||
pVic->pEdict->v.dmg_inflictor = NULL;
|
pVic->pEdict->v.dmg_inflictor = NULL;
|
||||||
|
|
||||||
if(!pAtt)
|
|
||||||
pAtt = pVic;
|
|
||||||
|
|
||||||
if(pAtt->index != pVic->index)
|
if(pAtt->index != pVic->index)
|
||||||
pAtt->saveHit(pVic , weapon , dmg, aim);
|
pAtt->saveHit(pVic , weapon , dmg, aim);
|
||||||
|
|
||||||
|
if(!pAtt)
|
||||||
|
pAtt = pVic;
|
||||||
|
|
||||||
int TA = 0;
|
int TA = 0;
|
||||||
|
|
||||||
if((pVic->pEdict->v.team == pAtt->pEdict->v.team) && (pVic != pAtt))
|
if((pVic->pEdict->v.team == pAtt->pEdict->v.team) && (pVic != pAtt))
|
||||||
|
@ -172,8 +172,8 @@ void PlayerPreThink_Post(edict_t *pEntity)
|
|||||||
if(pPlayer->clearRound && pPlayer->clearRound < gpGlobals->time)
|
if(pPlayer->clearRound && pPlayer->clearRound < gpGlobals->time)
|
||||||
{
|
{
|
||||||
pPlayer->clearRound = 0.0f;
|
pPlayer->clearRound = 0.0f;
|
||||||
memset(static_cast<void *>(&pPlayer->round),0,sizeof(pPlayer->round));
|
memset(&pPlayer->round,0,sizeof(pPlayer->round));
|
||||||
memset(&pPlayer->weaponsRnd,0,sizeof(pPlayer->weaponsRnd));
|
memset(pPlayer->weaponsRnd,0,sizeof(pPlayer->weaponsRnd));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pPlayer->sendScore && pPlayer->sendScore < gpGlobals->time)
|
if (pPlayer->sendScore && pPlayer->sendScore < gpGlobals->time)
|
||||||
|
@ -222,7 +222,7 @@ void Client_AmmoX(void* mValue)
|
|||||||
case 1:
|
case 1:
|
||||||
if (!mPlayer )
|
if (!mPlayer )
|
||||||
break;
|
break;
|
||||||
for(int i = 1; i < DODMAX_WEAPONS ; ++i)
|
for(int i = 1; i < MAX_WEAPONS ; ++i)
|
||||||
{
|
{
|
||||||
if (iAmmo == weaponData[i].ammoSlot)
|
if (iAmmo == weaponData[i].ammoSlot)
|
||||||
mPlayer->weapons[i].ammo = *(int*)mValue;
|
mPlayer->weapons[i].ammo = *(int*)mValue;
|
||||||
@ -244,7 +244,7 @@ void Client_AmmoShort(void* mValue)
|
|||||||
if(!mPlayer )
|
if(!mPlayer )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for(int i = 1; i < DODMAX_WEAPONS ; ++i)
|
for(int i = 1; i < MAX_WEAPONS ; ++i)
|
||||||
{
|
{
|
||||||
if (iAmmo == weaponData[i].ammoSlot)
|
if (iAmmo == weaponData[i].ammoSlot)
|
||||||
mPlayer->weapons[i].ammo = *(int*)mValue;
|
mPlayer->weapons[i].ammo = *(int*)mValue;
|
||||||
|
@ -34,26 +34,31 @@ static cell AMX_NATIVE_CALL set_tr(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
gfm_tr->fAllSolid = *ptr;
|
gfm_tr->fAllSolid = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_StartSolid:
|
case TR_StartSolid:
|
||||||
{
|
{
|
||||||
gfm_tr->fStartSolid = *ptr;
|
gfm_tr->fStartSolid = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InOpen:
|
case TR_InOpen:
|
||||||
{
|
{
|
||||||
gfm_tr->fInOpen = *ptr;
|
gfm_tr->fInOpen = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InWater:
|
case TR_InWater:
|
||||||
{
|
{
|
||||||
gfm_tr->fInWater = *ptr;
|
gfm_tr->fInWater = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flFraction:
|
case TR_flFraction:
|
||||||
{
|
{
|
||||||
gfm_tr->flFraction = amx_ctof(*ptr);
|
gfm_tr->flFraction = amx_ctof(*ptr);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecEndPos:
|
case TR_vecEndPos:
|
||||||
{
|
{
|
||||||
@ -61,11 +66,13 @@ static cell AMX_NATIVE_CALL set_tr(AMX *amx, cell *params)
|
|||||||
gfm_tr->vecEndPos.y = amx_ctof(ptr[1]);
|
gfm_tr->vecEndPos.y = amx_ctof(ptr[1]);
|
||||||
gfm_tr->vecEndPos.z = amx_ctof(ptr[2]);
|
gfm_tr->vecEndPos.z = amx_ctof(ptr[2]);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flPlaneDist:
|
case TR_flPlaneDist:
|
||||||
{
|
{
|
||||||
gfm_tr->flPlaneDist = amx_ctof(*ptr);
|
gfm_tr->flPlaneDist = amx_ctof(*ptr);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecPlaneNormal:
|
case TR_vecPlaneNormal:
|
||||||
{
|
{
|
||||||
@ -73,6 +80,7 @@ static cell AMX_NATIVE_CALL set_tr(AMX *amx, cell *params)
|
|||||||
gfm_tr->vecPlaneNormal.y = amx_ctof(ptr[1]);
|
gfm_tr->vecPlaneNormal.y = amx_ctof(ptr[1]);
|
||||||
gfm_tr->vecPlaneNormal.z = amx_ctof(ptr[2]);
|
gfm_tr->vecPlaneNormal.z = amx_ctof(ptr[2]);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
@ -88,12 +96,14 @@ static cell AMX_NATIVE_CALL set_tr(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
gfm_tr->iHitgroup = *ptr;
|
gfm_tr->iHitgroup = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
default:
|
||||||
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_tr(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_tr(AMX *amx, cell *params)
|
||||||
@ -106,24 +116,29 @@ static cell AMX_NATIVE_CALL get_tr(AMX *amx, cell *params)
|
|||||||
case TR_AllSolid:
|
case TR_AllSolid:
|
||||||
{
|
{
|
||||||
return gfm_tr->fAllSolid;
|
return gfm_tr->fAllSolid;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_StartSolid:
|
case TR_StartSolid:
|
||||||
{
|
{
|
||||||
return gfm_tr->fStartSolid;
|
return gfm_tr->fStartSolid;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InOpen:
|
case TR_InOpen:
|
||||||
{
|
{
|
||||||
return gfm_tr->fInOpen;
|
return gfm_tr->fInOpen;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InWater:
|
case TR_InWater:
|
||||||
{
|
{
|
||||||
return gfm_tr->fInWater;
|
return gfm_tr->fInWater;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flFraction:
|
case TR_flFraction:
|
||||||
{
|
{
|
||||||
ptr = MF_GetAmxAddr(amx, params[2]);
|
ptr = MF_GetAmxAddr(amx, params[2]);
|
||||||
*ptr = amx_ftoc(gfm_tr->flFraction);
|
*ptr = amx_ftoc(gfm_tr->flFraction);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecEndPos:
|
case TR_vecEndPos:
|
||||||
{
|
{
|
||||||
@ -132,12 +147,14 @@ static cell AMX_NATIVE_CALL get_tr(AMX *amx, cell *params)
|
|||||||
ptr[1] = amx_ftoc(gfm_tr->vecEndPos.y);
|
ptr[1] = amx_ftoc(gfm_tr->vecEndPos.y);
|
||||||
ptr[2] = amx_ftoc(gfm_tr->vecEndPos.z);
|
ptr[2] = amx_ftoc(gfm_tr->vecEndPos.z);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flPlaneDist:
|
case TR_flPlaneDist:
|
||||||
{
|
{
|
||||||
ptr = MF_GetAmxAddr(amx, params[2]);
|
ptr = MF_GetAmxAddr(amx, params[2]);
|
||||||
*ptr = amx_ftoc(gfm_tr->flPlaneDist);
|
*ptr = amx_ftoc(gfm_tr->flPlaneDist);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecPlaneNormal:
|
case TR_vecPlaneNormal:
|
||||||
{
|
{
|
||||||
@ -146,21 +163,26 @@ static cell AMX_NATIVE_CALL get_tr(AMX *amx, cell *params)
|
|||||||
ptr[1] = amx_ftoc(gfm_tr->vecPlaneNormal.y);
|
ptr[1] = amx_ftoc(gfm_tr->vecPlaneNormal.y);
|
||||||
ptr[2] = amx_ftoc(gfm_tr->vecPlaneNormal.z);
|
ptr[2] = amx_ftoc(gfm_tr->vecPlaneNormal.z);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
if (FNullEnt(gfm_tr->pHit))
|
if (FNullEnt(gfm_tr->pHit))
|
||||||
return -1;
|
return -1;
|
||||||
return ENTINDEX(gfm_tr->pHit);
|
return ENTINDEX(gfm_tr->pHit);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_iHitgroup:
|
case TR_iHitgroup:
|
||||||
{
|
{
|
||||||
return gfm_tr->iHitgroup;
|
return gfm_tr->iHitgroup;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
default:
|
||||||
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AMX_NATIVE_INFO tr_Natives[] =
|
AMX_NATIVE_INFO tr_Natives[] =
|
||||||
|
@ -48,26 +48,31 @@ static cell AMX_NATIVE_CALL set_tr2(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
tr->fAllSolid = *ptr;
|
tr->fAllSolid = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InOpen:
|
case TR_InOpen:
|
||||||
{
|
{
|
||||||
tr->fInOpen = *ptr;
|
tr->fInOpen = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_StartSolid:
|
case TR_StartSolid:
|
||||||
{
|
{
|
||||||
tr->fStartSolid = *ptr;
|
tr->fStartSolid = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InWater:
|
case TR_InWater:
|
||||||
{
|
{
|
||||||
tr->fInWater = *ptr;
|
tr->fInWater = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flFraction:
|
case TR_flFraction:
|
||||||
{
|
{
|
||||||
tr->flFraction = amx_ctof(*ptr);
|
tr->flFraction = amx_ctof(*ptr);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecEndPos:
|
case TR_vecEndPos:
|
||||||
{
|
{
|
||||||
@ -75,11 +80,13 @@ static cell AMX_NATIVE_CALL set_tr2(AMX *amx, cell *params)
|
|||||||
tr->vecEndPos.y = amx_ctof(ptr[1]);
|
tr->vecEndPos.y = amx_ctof(ptr[1]);
|
||||||
tr->vecEndPos.z = amx_ctof(ptr[2]);
|
tr->vecEndPos.z = amx_ctof(ptr[2]);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flPlaneDist:
|
case TR_flPlaneDist:
|
||||||
{
|
{
|
||||||
tr->flPlaneDist = amx_ctof(*ptr);
|
tr->flPlaneDist = amx_ctof(*ptr);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecPlaneNormal:
|
case TR_vecPlaneNormal:
|
||||||
{
|
{
|
||||||
@ -87,6 +94,7 @@ static cell AMX_NATIVE_CALL set_tr2(AMX *amx, cell *params)
|
|||||||
tr->vecPlaneNormal.y = amx_ctof(ptr[1]);
|
tr->vecPlaneNormal.y = amx_ctof(ptr[1]);
|
||||||
tr->vecPlaneNormal.z = amx_ctof(ptr[2]);
|
tr->vecPlaneNormal.z = amx_ctof(ptr[2]);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
@ -102,10 +110,14 @@ static cell AMX_NATIVE_CALL set_tr2(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
tr->iHitgroup = *ptr;
|
tr->iHitgroup = *ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
default:
|
||||||
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -125,24 +137,29 @@ static cell AMX_NATIVE_CALL get_tr2(AMX *amx, cell *params)
|
|||||||
case TR_AllSolid:
|
case TR_AllSolid:
|
||||||
{
|
{
|
||||||
return tr->fAllSolid;
|
return tr->fAllSolid;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InOpen:
|
case TR_InOpen:
|
||||||
{
|
{
|
||||||
return tr->fInOpen;
|
return tr->fInOpen;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_StartSolid:
|
case TR_StartSolid:
|
||||||
{
|
{
|
||||||
return tr->fStartSolid;
|
return tr->fStartSolid;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_InWater:
|
case TR_InWater:
|
||||||
{
|
{
|
||||||
return tr->fInWater;
|
return tr->fInWater;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flFraction:
|
case TR_flFraction:
|
||||||
{
|
{
|
||||||
ptr = MF_GetAmxAddr(amx, params[3]);
|
ptr = MF_GetAmxAddr(amx, params[3]);
|
||||||
*ptr = amx_ftoc(tr->flFraction);
|
*ptr = amx_ftoc(tr->flFraction);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecEndPos:
|
case TR_vecEndPos:
|
||||||
{
|
{
|
||||||
@ -151,12 +168,14 @@ static cell AMX_NATIVE_CALL get_tr2(AMX *amx, cell *params)
|
|||||||
ptr[1] = amx_ftoc(tr->vecEndPos.y);
|
ptr[1] = amx_ftoc(tr->vecEndPos.y);
|
||||||
ptr[2] = amx_ftoc(tr->vecEndPos.z);
|
ptr[2] = amx_ftoc(tr->vecEndPos.z);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_flPlaneDist:
|
case TR_flPlaneDist:
|
||||||
{
|
{
|
||||||
ptr = MF_GetAmxAddr(amx, params[3]);
|
ptr = MF_GetAmxAddr(amx, params[3]);
|
||||||
*ptr = amx_ftoc(tr->flPlaneDist);
|
*ptr = amx_ftoc(tr->flPlaneDist);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_vecPlaneNormal:
|
case TR_vecPlaneNormal:
|
||||||
{
|
{
|
||||||
@ -165,20 +184,26 @@ static cell AMX_NATIVE_CALL get_tr2(AMX *amx, cell *params)
|
|||||||
ptr[1] = amx_ftoc(tr->vecPlaneNormal.y);
|
ptr[1] = amx_ftoc(tr->vecPlaneNormal.y);
|
||||||
ptr[2] = amx_ftoc(tr->vecPlaneNormal.z);
|
ptr[2] = amx_ftoc(tr->vecPlaneNormal.z);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
if (FNullEnt(tr->pHit))
|
if (FNullEnt(tr->pHit))
|
||||||
return -1;
|
return -1;
|
||||||
return ENTINDEX(tr->pHit);
|
return ENTINDEX(tr->pHit);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TR_iHitgroup:
|
case TR_iHitgroup:
|
||||||
{
|
{
|
||||||
return tr->iHitgroup;
|
return tr->iHitgroup;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
default:
|
||||||
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown TraceResult member %d", params[2]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -196,6 +221,7 @@ static cell AMX_NATIVE_CALL get_kvd(AMX *amx, cell *params)
|
|||||||
case KV_fHandled:
|
case KV_fHandled:
|
||||||
{
|
{
|
||||||
return kvd->fHandled;
|
return kvd->fHandled;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case KV_ClassName:
|
case KV_ClassName:
|
||||||
{
|
{
|
||||||
@ -206,6 +232,7 @@ static cell AMX_NATIVE_CALL get_kvd(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
cell *ptr = MF_GetAmxAddr(amx, params[4]);
|
cell *ptr = MF_GetAmxAddr(amx, params[4]);
|
||||||
return MF_SetAmxString(amx, params[3], kvd->szClassName, (int)*ptr);
|
return MF_SetAmxString(amx, params[3], kvd->szClassName, (int)*ptr);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case KV_KeyName:
|
case KV_KeyName:
|
||||||
{
|
{
|
||||||
@ -216,6 +243,7 @@ static cell AMX_NATIVE_CALL get_kvd(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
cell *ptr = MF_GetAmxAddr(amx, params[4]);
|
cell *ptr = MF_GetAmxAddr(amx, params[4]);
|
||||||
return MF_SetAmxString(amx, params[3], kvd->szKeyName, (int)*ptr);
|
return MF_SetAmxString(amx, params[3], kvd->szKeyName, (int)*ptr);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case KV_Value:
|
case KV_Value:
|
||||||
{
|
{
|
||||||
@ -226,6 +254,7 @@ static cell AMX_NATIVE_CALL get_kvd(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
cell *ptr = MF_GetAmxAddr(amx, params[4]);
|
cell *ptr = MF_GetAmxAddr(amx, params[4]);
|
||||||
return MF_SetAmxString(amx, params[3], kvd->szValue, (int)*ptr);
|
return MF_SetAmxString(amx, params[3], kvd->szValue, (int)*ptr);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,24 +301,28 @@ static cell AMX_NATIVE_CALL set_kvd(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
kvd->fHandled = (int)*ptr;
|
kvd->fHandled = (int)*ptr;
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case KV_ClassName:
|
case KV_ClassName:
|
||||||
{
|
{
|
||||||
kvdw->cls = MF_GetAmxString(amx, params[3], 0, &len);
|
kvdw->cls = MF_GetAmxString(amx, params[3], 0, &len);
|
||||||
kvd->szClassName = const_cast<char *>(kvdw->cls.chars());
|
kvd->szClassName = const_cast<char *>(kvdw->cls.chars());
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case KV_KeyName:
|
case KV_KeyName:
|
||||||
{
|
{
|
||||||
kvdw->key = MF_GetAmxString(amx, params[3], 0, &len);
|
kvdw->key = MF_GetAmxString(amx, params[3], 0, &len);
|
||||||
kvd->szKeyName = const_cast<char *>(kvdw->key.chars());
|
kvd->szKeyName = const_cast<char *>(kvdw->key.chars());
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case KV_Value:
|
case KV_Value:
|
||||||
{
|
{
|
||||||
kvdw->val = MF_GetAmxString(amx, params[3], 0, &len);
|
kvdw->val = MF_GetAmxString(amx, params[3], 0, &len);
|
||||||
kvd->szValue = const_cast<char *>(kvdw->val.chars());
|
kvd->szValue = const_cast<char *>(kvdw->val.chars());
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1077,9 +1110,9 @@ static cell AMX_NATIVE_CALL set_es(AMX *amx, cell *params)
|
|||||||
es->vuser3.z = amx_ctof(ptr[2]);
|
es->vuser3.z = amx_ctof(ptr[2]);
|
||||||
return 1;
|
return 1;
|
||||||
case ES_vUser4:
|
case ES_vUser4:
|
||||||
es->vuser4.x = amx_ctof(ptr[0]);
|
es->vuser3.x = amx_ctof(ptr[0]);
|
||||||
es->vuser4.y = amx_ctof(ptr[1]);
|
es->vuser3.y = amx_ctof(ptr[1]);
|
||||||
es->vuser4.z = amx_ctof(ptr[2]);
|
es->vuser3.z = amx_ctof(ptr[2]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1222,7 +1255,7 @@ static cell AMX_NATIVE_CALL create_tr2(AMX *amx, cell *params)
|
|||||||
tr = g_FreeTRs.front();
|
tr = g_FreeTRs.front();
|
||||||
g_FreeTRs.pop();
|
g_FreeTRs.pop();
|
||||||
}
|
}
|
||||||
memset(static_cast<void *>(tr), 0, sizeof(TraceResult));
|
memset(tr, 0, sizeof(TraceResult));
|
||||||
return reinterpret_cast<cell>(tr);
|
return reinterpret_cast<cell>(tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ static cell AMX_NATIVE_CALL fm_return(AMX *amx, cell *params)
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'fun')
|
binary = AMXX.MetaModule(builder, 'fun')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../public/sdk/amxxmodule.cpp',
|
'../../public/sdk/amxxmodule.cpp',
|
||||||
'../../public/memtools/MemoryUtils.cpp',
|
'../../public/memtools/MemoryUtils.cpp',
|
||||||
|
@ -11,46 +11,381 @@
|
|||||||
// Ham Sandwich Module
|
// Ham Sandwich Module
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <amxxmodule.h>
|
#include "amxxmodule.h"
|
||||||
|
|
||||||
#include "ham_const.h"
|
#include "ham_const.h"
|
||||||
#include "hooklist.h"
|
#include "hooklist.h"
|
||||||
#include "offsets.h"
|
#include "offsets.h"
|
||||||
|
#include <amtl/am-string.h>
|
||||||
|
|
||||||
IGameConfig *CommonConfig;
|
extern hook_t hooklist[];
|
||||||
IGameConfigManager *ConfigManager;
|
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
LEX_INVALID = 0,
|
||||||
|
|
||||||
|
LEX_UNKNOWN,
|
||||||
|
|
||||||
|
LEX_START_SEC,
|
||||||
|
LEX_END_SEC,
|
||||||
|
|
||||||
|
LEX_MIRROR,
|
||||||
|
|
||||||
|
LEX_PEV,
|
||||||
|
LEX_BASE,
|
||||||
|
|
||||||
|
LEX_END
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *tokens[] =
|
||||||
|
{
|
||||||
|
"", // LEX_INVALID
|
||||||
|
|
||||||
|
"", // LEX_UNKNOWN
|
||||||
|
|
||||||
|
"@section", // LEX_START_SEC
|
||||||
|
"@end", // LEX_END_SEC
|
||||||
|
|
||||||
|
"@mirror", // LEX_MIRROR
|
||||||
|
|
||||||
|
"pev", // LEX_PEV
|
||||||
|
"base", // LEX_BASE
|
||||||
|
|
||||||
|
"", // LEX_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static void trim_line(char *input);
|
||||||
|
static void read_mirror(char *input);
|
||||||
|
static void skip_to_end_of_section(FILE *fp);
|
||||||
|
static int lex(char*& buffer);
|
||||||
|
|
||||||
|
int lex(char*& buffer)
|
||||||
|
{
|
||||||
|
trim_line(buffer);
|
||||||
|
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
for (int i=0; i<LEX_END; i++)
|
||||||
|
{
|
||||||
|
if (tokens[i]!=NULL && *(tokens[i])!='\0')
|
||||||
|
{
|
||||||
|
len=strlen(tokens[i]);
|
||||||
|
if (strncmp(buffer,tokens[i],len)==0)
|
||||||
|
{
|
||||||
|
buffer+=len+1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LEX_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
// How we handle "mirrors"
|
||||||
|
// We just note down the current mod name, and every time
|
||||||
|
// we come across a mirror with the destination that matches
|
||||||
|
// the current mod name, we change the current mod name to
|
||||||
|
// the source for that mirror.
|
||||||
|
|
||||||
|
char CurrentModName[64];
|
||||||
|
|
||||||
|
static void read_mirror(char *input)
|
||||||
|
{
|
||||||
|
char *data=input;
|
||||||
|
char *data2;
|
||||||
|
|
||||||
|
char source[64];
|
||||||
|
char dest[64];
|
||||||
|
|
||||||
|
char old;
|
||||||
|
while ( *data!=' ' &&
|
||||||
|
*data!='\t' &&
|
||||||
|
*data!='\0')
|
||||||
|
{
|
||||||
|
|
||||||
|
data++;
|
||||||
|
}
|
||||||
|
|
||||||
|
old=*data;
|
||||||
|
*data='\0';
|
||||||
|
|
||||||
|
// mark down the source
|
||||||
|
ke::SafeSprintf(source, sizeof(source), "%s", input);
|
||||||
|
|
||||||
|
*data=old;
|
||||||
|
|
||||||
|
while ( *data==' ' ||
|
||||||
|
*data=='\t')
|
||||||
|
{
|
||||||
|
data++;
|
||||||
|
}
|
||||||
|
data2=data;
|
||||||
|
|
||||||
|
while ( *data!=' ' &&
|
||||||
|
*data!='\t' &&
|
||||||
|
*data!='\0')
|
||||||
|
{
|
||||||
|
data++;
|
||||||
|
}
|
||||||
|
old=*data;
|
||||||
|
*data='\0';
|
||||||
|
|
||||||
|
ke::SafeSprintf(dest, sizeof(dest), "%s", data2);
|
||||||
|
|
||||||
|
*data=old;
|
||||||
|
|
||||||
|
if (strcmp(dest, CurrentModName)==0)
|
||||||
|
{
|
||||||
|
ke::SafeSprintf(CurrentModName, sizeof(CurrentModName), "%s", source);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void trim_line(char *input)
|
||||||
|
{
|
||||||
|
char *oldinput=input;
|
||||||
|
char *start=input;
|
||||||
|
|
||||||
|
while ( *start==' ' ||
|
||||||
|
*start=='\t' ||
|
||||||
|
*start=='\r' ||
|
||||||
|
*start=='\n')
|
||||||
|
{
|
||||||
|
start++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Overwrite the whitespace
|
||||||
|
|
||||||
|
if (start != input)
|
||||||
|
{
|
||||||
|
while ((*input++=*start++)!='\0')
|
||||||
|
/* do nothing */ ;
|
||||||
|
}
|
||||||
|
|
||||||
|
start=oldinput;
|
||||||
|
|
||||||
|
start+=strlen(start) - 1;
|
||||||
|
|
||||||
|
while ( start >= oldinput &&
|
||||||
|
( *start == '\0' ||
|
||||||
|
*start == ' ' ||
|
||||||
|
*start == '\r' ||
|
||||||
|
*start == '\n' ||
|
||||||
|
*start == '\t'))
|
||||||
|
{
|
||||||
|
start--;
|
||||||
|
}
|
||||||
|
start++;
|
||||||
|
*start='\0';
|
||||||
|
|
||||||
|
// Now find any comments and cut off at the start
|
||||||
|
|
||||||
|
while (*start != '\0')
|
||||||
|
{
|
||||||
|
if (*start == ';')
|
||||||
|
{
|
||||||
|
*start='\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
start++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void skip_to_end_of_section(FILE *fp)
|
||||||
|
{
|
||||||
|
char buffer[1024];
|
||||||
|
|
||||||
|
while (!feof(fp))
|
||||||
|
{
|
||||||
|
buffer[0]='\0';
|
||||||
|
|
||||||
|
fgets(buffer, sizeof(buffer)-1, fp);
|
||||||
|
|
||||||
|
trim_line(buffer);
|
||||||
|
|
||||||
|
char *b=&buffer[0];
|
||||||
|
if (lex(b)==LEX_END_SEC)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static const char* get_localinfo( const char* name , const char* def = 0 )
|
||||||
|
{
|
||||||
|
const char* b = LOCALINFO( (char*)name );
|
||||||
|
if (((b==0)||(*b==0)) && def )
|
||||||
|
SET_LOCALINFO((char*)name,(char*)(b = def) );
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
int read_start_section(char *data)
|
||||||
|
{
|
||||||
|
if (strncasecmp(data, CurrentModName, strlen(CurrentModName))==0)
|
||||||
|
{
|
||||||
|
data+=strlen(CurrentModName)+1;
|
||||||
|
trim_line(data);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (strcmp(data, "windows")==0)
|
||||||
|
#elif defined(__linux__)
|
||||||
|
if (strcmp(data, "linux")==0)
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
if (strcmp(data, "mac")==0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int read_number(char *input)
|
||||||
|
{
|
||||||
|
char *end; /* Temporary pointer, needed for strtoul(). */
|
||||||
|
|
||||||
|
// if begins with 0x or 0X it's to be interpretted as hex
|
||||||
|
if (*input=='0' &&
|
||||||
|
(*(input+1)=='x' || *(input+1)=='X'))
|
||||||
|
{
|
||||||
|
return strtoul(input,&end,16);
|
||||||
|
}
|
||||||
|
|
||||||
|
// otherwise it's to be interpretted as base 10
|
||||||
|
return strtoul(input,&end,10);
|
||||||
|
}
|
||||||
|
void process_pev(char *data)
|
||||||
|
{
|
||||||
|
trim_line(data);
|
||||||
|
Offsets.SetPev(read_number(data));
|
||||||
|
}
|
||||||
|
void process_base(char *data)
|
||||||
|
{
|
||||||
|
trim_line(data);
|
||||||
|
Offsets.SetBase(read_number(data));
|
||||||
|
}
|
||||||
|
void process_key(char *data)
|
||||||
|
{
|
||||||
|
size_t size=0;
|
||||||
|
|
||||||
|
char *a=data;
|
||||||
|
|
||||||
|
while (*a != ' ' && *a != '\t' && *a != '\0')
|
||||||
|
{
|
||||||
|
a++;
|
||||||
|
size++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size==0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int set=0;
|
||||||
|
for (int i=0; i< HAM_LAST_ENTRY_DONT_USE_ME_LOL; i++)
|
||||||
|
{
|
||||||
|
if (strncmp(data, hooklist[i].name, size)==0)
|
||||||
|
{
|
||||||
|
data+=size+1;
|
||||||
|
|
||||||
|
trim_line(data);
|
||||||
|
int value=read_number(data);
|
||||||
|
|
||||||
|
hooklist[i].isset=1;
|
||||||
|
hooklist[i].vtid=value;
|
||||||
|
|
||||||
|
|
||||||
|
set=1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (set==0)
|
||||||
|
{
|
||||||
|
printf("stray key in process_key: %s\n", data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
int ReadConfig(void)
|
int ReadConfig(void)
|
||||||
{
|
{
|
||||||
ConfigManager = MF_GetConfigManager();
|
char FileName[512];
|
||||||
|
|
||||||
char error[256] = "";
|
MF_BuildPathnameR(FileName,sizeof(FileName),"%s",get_localinfo("amxx_configsdir","addons/amxmodx/configs"));
|
||||||
|
|
||||||
if (!ConfigManager->LoadGameConfigFile("common.games", &CommonConfig, error, sizeof error))
|
strncat(FileName,"/hamdata.ini",sizeof(FileName)-1);
|
||||||
|
|
||||||
|
FILE *fp=fopen(FileName,"r");
|
||||||
|
|
||||||
|
|
||||||
|
ke::SafeSprintf(CurrentModName, sizeof(CurrentModName), "%s", MF_GetModname());
|
||||||
|
|
||||||
|
if (!fp)
|
||||||
{
|
{
|
||||||
MF_Log("common.games gamedata could not be read: %s", error);
|
MF_Log("Unable to open \"%s\" for reading.", FileName);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
TypeDescription value;
|
char data[2048];
|
||||||
|
|
||||||
if (CommonConfig->GetOffset("pev", &value))
|
int insec=0;
|
||||||
|
|
||||||
|
while (!feof(fp))
|
||||||
{
|
{
|
||||||
Offsets.SetPev(value.fieldOffset);
|
data[0]='\0';
|
||||||
|
|
||||||
|
fgets(data, sizeof(data)-1, fp);
|
||||||
|
|
||||||
|
char *b=&data[0];
|
||||||
|
|
||||||
|
switch(lex(b))
|
||||||
|
{
|
||||||
|
case LEX_PEV:
|
||||||
|
{
|
||||||
|
if (insec)
|
||||||
|
{
|
||||||
|
process_pev(b);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
case LEX_BASE:
|
||||||
|
{
|
||||||
|
if (insec)
|
||||||
|
{
|
||||||
|
process_base(b);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
case LEX_MIRROR:
|
||||||
|
{
|
||||||
|
read_mirror(b);
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
case LEX_START_SEC:
|
||||||
|
{
|
||||||
|
insec=read_start_section(b);
|
||||||
|
|
||||||
|
if (!insec)
|
||||||
|
{
|
||||||
|
skip_to_end_of_section(fp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
case LEX_END_SEC:
|
||||||
|
{
|
||||||
|
insec=0;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
case LEX_UNKNOWN:
|
||||||
|
{
|
||||||
|
if (insec)
|
||||||
|
{
|
||||||
|
process_key(b);
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommonConfig->GetOffset("base", &value))
|
|
||||||
{
|
|
||||||
Offsets.SetBase(value.fieldOffset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto index = 0; index < HAM_LAST_ENTRY_DONT_USE_ME_LOL; ++index)
|
fclose(fp);
|
||||||
{
|
|
||||||
if (CommonConfig->GetOffset(hooklist[index].name, &value))
|
|
||||||
{
|
|
||||||
hooklist[index].isset = 1;
|
|
||||||
hooklist[index].vtid = value.fieldOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ enum
|
|||||||
HAM_OK = 0,
|
HAM_OK = 0,
|
||||||
|
|
||||||
HAM_INVALID_FUNC, // The function is not valid
|
HAM_INVALID_FUNC, // The function is not valid
|
||||||
HAM_FUNC_NOT_CONFIGURED, // This function is not configured in gamedata
|
HAM_FUNC_NOT_CONFIGURED, // This function is not configured in hamdata.ini
|
||||||
HAM_FUNC_NOT_AVAILABLE, // This function is not more available in the mod
|
HAM_FUNC_NOT_AVAILABLE, // This function is not more available in the mod
|
||||||
|
|
||||||
HAM_ERR_END
|
HAM_ERR_END
|
||||||
|
@ -33,7 +33,7 @@ extern HLTypeConversion TypeConversion;
|
|||||||
return 0; \
|
return 0; \
|
||||||
} else if (hooklist[x].isset == 0) { \
|
} else if (hooklist[x].isset == 0) { \
|
||||||
char msg[1024]; \
|
char msg[1024]; \
|
||||||
ke::SafeSprintf(msg, sizeof(msg), "Function %s is not configured in gamedata.", hooklist[x].name); \
|
ke::SafeSprintf(msg, sizeof(msg), "Function %s is not configured in hamdata.ini.", hooklist[x].name); \
|
||||||
FailPlugin(amx, x, HAM_FUNC_NOT_CONFIGURED, msg); \
|
FailPlugin(amx, x, HAM_FUNC_NOT_CONFIGURED, msg); \
|
||||||
return 0; \
|
return 0; \
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ extern bool gDoForwards;
|
|||||||
#define CHECK_RETURN_VEC() \
|
#define CHECK_RETURN_VEC() \
|
||||||
if (thisresult < HAM_OVERRIDE) \
|
if (thisresult < HAM_OVERRIDE) \
|
||||||
{ \
|
{ \
|
||||||
memcpy(static_cast<void *>(out), &origret, sizeof(Vector)); \
|
memcpy(out, &origret, sizeof(Vector)); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -852,8 +852,8 @@ void Hook_Vector_Float_Cbase_Int(Hook *hook, Vector *out, void *pthis, float f1,
|
|||||||
|
|
||||||
MAKE_VECTOR()
|
MAKE_VECTOR()
|
||||||
|
|
||||||
memset(static_cast<void *>(&ret), 0x0, sizeof(Vector));
|
memset(&ret, 0x0, sizeof(Vector));
|
||||||
memset(static_cast<void *>(&origret), 0x0, sizeof(Vector));
|
memset(&origret, 0x0, sizeof(Vector));
|
||||||
|
|
||||||
int iEnt = TypeConversion.cbase_to_id(cb);
|
int iEnt = TypeConversion.cbase_to_id(cb);
|
||||||
|
|
||||||
@ -879,7 +879,7 @@ void Hook_Vector_Float_Cbase_Int(Hook *hook, Vector *out, void *pthis, float f1,
|
|||||||
POP()
|
POP()
|
||||||
|
|
||||||
CHECK_RETURN_VEC()
|
CHECK_RETURN_VEC()
|
||||||
memcpy(static_cast<void *>(out), &ret, sizeof(Vector));
|
memcpy(out, &ret, sizeof(Vector));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hook_Void_Cbase_Cbase_Int_Float(Hook *hook, void *pthis, void *cb1, void *cb2, int i1, float f1)
|
void Hook_Void_Cbase_Cbase_Int_Float(Hook *hook, void *pthis, void *cb1, void *cb2, int i1, float f1)
|
||||||
@ -1038,8 +1038,8 @@ void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis)
|
|||||||
|
|
||||||
MAKE_VECTOR()
|
MAKE_VECTOR()
|
||||||
|
|
||||||
memset(static_cast<void *>(&ret), 0x0, sizeof(Vector));
|
memset(&ret, 0x0, sizeof(Vector));
|
||||||
memset(static_cast<void *>(&origret), 0x0, sizeof(Vector));
|
memset(&origret, 0x0, sizeof(Vector));
|
||||||
|
|
||||||
PRE_START()
|
PRE_START()
|
||||||
PRE_END()
|
PRE_END()
|
||||||
@ -1056,7 +1056,7 @@ void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis)
|
|||||||
KILL_VECTOR()
|
KILL_VECTOR()
|
||||||
POP()
|
POP()
|
||||||
CHECK_RETURN_VEC()
|
CHECK_RETURN_VEC()
|
||||||
memcpy(static_cast<void *>(out), &ret, sizeof(Vector));
|
memcpy(out, &ret, sizeof(Vector));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1074,8 +1074,8 @@ void Hook_Vector_pVector(Hook *hook, Vector *out, void *pthis, Vector *v1)
|
|||||||
MAKE_VECTOR()
|
MAKE_VECTOR()
|
||||||
P_PTRVECTOR(v1)
|
P_PTRVECTOR(v1)
|
||||||
|
|
||||||
memset(static_cast<void *>(&ret), 0x0, sizeof(Vector));
|
memset(&ret, 0x0, sizeof(Vector));
|
||||||
memset(static_cast<void *>(&origret), 0x0, sizeof(Vector));
|
memset(&origret, 0x0, sizeof(Vector));
|
||||||
|
|
||||||
PRE_START()
|
PRE_START()
|
||||||
, MF_PrepareCellArrayA(reinterpret_cast<cell *>(v1), 3, false)
|
, MF_PrepareCellArrayA(reinterpret_cast<cell *>(v1), 3, false)
|
||||||
@ -1094,7 +1094,7 @@ void Hook_Vector_pVector(Hook *hook, Vector *out, void *pthis, Vector *v1)
|
|||||||
KILL_VECTOR()
|
KILL_VECTOR()
|
||||||
POP()
|
POP()
|
||||||
CHECK_RETURN_VEC()
|
CHECK_RETURN_VEC()
|
||||||
memcpy(static_cast<void *>(out), &ret, sizeof(Vector));
|
memcpy(out, &ret, sizeof(Vector));
|
||||||
}
|
}
|
||||||
|
|
||||||
int Hook_Int_pVector(Hook *hook, void *pthis, Vector *v1)
|
int Hook_Int_pVector(Hook *hook, void *pthis, Vector *v1)
|
||||||
@ -1476,8 +1476,8 @@ void Hook_Vector_Float(Hook *hook, Vector *out, void *pthis, float f1)
|
|||||||
MAKE_VECTOR()
|
MAKE_VECTOR()
|
||||||
P_FLOAT(f1)
|
P_FLOAT(f1)
|
||||||
|
|
||||||
memset(static_cast<void *>(&ret), 0x0, sizeof(Vector));
|
memset(&ret, 0x0, sizeof(Vector));
|
||||||
memset(static_cast<void *>(&origret), 0x0, sizeof(Vector));
|
memset(&origret, 0x0, sizeof(Vector));
|
||||||
|
|
||||||
PRE_START()
|
PRE_START()
|
||||||
, f1
|
, f1
|
||||||
@ -1496,7 +1496,7 @@ void Hook_Vector_Float(Hook *hook, Vector *out, void *pthis, float f1)
|
|||||||
KILL_VECTOR()
|
KILL_VECTOR()
|
||||||
POP()
|
POP()
|
||||||
CHECK_RETURN_VEC()
|
CHECK_RETURN_VEC()
|
||||||
memcpy(static_cast<void *>(out), &ret, sizeof(Vector));
|
memcpy(out, &ret, sizeof(Vector));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3269,8 +3269,8 @@ void Hook_Vector_Vector_Vector_Vector(Hook *hook, Vector *out, void *pthis, Vect
|
|||||||
P_VECTOR(v2)
|
P_VECTOR(v2)
|
||||||
P_VECTOR(v3)
|
P_VECTOR(v3)
|
||||||
|
|
||||||
memset(static_cast<void *>(&ret), 0x0, sizeof(Vector));
|
memset(&ret, 0x0, sizeof(Vector));
|
||||||
memset(static_cast<void *>(&origret), 0x0, sizeof(Vector));
|
memset(&origret, 0x0, sizeof(Vector));
|
||||||
|
|
||||||
PRE_START()
|
PRE_START()
|
||||||
, MF_PrepareCellArrayA(reinterpret_cast<cell *>(&v1), 3, false)
|
, MF_PrepareCellArrayA(reinterpret_cast<cell *>(&v1), 3, false)
|
||||||
@ -3294,7 +3294,7 @@ void Hook_Vector_Vector_Vector_Vector(Hook *hook, Vector *out, void *pthis, Vect
|
|||||||
POP()
|
POP()
|
||||||
CHECK_RETURN_VEC()
|
CHECK_RETURN_VEC()
|
||||||
|
|
||||||
memcpy(static_cast<void *>(out), &ret, sizeof(Vector));
|
memcpy(out, &ret, sizeof(Vector));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Hook_Str_Str(Hook *hook, void *pthis, const char* str)
|
const char *Hook_Str_Str(Hook *hook, void *pthis, const char* str)
|
||||||
|
@ -17,18 +17,18 @@ if AMXX.mysql_path:
|
|||||||
|
|
||||||
binary.sources = []
|
binary.sources = []
|
||||||
|
|
||||||
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
|
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
||||||
binary.compiler.defines += ['stricmp=strcasecmp']
|
binary.compiler.defines += ['stricmp=strcasecmp']
|
||||||
binary.compiler.linkflags += [
|
binary.compiler.linkflags += [
|
||||||
os.path.join(AMXX.mysql_path, 'lib', 'libmysqlclient_r.a'),
|
os.path.join(AMXX.mysql_path, 'lib', 'libmysqlclient_r.a'),
|
||||||
'-lpthread',
|
'-lpthread',
|
||||||
'-lm',
|
'-lm',
|
||||||
]
|
]
|
||||||
if builder.target_platform == 'linux':
|
if builder.target_platform is 'linux':
|
||||||
binary.compiler.linkflags += [
|
binary.compiler.linkflags += [
|
||||||
'-lrt'
|
'-lrt'
|
||||||
]
|
]
|
||||||
elif builder.target_platform == 'windows':
|
elif builder.target_platform is 'windows':
|
||||||
binary.compiler.linkflags += [
|
binary.compiler.linkflags += [
|
||||||
os.path.join(AMXX.mysql_path, 'lib', 'mysqlclient.lib'),
|
os.path.join(AMXX.mysql_path, 'lib', 'mysqlclient.lib'),
|
||||||
'ws2_32.lib',
|
'ws2_32.lib',
|
||||||
|
@ -277,6 +277,7 @@ static cell AMX_NATIVE_CALL SQL_ReadResult(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
int num = row->GetInt(col);
|
int num = row->GetInt(col);
|
||||||
return num;
|
return num;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
@ -247,6 +247,7 @@ static cell AMX_NATIVE_CALL dbi_field(AMX *amx, cell *params)
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
return atoi(data);
|
return atoi(data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
@ -254,10 +255,12 @@ static cell AMX_NATIVE_CALL dbi_field(AMX *amx, cell *params)
|
|||||||
REAL fdata = atof(data);
|
REAL fdata = atof(data);
|
||||||
*destaddr = amx_ftoc(fdata);
|
*destaddr = amx_ftoc(fdata);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
return MF_SetAmxString(amx, params[3], data, params[4]);
|
return MF_SetAmxString(amx, params[3], data, params[4]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,6 +315,7 @@ static cell AMX_NATIVE_CALL dbi_result(AMX *amx, cell *params)
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
return atoi(data);
|
return atoi(data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
@ -319,10 +323,12 @@ static cell AMX_NATIVE_CALL dbi_result(AMX *amx, cell *params)
|
|||||||
REAL fdata = atof(data);
|
REAL fdata = atof(data);
|
||||||
*destaddr = amx_ftoc(fdata);
|
*destaddr = amx_ftoc(fdata);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
return MF_SetAmxString(amx, params[3], data, params[4]);
|
return MF_SetAmxString(amx, params[3], data, params[4]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ void MysqlThread::RunThread(IThreadHandle *pHandle)
|
|||||||
|
|
||||||
float save_time = m_qrInfo.queue_time;
|
float save_time = m_qrInfo.queue_time;
|
||||||
|
|
||||||
memset(static_cast<void *>(&m_qrInfo), 0, sizeof(m_qrInfo));
|
memset(&m_qrInfo, 0, sizeof(m_qrInfo));
|
||||||
|
|
||||||
m_qrInfo.queue_time = save_time;
|
m_qrInfo.queue_time = save_time;
|
||||||
|
|
||||||
|
@ -115,17 +115,20 @@ static cell nvault_get(AMX *amx, cell *params)
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
return atoi(val);
|
return atoi(val);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
cell *fAddr = MF_GetAmxAddr(amx, params[3]);
|
cell *fAddr = MF_GetAmxAddr(amx, params[3]);
|
||||||
*fAddr = amx_ftoc((REAL)atof(val));
|
*fAddr = amx_ftoc((REAL)atof(val));
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
len = *(MF_GetAmxAddr(amx, params[4]));
|
len = *(MF_GetAmxAddr(amx, params[4]));
|
||||||
return MF_SetAmxString(amx, params[3], val, len);
|
return MF_SetAmxString(amx, params[3], val, len);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,7 +654,7 @@ int RegEx::Replace(char *text, size_t textMaxLen, const char *replace, size_t re
|
|||||||
* $nn or ${nn}
|
* $nn or ${nn}
|
||||||
* ^ ^
|
* ^ ^
|
||||||
*/
|
*/
|
||||||
if (*walk >= '0' && *walk <= '9')
|
if (*walk && *walk >= '0' && *walk <= '9')
|
||||||
{
|
{
|
||||||
backref = backref * 10 + *walk - '0';
|
backref = backref * 10 + *walk - '0';
|
||||||
++walk;
|
++walk;
|
||||||
|
@ -12,7 +12,7 @@ binary.compiler.defines += [
|
|||||||
'HAVE_STDINT_H',
|
'HAVE_STDINT_H',
|
||||||
]
|
]
|
||||||
|
|
||||||
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
|
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
||||||
binary.compiler.defines += ['stricmp=strcasecmp']
|
binary.compiler.defines += ['stricmp=strcasecmp']
|
||||||
binary.compiler.postlink += ['-lpthread']
|
binary.compiler.postlink += ['-lpthread']
|
||||||
|
|
||||||
|
@ -273,6 +273,7 @@ static cell AMX_NATIVE_CALL SQL_ReadResult(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
int num = row->GetInt(col);
|
int num = row->GetInt(col);
|
||||||
return num;
|
return num;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
@ -245,6 +245,7 @@ static cell AMX_NATIVE_CALL dbi_field(AMX *amx, cell *params)
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
return atoi(data);
|
return atoi(data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
@ -252,10 +253,12 @@ static cell AMX_NATIVE_CALL dbi_field(AMX *amx, cell *params)
|
|||||||
REAL fdata = atof(data);
|
REAL fdata = atof(data);
|
||||||
*destaddr = amx_ftoc(fdata);
|
*destaddr = amx_ftoc(fdata);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
return MF_SetAmxString(amx, params[3], data, params[4]);
|
return MF_SetAmxString(amx, params[3], data, params[4]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +309,7 @@ static cell AMX_NATIVE_CALL dbi_result(AMX *amx, cell *params)
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
return atoi(data);
|
return atoi(data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
@ -313,10 +317,12 @@ static cell AMX_NATIVE_CALL dbi_result(AMX *amx, cell *params)
|
|||||||
REAL fdata = atof(data);
|
REAL fdata = atof(data);
|
||||||
*destaddr = amx_ftoc(fdata);
|
*destaddr = amx_ftoc(fdata);
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
return MF_SetAmxString(amx, params[3], data, params[4]);
|
return MF_SetAmxString(amx, params[3], data, params[4]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ void MysqlThread::RunThread(IThreadHandle *pHandle)
|
|||||||
|
|
||||||
float save_time = m_qrInfo.queue_time;
|
float save_time = m_qrInfo.queue_time;
|
||||||
|
|
||||||
memset(static_cast<void *>(&m_qrInfo), 0, sizeof(m_qrInfo));
|
memset(&m_qrInfo, 0, sizeof(m_qrInfo));
|
||||||
|
|
||||||
m_qrInfo.queue_time = save_time;
|
m_qrInfo.queue_time = save_time;
|
||||||
|
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'tfcx')
|
binary = AMXX.MetaModule(builder, 'tfcx')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../public/sdk/amxxmodule.cpp',
|
'../../public/sdk/amxxmodule.cpp',
|
||||||
'CRank.cpp',
|
'CRank.cpp',
|
||||||
|
@ -126,11 +126,11 @@ void CPlayer::Connect(const char* address ){
|
|||||||
|
|
||||||
void CPlayer::restartStats(bool all)
|
void CPlayer::restartStats(bool all)
|
||||||
{
|
{
|
||||||
if ( all ) memset(&weapons,0,sizeof(weapons));
|
if ( all ) memset(weapons,0,sizeof(weapons));
|
||||||
memset(&weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
|
memset(weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
|
||||||
memset(&attackers,0,sizeof(attackers));
|
memset(attackers,0,sizeof(attackers));
|
||||||
memset(&victims,0,sizeof(victims));
|
memset(victims,0,sizeof(victims));
|
||||||
life = {};
|
memset(&life,0,sizeof(life));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Init( int pi, edict_t* pe )
|
void CPlayer::Init( int pi, edict_t* pe )
|
||||||
|
@ -161,10 +161,10 @@ struct CPlayer {
|
|||||||
int clip;
|
int clip;
|
||||||
};
|
};
|
||||||
|
|
||||||
PlayerWeapon weapons[TFCMAX_WEAPONS];
|
PlayerWeapon weapons[MAX_WEAPONS];
|
||||||
PlayerWeapon attackers[33];
|
PlayerWeapon attackers[33];
|
||||||
PlayerWeapon victims[33];
|
PlayerWeapon victims[33];
|
||||||
Stats weaponsRnd[TFCMAX_WEAPONS]; // DEC-Weapon (Round) stats
|
Stats weaponsRnd[MAX_WEAPONS]; // DEC-Weapon (Round) stats
|
||||||
Stats life;
|
Stats life;
|
||||||
|
|
||||||
int teamId;
|
int teamId;
|
||||||
|
@ -262,10 +262,10 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
|
|||||||
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
|
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
|
||||||
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
|
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
|
||||||
|
|
||||||
if ( !pAtt ) pAtt = pVic;
|
|
||||||
pVic->pEdict->v.dmg_inflictor = NULL;
|
pVic->pEdict->v.dmg_inflictor = NULL;
|
||||||
pAtt->saveHit( pVic , weapon , dmg, aim );
|
pAtt->saveHit( pVic , weapon , dmg, aim );
|
||||||
|
|
||||||
|
if ( !pAtt ) pAtt = pVic;
|
||||||
int TA = 0;
|
int TA = 0;
|
||||||
if ( (pVic->pEdict->v.team == pAtt->pEdict->v.team ) && ( pVic != pAtt) )
|
if ( (pVic->pEdict->v.team == pAtt->pEdict->v.team ) && ( pVic != pAtt) )
|
||||||
TA = 1;
|
TA = 1;
|
||||||
|
@ -47,7 +47,7 @@ bool isModuleActive(){
|
|||||||
|
|
||||||
bool util_strncmp( const char *sz1, const char *sz2, int size){
|
bool util_strncmp( const char *sz1, const char *sz2, int size){
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while( i<=size && sz1[i] ){
|
while( sz1[i] && i<=size){
|
||||||
if ( sz1[i] != sz2[i] )
|
if ( sz1[i] != sz2[i] )
|
||||||
return false;
|
return false;
|
||||||
i++;
|
i++;
|
||||||
|
@ -46,7 +46,7 @@ void Client_WeaponList(void* mValue){
|
|||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
int iId = *(int*)mValue;
|
int iId = *(int*)mValue;
|
||||||
if ( (iId < 0 || iId >= TFCMAX_WEAPONS ) || ( wpnList & (1<<iId) ) )
|
if ( (iId < 0 || iId >= MAX_WEAPONS ) || ( wpnList & (1<<iId) ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
wpnList |= (1<<iId);
|
wpnList |= (1<<iId);
|
||||||
@ -340,7 +340,7 @@ void Client_AmmoX(void* mValue){
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
for(int i = 1; i < TFCMAX_WEAPONS ; ++i)
|
for(int i = 1; i < MAX_WEAPONS ; ++i)
|
||||||
if (iAmmo == weaponData[i].ammoSlot)
|
if (iAmmo == weaponData[i].ammoSlot)
|
||||||
mPlayer->weapons[i].ammo = *(int*)mValue;
|
mPlayer->weapons[i].ammo = *(int*)mValue;
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ void Client_AmmoPickup(void* mValue){
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (!mPlayer ) break;
|
if (!mPlayer ) break;
|
||||||
for(int i = 1; i < TFCMAX_WEAPONS ; ++i)
|
for(int i = 1; i < MAX_WEAPONS ; ++i)
|
||||||
if (weaponData[i].ammoSlot == iSlot)
|
if (weaponData[i].ammoSlot == iSlot)
|
||||||
mPlayer->weapons[i].ammo += *(int*)mValue;
|
mPlayer->weapons[i].ammo += *(int*)mValue;
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'tsfun')
|
binary = AMXX.MetaModule(builder, 'tsfun')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../../public/sdk/amxxmodule.cpp',
|
'../../../public/sdk/amxxmodule.cpp',
|
||||||
]
|
]
|
||||||
|
@ -3,10 +3,6 @@ import os.path
|
|||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'tsx')
|
binary = AMXX.MetaModule(builder, 'tsx')
|
||||||
|
|
||||||
binary.compiler.defines += [
|
|
||||||
'HAVE_STDINT_H',
|
|
||||||
]
|
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../../public/sdk/amxxmodule.cpp',
|
'../../../public/sdk/amxxmodule.cpp',
|
||||||
'CMisc.cpp',
|
'CMisc.cpp',
|
||||||
|
@ -78,11 +78,11 @@ void CPlayer::Connect(const char* ippp)
|
|||||||
|
|
||||||
void CPlayer::restartStats(bool all)
|
void CPlayer::restartStats(bool all)
|
||||||
{
|
{
|
||||||
if ( all ) memset(&weapons,0,sizeof(weapons));
|
if ( all ) memset(weapons,0,sizeof(weapons));
|
||||||
memset(&weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
|
memset(weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
|
||||||
memset(&attackers,0,sizeof(attackers));
|
memset(attackers,0,sizeof(attackers));
|
||||||
memset(&victims,0,sizeof(victims));
|
memset(victims,0,sizeof(victims));
|
||||||
life = {};
|
memset(&life,0,sizeof(life));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Init( int pi, edict_t* pe )
|
void CPlayer::Init( int pi, edict_t* pe )
|
||||||
|
@ -295,10 +295,10 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
|
|||||||
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
|
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
|
||||||
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
|
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
|
||||||
|
|
||||||
if ( !pAtt ) pAtt = pVic;
|
|
||||||
pVic->pEdict->v.dmg_inflictor = NULL;
|
pVic->pEdict->v.dmg_inflictor = NULL;
|
||||||
pAtt->saveHit( pVic , weapon , dmg, aim );
|
pAtt->saveHit( pVic , weapon , dmg, aim );
|
||||||
|
|
||||||
|
if ( !pAtt ) pAtt = pVic;
|
||||||
int TA = 0;
|
int TA = 0;
|
||||||
if ( (pVic->pEdict->v.team == pAtt->pEdict->v.team ) && ( pVic != pAtt) )
|
if ( (pVic->pEdict->v.team == pAtt->pEdict->v.team ) && ( pVic != pAtt) )
|
||||||
TA = 1;
|
TA = 1;
|
||||||
|
@ -122,7 +122,6 @@ void Client_TSHealth_End(void* mValue){
|
|||||||
|
|
||||||
weapon = 37; // throwing knife
|
weapon = 37; // throwing knife
|
||||||
aim = pAttacker ? pAttacker->aiming : 0;
|
aim = pAttacker ? pAttacker->aiming : 0;
|
||||||
if (pAttacker)
|
|
||||||
pAttacker->saveHit( mPlayer , weapon , damage, aim );
|
pAttacker->saveHit( mPlayer , weapon , damage, aim );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,8 +364,10 @@ loadSettings(szFilename[])
|
|||||||
new AuthData[44];
|
new AuthData[44];
|
||||||
new Password[32];
|
new Password[32];
|
||||||
|
|
||||||
while (fgets(File, Text, charsmax(Text)))
|
while (!feof(File))
|
||||||
{
|
{
|
||||||
|
fgets(File, Text, charsmax(Text));
|
||||||
|
|
||||||
trim(Text);
|
trim(Text);
|
||||||
|
|
||||||
// comment
|
// comment
|
||||||
|
@ -14,97 +14,64 @@
|
|||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
#include <amxmisc>
|
#include <amxmisc>
|
||||||
|
|
||||||
new CvarReservation;
|
new g_ResPtr
|
||||||
new CvarHideSlots;
|
new g_HidePtr
|
||||||
|
new g_sv_visiblemaxplayers
|
||||||
new CvarHandleMaxVisiblePlayers;
|
|
||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Slots Reservation", AMXX_VERSION_STR, "AMXX Dev Team");
|
register_plugin("Slots Reservation", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
|
register_dictionary("adminslots.txt")
|
||||||
register_dictionary("adminslots.txt");
|
register_dictionary("common.txt")
|
||||||
register_dictionary("common.txt");
|
g_ResPtr = register_cvar("amx_reservation", "0", FCVAR_PROTECTED)
|
||||||
|
g_HidePtr = register_cvar("amx_hideslots", "0")
|
||||||
hook_cvar_change(create_cvar("amx_reservation", "0", FCVAR_PROTECTED, fmt("%L", LANG_SERVER, "CVAR_RESERVATION"), .has_min = true, .min_val = 0.0, .has_max = true, .max_val = float(MaxClients - 1)), "@OnReservationChange");
|
g_sv_visiblemaxplayers = get_cvar_pointer("sv_visiblemaxplayers")
|
||||||
hook_cvar_change(create_cvar("amx_hideslots" , "0", FCVAR_NONE , fmt("%L", LANG_SERVER, "CVAR_HIDESLOTS") , .has_min = true, .min_val = 0.0, .has_max = true, .max_val = 1.0), "@OnHideSlotsChange");
|
|
||||||
|
|
||||||
CvarHandleMaxVisiblePlayers = get_cvar_pointer("sv_visiblemaxplayers");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnReservationChange(const handle, const oldValue[], const newValue[])
|
public plugin_cfg()
|
||||||
{
|
{
|
||||||
CvarReservation = strtol(newValue);
|
set_task(3.0, "MapLoaded")
|
||||||
|
|
||||||
setVisibleSlots();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnHideSlotsChange(const handle, const oldValue[], const newValue[])
|
public MapLoaded()
|
||||||
{
|
{
|
||||||
CvarHideSlots = strtol(newValue);
|
if (get_pcvar_num(g_HidePtr))
|
||||||
|
{
|
||||||
setVisibleSlots();
|
setVisibleSlots(get_playersnum(1), MaxClients - get_pcvar_num(g_ResPtr))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public client_authorized(id)
|
public client_authorized(id)
|
||||||
{
|
{
|
||||||
setVisibleSlots(id);
|
new players = get_playersnum(1)
|
||||||
|
new limit = MaxClients - get_pcvar_num(g_ResPtr)
|
||||||
|
|
||||||
|
if (access(id, ADMIN_RESERVATION) || (players <= limit))
|
||||||
|
{
|
||||||
|
if (get_pcvar_num(g_HidePtr))
|
||||||
|
setVisibleSlots(players, limit)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
server_cmd("kick #%d ^"%L^"", get_user_userid(id), id, "DROPPED_RES")
|
||||||
}
|
}
|
||||||
|
|
||||||
public client_remove(id)
|
public client_remove(id)
|
||||||
{
|
{
|
||||||
setVisibleSlots();
|
if (get_pcvar_num(g_HidePtr))
|
||||||
|
{
|
||||||
|
setVisibleSlots(get_playersnum(1), MaxClients - get_pcvar_num(g_ResPtr))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setVisibleSlots(const playerId = 0)
|
setVisibleSlots(players, limit)
|
||||||
{
|
{
|
||||||
if ((playerId == 0 && !CvarHideSlots) || !CvarReservation)
|
new num = players + 1
|
||||||
{
|
|
||||||
if (get_pcvar_num(CvarHandleMaxVisiblePlayers) > 0)
|
|
||||||
{
|
|
||||||
resetVisibleSlots(MaxClients);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
if (players == MaxClients)
|
||||||
}
|
num = MaxClients
|
||||||
|
else if (players < limit)
|
||||||
|
num = limit
|
||||||
|
|
||||||
new const playersCount = get_playersnum_ex(GetPlayers_IncludeConnecting);
|
set_pcvar_num(g_sv_visiblemaxplayers, num)
|
||||||
new const freeVisibleSlots = MaxClients - CvarReservation;
|
|
||||||
|
|
||||||
if (playerId != 0)
|
|
||||||
{
|
|
||||||
if (playersCount > freeVisibleSlots && !access(playerId, ADMIN_RESERVATION))
|
|
||||||
{
|
|
||||||
server_cmd("kick #%d ^"%L^"", get_user_userid(playerId), playerId, "DROPPED_RES");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CvarHideSlots)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
new maxVisiblePlayers = playersCount + 1;
|
|
||||||
|
|
||||||
if (playersCount == MaxClients)
|
|
||||||
{
|
|
||||||
maxVisiblePlayers = MaxClients;
|
|
||||||
}
|
|
||||||
else if (playersCount < freeVisibleSlots)
|
|
||||||
{
|
|
||||||
maxVisiblePlayers = freeVisibleSlots;
|
|
||||||
}
|
|
||||||
|
|
||||||
resetVisibleSlots(maxVisiblePlayers);
|
|
||||||
}
|
|
||||||
|
|
||||||
resetVisibleSlots(value)
|
|
||||||
{
|
|
||||||
if (value == MaxClients)
|
|
||||||
{
|
|
||||||
value = -1; // Default sv_visiblemaxplayers value.
|
|
||||||
}
|
|
||||||
|
|
||||||
set_pcvar_num(CvarHandleMaxVisiblePlayers, value);
|
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,10 @@ public plugin_precache( )
|
|||||||
new fieldNums = 0;
|
new fieldNums = 0;
|
||||||
new const voxIdent[] = "vox", fvoxIdent[] = "fvox", barneyIdent[] = "barney", hgruntIdent[] = "hgrunt";
|
new const voxIdent[] = "vox", fvoxIdent[] = "fvox", barneyIdent[] = "barney", hgruntIdent[] = "hgrunt";
|
||||||
|
|
||||||
while ( line < MAX_CMDS && fgets( fp, szText, charsmax(szText) ) ) // Loop till MAX_CMDS or no more file data
|
while ( line < MAX_CMDS && ! feof( fp ) ) // Loop till MAX_CMDS or EOF
|
||||||
{
|
{
|
||||||
|
fgets( fp, szText, charsmax(szText) ); // Store line content
|
||||||
|
|
||||||
/* Strips newline */
|
/* Strips newline */
|
||||||
new len = strlen( szText );
|
new len = strlen( szText );
|
||||||
if ( len != 0 && szText[len-1] == '^n' ) // len != 0 because if the last line of the file is empty, there's no newline
|
if ( len != 0 && szText[len-1] == '^n' ) // len != 0 because if the last line of the file is empty, there's no newline
|
||||||
@ -173,7 +175,15 @@ public plugin_precache( )
|
|||||||
}
|
}
|
||||||
if ( file_exists( szSound ) )
|
if ( file_exists( szSound ) )
|
||||||
{
|
{
|
||||||
precache_generic( szSound );
|
if ( sndExt[1] == 'm')
|
||||||
|
{
|
||||||
|
precache_generic( szSound ); // mp3
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
replace( szSound, charsmax(szSound), "sound/", "" ); // wav, strip the leading sound/ we added for our file_exists check
|
||||||
|
precache_sound( szSound );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
line++;
|
line++;
|
||||||
|
@ -236,8 +236,9 @@ public plugin_precache()
|
|||||||
if( fp )
|
if( fp )
|
||||||
{
|
{
|
||||||
new xvarname[32], xvarid
|
new xvarname[32], xvarid
|
||||||
while( fgets(fp, buffer, charsmax(buffer)) )
|
while( !feof(fp) )
|
||||||
{
|
{
|
||||||
|
fgets(fp, buffer, charsmax(buffer))
|
||||||
trim(buffer)
|
trim(buffer)
|
||||||
if( buffer[0] != ';' )
|
if( buffer[0] != ';' )
|
||||||
{
|
{
|
||||||
@ -256,8 +257,9 @@ public plugin_precache()
|
|||||||
if( fp )
|
if( fp )
|
||||||
{
|
{
|
||||||
new szSoundKey[32], szSoundFile[SOUNDFILE_PATH_MAXLEN]
|
new szSoundKey[32], szSoundFile[SOUNDFILE_PATH_MAXLEN]
|
||||||
while( fgets(fp, buffer, charsmax(buffer)) )
|
while( !feof(fp) )
|
||||||
{
|
{
|
||||||
|
fgets(fp, buffer, charsmax(buffer))
|
||||||
trim(buffer)
|
trim(buffer)
|
||||||
if( buffer[0] != ';' && parse(buffer, szSoundKey, charsmax(szSoundKey), szSoundFile, charsmax(szSoundFile)) == 2 )
|
if( buffer[0] != ';' && parse(buffer, szSoundKey, charsmax(szSoundKey), szSoundFile, charsmax(szSoundFile)) == 2 )
|
||||||
{
|
{
|
||||||
@ -377,7 +379,7 @@ precache_sound_custom( const sound[] )
|
|||||||
formatex(fullpathsound, charsmax(fullpathsound), "sound/%s.wav", sound)
|
formatex(fullpathsound, charsmax(fullpathsound), "sound/%s.wav", sound)
|
||||||
if( file_exists(fullpathsound) )
|
if( file_exists(fullpathsound) )
|
||||||
{
|
{
|
||||||
precache_generic(fullpathsound)
|
precache_sound(fullpathsound[6])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -594,11 +594,9 @@ bool:loadSettings(const filename[])
|
|||||||
arrayset(RestrictedBotEquipAmmos, '0', charsmax(RestrictedBotEquipAmmos));
|
arrayset(RestrictedBotEquipAmmos, '0', charsmax(RestrictedBotEquipAmmos));
|
||||||
arrayset(RestrictedBotWeapons, '0', charsmax(RestrictedBotWeapons));
|
arrayset(RestrictedBotWeapons, '0', charsmax(RestrictedBotWeapons));
|
||||||
|
|
||||||
while (fgets(fp, lineRead, charsmax(lineRead)))
|
while (!feof(fp))
|
||||||
{
|
{
|
||||||
trim(lineRead)
|
if (fgets(fp, lineRead, charsmax(lineRead)) - trim(lineRead) <= 0)
|
||||||
|
|
||||||
if (!lineRead[0])
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user