mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-02-19 10:18:52 +03:00
Update
Merge branch 'master' of https://github.com/alliedmodders/amxmodx into cmd-targetex
This commit is contained in:
commit
6ae7ef3404
2
.gitignore
vendored
2
.gitignore
vendored
@ -84,3 +84,5 @@ Thumbs.db
|
|||||||
# AMXX plugin build related files
|
# AMXX plugin build related files
|
||||||
plugins/compile.dat
|
plugins/compile.dat
|
||||||
plugins/compiled/
|
plugins/compiled/
|
||||||
|
|
||||||
|
build_deps/
|
||||||
|
@ -8,6 +8,7 @@ addons:
|
|||||||
- linux-libc-dev
|
- linux-libc-dev
|
||||||
- gcc-multilib
|
- gcc-multilib
|
||||||
- g++-multilib
|
- g++-multilib
|
||||||
|
- nasm
|
||||||
sources:
|
sources:
|
||||||
- llvm-toolchain-precise-3.7
|
- llvm-toolchain-precise-3.7
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
@ -23,4 +24,4 @@ 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 python ../configure.py --enable-optimize
|
- CC=clang-3.7 CXX=clang-3.7 python ../configure.py --enable-optimize
|
||||||
- ambuild
|
- ambuild
|
||||||
|
@ -20,6 +20,7 @@ class AMXXConfig(object):
|
|||||||
self.utf8rewind = None
|
self.utf8rewind = None
|
||||||
self.csx_app = None
|
self.csx_app = None
|
||||||
self.stdcxx_path = None
|
self.stdcxx_path = None
|
||||||
|
self.nasm_path = None
|
||||||
|
|
||||||
def use_auto_versioning(self):
|
def use_auto_versioning(self):
|
||||||
if builder.backend != 'amb2':
|
if builder.backend != 'amb2':
|
||||||
@ -105,6 +106,31 @@ class AMXXConfig(object):
|
|||||||
if not self.mysql_path:
|
if not self.mysql_path:
|
||||||
raise Exception('Could not find MySQL! Try passing --mysql to configure.py.')
|
raise Exception('Could not find MySQL! Try passing --mysql to configure.py.')
|
||||||
|
|
||||||
|
def detectNASM(self):
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
nasm_paths = [
|
||||||
|
getattr(builder.options, 'nasm_path', 'nasm'),
|
||||||
|
]
|
||||||
|
if builder.target_platform == 'windows':
|
||||||
|
nasm_paths += [os.path.join(
|
||||||
|
builder.sourcePath,
|
||||||
|
'build_deps',
|
||||||
|
'nasm',
|
||||||
|
'nasm.exe')
|
||||||
|
]
|
||||||
|
|
||||||
|
for nasm_path in nasm_paths:
|
||||||
|
try:
|
||||||
|
subprocess.check_output([nasm_path, '-v'])
|
||||||
|
self.nasm_path = nasm_path
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if self.nasm_path is None:
|
||||||
|
raise Exception('Could not find a suitable path for nasm')
|
||||||
|
|
||||||
# Returns list of lines of output from the compiler
|
# Returns list of lines of output from the compiler
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def invokeCompiler(args):
|
def invokeCompiler(args):
|
||||||
@ -369,11 +395,42 @@ class AMXXConfig(object):
|
|||||||
binary = context.compiler.Program(name)
|
binary = context.compiler.Program(name)
|
||||||
return self.AddVersioning(binary)
|
return self.AddVersioning(binary)
|
||||||
|
|
||||||
|
def AddAssembly(self, context, binary, input_file, output_file, includes=[], extra_argv=[]):
|
||||||
|
if builder.target_platform == 'windows':
|
||||||
|
obj_type = 'win32'
|
||||||
|
elif builder.target_platform == 'linux':
|
||||||
|
obj_type = 'elf32'
|
||||||
|
elif builder.target_platform == 'mac':
|
||||||
|
obj_type = 'macho32'
|
||||||
|
|
||||||
|
input_path = os.path.join(context.currentSourcePath, input_file)
|
||||||
|
output_path = output_file
|
||||||
|
|
||||||
|
argv = [
|
||||||
|
self.nasm_path,
|
||||||
|
'-I{0}{1}'.format(context.currentSourcePath, os.sep),
|
||||||
|
input_path,
|
||||||
|
'-f', obj_type,
|
||||||
|
'-o', output_path,
|
||||||
|
] + extra_argv
|
||||||
|
|
||||||
|
extra_includes = []
|
||||||
|
for include_file in includes:
|
||||||
|
extra_includes.append(os.path.join(context.currentSourcePath, include_file))
|
||||||
|
|
||||||
|
cmd_node, output_nodes = context.AddCommand(
|
||||||
|
inputs = [input_path] + extra_includes,
|
||||||
|
argv = argv,
|
||||||
|
outputs = [output_path])
|
||||||
|
|
||||||
|
binary.compiler.linkflags += [output_nodes[0]]
|
||||||
|
|
||||||
AMXX = AMXXConfig()
|
AMXX = AMXXConfig()
|
||||||
AMXX.detectProductVersion()
|
AMXX.detectProductVersion()
|
||||||
AMXX.detectMetamod()
|
AMXX.detectMetamod()
|
||||||
AMXX.detectHlsdk()
|
AMXX.detectHlsdk()
|
||||||
AMXX.detectMysql()
|
AMXX.detectMysql()
|
||||||
|
AMXX.detectNASM()
|
||||||
AMXX.configure()
|
AMXX.configure()
|
||||||
|
|
||||||
if AMXX.use_auto_versioning():
|
if AMXX.use_auto_versioning():
|
||||||
|
@ -9,36 +9,25 @@ binary.compiler.defines += [
|
|||||||
'HAVE_STDINT_H',
|
'HAVE_STDINT_H',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
AMXX.AddAssembly(builder, binary, 'helpers-x86.asm', 'helpers-asm.obj')
|
||||||
|
AMXX.AddAssembly(builder, binary, 'natives-x86.asm', 'natives-asm.obj')
|
||||||
|
AMXX.AddAssembly(builder, binary, 'amxexecn.asm', 'amxexecn-asm.obj',
|
||||||
|
includes=['amxdefn.asm'])
|
||||||
|
AMXX.AddAssembly(builder, binary, 'amxjitsn.asm', 'amxjitsn-asm.obj',
|
||||||
|
includes=['amxdefn.asm'],
|
||||||
|
# Opcode sizes must be maximum width for patching to work.
|
||||||
|
extra_argv=['-O0'])
|
||||||
|
|
||||||
if builder.target_platform == 'mac':
|
if builder.target_platform == 'mac':
|
||||||
jit_objects = [
|
|
||||||
binary.Dep('JIT/amxexecn-darwin.o'),
|
|
||||||
binary.Dep('JIT/amxjitsn-darwin.o'),
|
|
||||||
binary.Dep('JIT/natives-darwin-x86.o'),
|
|
||||||
binary.Dep('JIT/helpers-darwin-x86.o'),
|
|
||||||
]
|
|
||||||
binary.compiler.postlink += [
|
binary.compiler.postlink += [
|
||||||
'-Wl,-read_only_relocs,suppress'
|
'-Wl,-read_only_relocs,suppress'
|
||||||
]
|
]
|
||||||
elif builder.target_platform == 'linux':
|
|
||||||
jit_objects = [
|
|
||||||
binary.Dep('JIT/amxexecn.o'),
|
|
||||||
binary.Dep('JIT/amxjitsn.o'),
|
|
||||||
binary.Dep('JIT/natives-x86.o'),
|
|
||||||
binary.Dep('JIT/helpers-x86.o'),
|
|
||||||
]
|
|
||||||
elif builder.target_platform == 'windows':
|
elif builder.target_platform == 'windows':
|
||||||
jit_objects = [
|
|
||||||
binary.Dep('JIT/amxexecn.obj'),
|
|
||||||
binary.Dep('JIT/amxjitsn.obj'),
|
|
||||||
binary.Dep('JIT/helpers-x86.obj'),
|
|
||||||
binary.Dep('JIT/natives-x86.obj'),
|
|
||||||
]
|
|
||||||
binary.compiler.linkflags += [
|
binary.compiler.linkflags += [
|
||||||
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
|
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
|
||||||
'/SECTION:.data,RW',
|
'/SECTION:.data,RW',
|
||||||
]
|
]
|
||||||
|
|
||||||
binary.compiler.linkflags += jit_objects
|
|
||||||
binary.compiler.linkflags += [AMXX.zlib.binary, AMXX.hashing.binary, AMXX.utf8rewind.binary]
|
binary.compiler.linkflags += [AMXX.zlib.binary, AMXX.hashing.binary, AMXX.utf8rewind.binary]
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include <IGameConfigs.h>
|
#include <IGameConfigs.h>
|
||||||
#include "CLibrarySys.h"
|
#include "CLibrarySys.h"
|
||||||
|
#include <amtl/am-autoptr.h>
|
||||||
#include <amtl/am-vector.h>
|
#include <amtl/am-vector.h>
|
||||||
#include <amtl/am-string.h>
|
#include <amtl/am-string.h>
|
||||||
#include <amtl/am-refcounting.h>
|
#include <amtl/am-refcounting.h>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "amxxfile.h"
|
#include "amxxfile.h"
|
||||||
#include <amtl/am-string.h>
|
#include <amtl/am-string.h>
|
||||||
#include <amtl/am-vector.h>
|
#include <amtl/am-vector.h>
|
||||||
|
#include <amtl/am-autoptr.h>
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
// class CPluginMngr
|
// class CPluginMngr
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -214,7 +214,7 @@ static cell AMX_NATIVE_CALL console_print(AMX *amx, cell *params) /* 2 param */
|
|||||||
{
|
{
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
{
|
{
|
||||||
if (len > 126) // Client console truncates after byte 127. (126 + \n = 127)
|
if (len > 126) // Client console truncates after byte 127. (126 + \n = 127)
|
||||||
{
|
{
|
||||||
@ -247,7 +247,7 @@ static cell AMX_NATIVE_CALL client_print(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
|
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
{
|
{
|
||||||
g_langMngr.SetDefLang(i);
|
g_langMngr.SetDefLang(i);
|
||||||
msg = format_amxstring(amx, params, 3, len);
|
msg = format_amxstring(amx, params, 3, len);
|
||||||
@ -280,7 +280,7 @@ static cell AMX_NATIVE_CALL client_print(AMX *amx, cell *params) /* 3 param */
|
|||||||
|
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
{
|
{
|
||||||
g_langMngr.SetDefLang(index);
|
g_langMngr.SetDefLang(index);
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ static cell AMX_NATIVE_CALL show_motd(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
UTIL_ShowMOTD(pPlayer->pEdict, sToShow, ilen, szHead);
|
UTIL_ShowMOTD(pPlayer->pEdict, sToShow, ilen, szHead);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -444,7 +444,7 @@ static cell AMX_NATIVE_CALL show_motd(AMX *amx, cell *params) /* 3 param */
|
|||||||
|
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
UTIL_ShowMOTD(pPlayer->pEdict, sToShow, ilen, szHead);
|
UTIL_ShowMOTD(pPlayer->pEdict, sToShow, ilen, szHead);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,7 +524,7 @@ static cell AMX_NATIVE_CALL show_hudmessage(AMX *amx, cell *params) /* 2 param *
|
|||||||
{
|
{
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
|
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
{
|
{
|
||||||
g_langMngr.SetDefLang(i);
|
g_langMngr.SetDefLang(i);
|
||||||
message = UTIL_SplitHudMessage(format_amxstring(amx, params, 2, len));
|
message = UTIL_SplitHudMessage(format_amxstring(amx, params, 2, len));
|
||||||
@ -551,7 +551,7 @@ static cell AMX_NATIVE_CALL show_hudmessage(AMX *amx, cell *params) /* 2 param *
|
|||||||
|
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
if (pPlayer->ingame)
|
if (pPlayer->ingame && !pPlayer->IsBot())
|
||||||
{
|
{
|
||||||
if (aut)
|
if (aut)
|
||||||
{
|
{
|
||||||
@ -787,22 +787,27 @@ static cell AMX_NATIVE_CALL is_user_alive(AMX *amx, cell *params) /* 1 param */
|
|||||||
|
|
||||||
if (index < 1 || index > gpGlobals->maxClients)
|
if (index < 1 || index > gpGlobals->maxClients)
|
||||||
{
|
{
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
|
if (!pPlayer->ingame)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_bmod_tfc)
|
if (g_bmod_tfc)
|
||||||
{
|
{
|
||||||
edict_t *e = pPlayer->pEdict;
|
edict_t *e = pPlayer->pEdict;
|
||||||
if (e->v.flags & FL_SPECTATOR ||
|
if (e->v.flags & FL_SPECTATOR ||
|
||||||
(!e->v.team || !e->v.playerclass))
|
(!e->v.team || !e->v.playerclass))
|
||||||
{
|
{
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((pPlayer->ingame && pPlayer->IsAlive()) ? 1 : 0);
|
return pPlayer->IsAlive() ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_amxx_verstring(AMX *amx, cell *params) /* 2 params */
|
static cell AMX_NATIVE_CALL get_amxx_verstring(AMX *amx, cell *params) /* 2 params */
|
||||||
@ -1106,6 +1111,12 @@ static cell AMX_NATIVE_CALL user_has_weapon(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
|
if (!pPlayer->ingame)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
edict_t *pEntity = pPlayer->pEdict;
|
edict_t *pEntity = pPlayer->pEdict;
|
||||||
|
|
||||||
if (params[3] == -1)
|
if (params[3] == -1)
|
||||||
@ -1344,17 +1355,20 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||||||
} else {
|
} else {
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
pPlayer->keys = keys;
|
if (pPlayer->ingame)
|
||||||
pPlayer->menu = menuid;
|
{
|
||||||
pPlayer->vgui = false;
|
pPlayer->keys = keys;
|
||||||
|
pPlayer->menu = menuid;
|
||||||
|
pPlayer->vgui = false;
|
||||||
|
|
||||||
if (time == -1)
|
if (time == -1)
|
||||||
pPlayer->menuexpire = INFINITE;
|
pPlayer->menuexpire = INFINITE;
|
||||||
else
|
else
|
||||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||||
|
|
||||||
pPlayer->page = 0;
|
pPlayer->page = 0;
|
||||||
UTIL_ShowMenu(pPlayer->pEdict, keys, time, sMenu, ilen);
|
UTIL_ShowMenu(pPlayer->pEdict, keys, time, sMenu, ilen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -87,6 +87,7 @@ void Client_TeamInfo(void* mValue)
|
|||||||
case 1:
|
case 1:
|
||||||
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;
|
||||||
g_players[index].team = msg;
|
g_players[index].team = msg;
|
||||||
g_teamsIds.registerTeam(msg, -1);
|
g_teamsIds.registerTeam(msg, -1);
|
||||||
g_players[index].teamId = g_teamsIds.findTeamId(msg);
|
g_players[index].teamId = g_teamsIds.findTeamId(msg);
|
||||||
|
@ -657,10 +657,11 @@ void C_ServerActivate_Post(edict_t *pEdictList, int edictCount, int clientMax)
|
|||||||
pPlayer->Init(pEdictList + i, i);
|
pPlayer->Init(pEdictList + i, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoreCfg.ExecuteMainConfig(); // Execute amxx.cfg
|
||||||
|
|
||||||
executeForwards(FF_PluginInit);
|
executeForwards(FF_PluginInit);
|
||||||
executeForwards(FF_PluginCfg);
|
executeForwards(FF_PluginCfg);
|
||||||
|
|
||||||
CoreCfg.ExecuteMainConfig(); // Execute amxx.cfg
|
|
||||||
CoreCfg.ExecuteAutoConfigs(); // Execute configs created with AutoExecConfig native.
|
CoreCfg.ExecuteAutoConfigs(); // Execute configs created with AutoExecConfig native.
|
||||||
CoreCfg.SetMapConfigTimer(6.1); // Prepare per-map configs to be executed 6.1 seconds later.
|
CoreCfg.SetMapConfigTimer(6.1); // Prepare per-map configs to be executed 6.1 seconds later.
|
||||||
// Original value which was used in admin.sma.
|
// Original value which was used in admin.sma.
|
||||||
@ -1433,8 +1434,15 @@ int C_Cmd_Argc(void)
|
|||||||
// Only here we may find out who is an owner.
|
// Only here we may find out who is an owner.
|
||||||
void C_SetModel(edict_t *e, const char *m)
|
void C_SetModel(edict_t *e, const char *m)
|
||||||
{
|
{
|
||||||
if (e->v.owner && m[7]=='w' && m[8]=='_' && m[9]=='h')
|
if (!m || strcmp(m, "models/w_hegrenade.mdl") != 0)
|
||||||
g_grenades.put(e, 1.75, 4, GET_PLAYER_POINTER(e->v.owner));
|
{
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e->v.owner)
|
||||||
|
{
|
||||||
|
g_grenades.put(e, 1.75f, 4, GET_PLAYER_POINTER(e->v.owner));
|
||||||
|
}
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,14 @@
|
|||||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||||
<SpecifySectionAttributes>.data,RW</SpecifySectionAttributes>
|
<SpecifySectionAttributes>.data,RW</SpecifySectionAttributes>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>cd ..
|
||||||
|
md -p JIT 2>NUL
|
||||||
|
%NASM_PATH%nasm.exe -f win32 helpers-x86.asm -o JIT/helpers-x86.obj
|
||||||
|
%NASM_PATH%nasm.exe -f win32 natives-x86.asm -o JIT/natives-x86.obj
|
||||||
|
%NASM_PATH%nasm.exe -f win32 amxexecn.asm -o JIT/amxexecn.obj
|
||||||
|
%NASM_PATH%nasm.exe -O0 -f win32 amxjitsn.asm -o JIT/amxjitsn.obj</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">
|
||||||
<Midl>
|
<Midl>
|
||||||
@ -148,6 +156,14 @@
|
|||||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||||
<SpecifySectionAttributes>.data,RW</SpecifySectionAttributes>
|
<SpecifySectionAttributes>.data,RW</SpecifySectionAttributes>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>cd ..
|
||||||
|
md -p JIT 2>NUL
|
||||||
|
%NASM_PATH%nasm.exe -f win32 helpers-x86.asm -o JIT/helpers-x86.obj
|
||||||
|
%NASM_PATH%nasm.exe -f win32 natives-x86.asm -o JIT/natives-x86.obj
|
||||||
|
%NASM_PATH%nasm.exe -f win32 amxexecn.asm -o JIT/amxexecn.obj
|
||||||
|
%NASM_PATH%nasm.exe -O0 -f win32 amxjitsn.asm -o JIT/amxjitsn.obj</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\public\memtools\CDetour\asm\asm.c" />
|
<ClCompile Include="..\..\public\memtools\CDetour\asm\asm.c" />
|
||||||
@ -474,4 +490,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -373,8 +373,8 @@ void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1,
|
|||||||
{
|
{
|
||||||
if ((*aa).matchCommandLine(cmd, arg1) && (*aa).getPlugin()->isExecutable((*aa).getFunction()))
|
if ((*aa).matchCommandLine(cmd, arg1) && (*aa).getPlugin()->isExecutable((*aa).getFunction()))
|
||||||
{
|
{
|
||||||
if (executeForwards((*aa).getFunction(), static_cast<cell>(GET_PLAYER_POINTER(pEdict)->index)),
|
if (executeForwards((*aa).getFunction(), static_cast<cell>(GET_PLAYER_POINTER(pEdict)->index),
|
||||||
static_cast<cell>((*aa).getFlags()), static_cast<cell>((*aa).getId()) > 0)
|
static_cast<cell>((*aa).getFlags()), static_cast<cell>((*aa).getId())) > 0)
|
||||||
{
|
{
|
||||||
g_fakecmd.notify = false;
|
g_fakecmd.notify = false;
|
||||||
return;
|
return;
|
||||||
|
@ -3,6 +3,11 @@ clone_folder: c:\projects\amxmodx
|
|||||||
install:
|
install:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
- 'c:'
|
- 'c:'
|
||||||
|
- mkdir c:\nasm
|
||||||
|
- set PATH=c:\nasm\nasm-2.13.03;%PATH%
|
||||||
|
- curl -o "c:\nasm\nasm.zip" http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
|
||||||
|
- chdir c:\nasm
|
||||||
|
- 7z x nasm.zip
|
||||||
- chdir c:\projects
|
- chdir c:\projects
|
||||||
- git clone https://github.com/alliedmodders/ambuild
|
- git clone https://github.com/alliedmodders/ambuild
|
||||||
- git clone https://github.com/alliedmodders/metamod-hl1
|
- git clone https://github.com/alliedmodders/metamod-hl1
|
||||||
@ -22,5 +27,5 @@ build_script:
|
|||||||
- '"%VS120COMNTOOLS%\vsvars32.bat"'
|
- '"%VS120COMNTOOLS%\vsvars32.bat"'
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- c:\python27\python ../configure.py --enable-optimize
|
- c:\python27\python ../configure.py --enable-optimize --nasm="C:\nasm\nasm-2.13.03\nasm.exe"
|
||||||
- c:\python27\scripts\ambuild
|
- c:\python27\scripts\ambuild
|
||||||
|
@ -30,4 +30,6 @@ run.options.add_option('--mysql', type='string', dest='mysql_path', default='',
|
|||||||
help='Path to MySQL')
|
help='Path to MySQL')
|
||||||
run.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning',
|
run.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning',
|
||||||
default=False, help='Disable the auto versioning script')
|
default=False, help='Disable the auto versioning script')
|
||||||
|
run.options.add_option('--nasm', type='string', dest='nasm_path',
|
||||||
|
default='nasm', help='Path to NASM')
|
||||||
run.Configure()
|
run.Configure()
|
||||||
|
@ -721,9 +721,9 @@ void InitFuncsAddresses()
|
|||||||
MF_Log("UTIL_FindEntByString is not available - native cs_find_ent_by_class() has been disabled");
|
MF_Log("UTIL_FindEntByString is not available - native cs_find_ent_by_class() has been disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AddEntityHashValue || !AddEntityHashValue)
|
if (!AddEntityHashValue || !RemoveEntityHashValue)
|
||||||
{
|
{
|
||||||
MF_Log("AddEntityHashValue or AddEntityHashValue is not available - native cs_set_ent_class() has been disabled");
|
MF_Log("AddEntityHashValue or RemoveEntityHashValue is not available - native cs_set_ent_class() has been disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HasReGameDll && !GetWeaponInfo)
|
if (!HasReGameDll && !GetWeaponInfo)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <resdk/mod_regamedll_api.h>
|
#include <resdk/mod_regamedll_api.h>
|
||||||
|
|
||||||
CsItemInfo ItemsManager;
|
CsItemInfo ItemsManager;
|
||||||
ItemInfo WeaponsList[MAX_WEAPONS];
|
ItemInfos WeaponsList[MAX_WEAPONS];
|
||||||
|
|
||||||
#define PSTATE_ALIASES_TYPE 0
|
#define PSTATE_ALIASES_TYPE 0
|
||||||
#define PSTATE_ALIASES_ALIAS 1
|
#define PSTATE_ALIASES_ALIAS 1
|
||||||
|
@ -20,12 +20,12 @@
|
|||||||
#include <amtl/am-string.h>
|
#include <amtl/am-string.h>
|
||||||
#include <sm_stringhashmap.h>
|
#include <sm_stringhashmap.h>
|
||||||
|
|
||||||
struct ItemInfo
|
struct ItemInfos
|
||||||
{
|
{
|
||||||
ItemInfo() : name("Empty"), ammoIndex1(-1), maxAmmo1(0), ammoIndex2(-1), maxAmmo2(0), slot(0), position(0), id(0), flags(0)
|
ItemInfos() : name("Empty"), ammoIndex1(-1), maxAmmo1(0), ammoIndex2(-1), maxAmmo2(0), slot(0), position(0), id(0), flags(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ItemInfo &operator = (ItemInfo &other)
|
ItemInfos &operator = (ItemInfos &other)
|
||||||
{
|
{
|
||||||
name = other.name;
|
name = other.name;
|
||||||
ammoIndex1 = other.ammoIndex1;
|
ammoIndex1 = other.ammoIndex1;
|
||||||
@ -133,7 +133,7 @@ class CsItemInfo : public ITextListener_SMC
|
|||||||
int m_EquipmentsPrice[static_cast<size_t>(Equipments::Count)];
|
int m_EquipmentsPrice[static_cast<size_t>(Equipments::Count)];
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ItemInfo WeaponsList[MAX_WEAPONS];
|
extern ItemInfos WeaponsList[MAX_WEAPONS];
|
||||||
extern CsItemInfo ItemsManager;
|
extern CsItemInfo ItemsManager;
|
||||||
|
|
||||||
#endif // _CSTRIKE_WEAPONS_INFOS_H_
|
#endif // _CSTRIKE_WEAPONS_INFOS_H_
|
||||||
|
@ -882,7 +882,7 @@ static cell AMX_NATIVE_CALL cs_set_user_model(AMX *amx, cell *params)
|
|||||||
|
|
||||||
GET_OFFSET("CBasePlayer", m_modelIndexPlayer);
|
GET_OFFSET("CBasePlayer", m_modelIndexPlayer);
|
||||||
|
|
||||||
char modelpath[260];
|
char modelpath[PLATFORM_MAX_PATH];
|
||||||
ke::SafeSprintf(modelpath, sizeof(modelpath), "models/player/%s/%s.mdl", newModel, newModel);
|
ke::SafeSprintf(modelpath, sizeof(modelpath), "models/player/%s/%s.mdl", newModel, newModel);
|
||||||
|
|
||||||
auto modelIndex = 0;
|
auto modelIndex = 0;
|
||||||
|
@ -22,7 +22,7 @@ bool ShouldBlock;
|
|||||||
bool ShouldBlockHLTV;
|
bool ShouldBlockHLTV;
|
||||||
bool ShouldDisableHooks;
|
bool ShouldDisableHooks;
|
||||||
bool RetrieveWeaponList;
|
bool RetrieveWeaponList;
|
||||||
ItemInfo CurrentWeaponList;
|
ItemInfos CurrentWeaponList;
|
||||||
int ArgPosition;
|
int ArgPosition;
|
||||||
|
|
||||||
int MessageIdArmorType;
|
int MessageIdArmorType;
|
||||||
|
@ -13,12 +13,13 @@
|
|||||||
|
|
||||||
#include "amxxmodule.h"
|
#include "amxxmodule.h"
|
||||||
#include <amtl/am-algorithm.h>
|
#include <amtl/am-algorithm.h>
|
||||||
|
#include <amtl/am-string.h>
|
||||||
|
|
||||||
extern int MessageIdTextMsg;
|
extern int MessageIdTextMsg;
|
||||||
|
|
||||||
bool UTIL_IsPlayer(edict_t *pPlayer)
|
bool UTIL_IsPlayer(edict_t *pPlayer)
|
||||||
{
|
{
|
||||||
return strcmp(STRING(pPlayer->v.classname), "player") == 0;
|
return pPlayer && strcmp(STRING(pPlayer->v.classname), "player") == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UTIL_TextMsg_Generic(edict_t* pPlayer, const char* message)
|
void UTIL_TextMsg_Generic(edict_t* pPlayer, const char* message)
|
||||||
@ -36,7 +37,7 @@ bool UTIL_CheckForPublic(const char *publicname)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
char blah[64];
|
char blah[64];
|
||||||
|
|
||||||
strncpy(blah, publicname, sizeof(blah) - 1);
|
ke::SafeStrcpy(blah, sizeof(blah), publicname);
|
||||||
|
|
||||||
while ((amx = MF_GetScriptAmx(i++)))
|
while ((amx = MF_GetScriptAmx(i++)))
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,10 @@ void UTIL_StringToLower(const char *str, char *buffer, size_t maxlength);
|
|||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (not in-game)", x); \
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (not in-game)", x); \
|
||||||
return 0; \
|
return 0; \
|
||||||
} \
|
} \
|
||||||
|
else if (!MF_GetPlayerEdict(x)->pvPrivateData) { \
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (no private data)", x); \
|
||||||
|
return 0; \
|
||||||
|
} \
|
||||||
} else { \
|
} else { \
|
||||||
if (x != 0 && FNullEnt(TypeConversion.id_to_edict(x))) { \
|
if (x != 0 && FNullEnt(TypeConversion.id_to_edict(x))) { \
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity %d", x); \
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity %d", x); \
|
||||||
@ -62,8 +66,12 @@ void UTIL_StringToLower(const char *str, char *buffer, size_t maxlength);
|
|||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Player out of range (%d)", x); \
|
MF_LogError(amx, AMX_ERR_NATIVE, "Player out of range (%d)", x); \
|
||||||
return 0; \
|
return 0; \
|
||||||
} else { \
|
} else { \
|
||||||
if (!MF_IsPlayerIngame(x) || FNullEnt(MF_GetPlayerEdict(x))) { \
|
if (!MF_IsPlayerIngame(x)) { \
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", x); \
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (not in-game)", x); \
|
||||||
|
return 0; \
|
||||||
|
} \
|
||||||
|
else if (!MF_GetPlayerEdict(x)->pvPrivateData) { \
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (no private data)", x); \
|
||||||
return 0; \
|
return 0; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -165,9 +165,18 @@
|
|||||||
<ClInclude Include="..\..\..\..\public\memtools\CDetour\detours.h" />
|
<ClInclude Include="..\..\..\..\public\memtools\CDetour\detours.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\memtools\MemoryUtils.h" />
|
<ClInclude Include="..\..\..\..\public\memtools\MemoryUtils.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\common\hookchains.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\common\hookchains.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSEntity.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSInterfaces.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSPlayer.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSPlayerItem.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSPlayerWeapon.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_api.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_api.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_const.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_const.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_interfaces.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\engine\cmd_rehlds.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\FlightRecorder.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\IObjectContainer.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\ObjectList.h" />
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\pr_dlls.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\engine\rehlds_api.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\engine\rehlds_api.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\engine\rehlds_interfaces.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\engine\rehlds_interfaces.h" />
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\mod_regamedll_api.h" />
|
<ClInclude Include="..\..\..\..\public\resdk\mod_regamedll_api.h" />
|
||||||
@ -188,4 +197,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -39,6 +39,9 @@
|
|||||||
<Filter Include="ReSDK\cstrike">
|
<Filter Include="ReSDK\cstrike">
|
||||||
<UniqueIdentifier>{ba0b72ba-25d8-48c3-af84-c1d4d7436636}</UniqueIdentifier>
|
<UniqueIdentifier>{ba0b72ba-25d8-48c3-af84-c1d4d7436636}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="ReSDK\cstrike\API">
|
||||||
|
<UniqueIdentifier>{67de85cb-b8e7-4cd6-b8cf-2ff7ed540c2b}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\CstrikeHacks.cpp">
|
<ClCompile Include="..\CstrikeHacks.cpp">
|
||||||
@ -127,9 +130,6 @@
|
|||||||
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_const.h">
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_const.h">
|
||||||
<Filter>ReSDK\cstrike</Filter>
|
<Filter>ReSDK\cstrike</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\cstrike\regamedll_interfaces.h">
|
|
||||||
<Filter>ReSDK\cstrike</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\..\public\resdk\engine\rehlds_api.h">
|
<ClInclude Include="..\..\..\..\public\resdk\engine\rehlds_api.h">
|
||||||
<Filter>ReSDK\engine</Filter>
|
<Filter>ReSDK\engine</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -142,6 +142,36 @@
|
|||||||
<ClInclude Include="..\..\..\..\public\resdk\mod_rehlds_api.h">
|
<ClInclude Include="..\..\..\..\public\resdk\mod_rehlds_api.h">
|
||||||
<Filter>ReSDK</Filter>
|
<Filter>ReSDK</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSEntity.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSInterfaces.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSPlayer.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSPlayerItem.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\cstrike\API\CSPlayerWeapon.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\cmd_rehlds.h">
|
||||||
|
<Filter>ReSDK\engine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\FlightRecorder.h">
|
||||||
|
<Filter>ReSDK\engine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\IObjectContainer.h">
|
||||||
|
<Filter>ReSDK\engine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\ObjectList.h">
|
||||||
|
<Filter>ReSDK\engine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\..\public\resdk\engine\pr_dlls.h">
|
||||||
|
<Filter>ReSDK\engine</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\..\plugins\include\cstrike.inc">
|
<None Include="..\..\..\..\plugins\include\cstrike.inc">
|
||||||
|
@ -178,14 +178,18 @@ void PlayerPreThink_Post( edict_t *pEntity ) {
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerDeactivate() {
|
void ServerDeactivate()
|
||||||
|
{
|
||||||
int i;
|
int i;
|
||||||
for( i = 1;i<=gpGlobals->maxClients; ++i){
|
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
|
for( i = 1; i <= gpGlobals->maxClients; ++i)
|
||||||
if (pPlayer->rank) pPlayer->Disconnect();
|
{
|
||||||
|
GET_PLAYER_POINTER_I(i)->Disconnect();
|
||||||
}
|
}
|
||||||
if ( (g_rank.getRankNum() >= (int)csstats_maxsize->value) || ((int)csstats_reset->value == 1 ) ) {
|
|
||||||
CVAR_SET_FLOAT("csstats_reset",0.0);
|
if (static_cast<int>(csstats_maxsize->value) <= 0 || g_rank.getRankNum() >= static_cast<int>(csstats_maxsize->value) || static_cast<int>(csstats_reset->value) != 0)
|
||||||
|
{
|
||||||
|
CVAR_SET_FLOAT("csstats_reset", 0.0f);
|
||||||
g_rank.clear(); // clear before save to file
|
g_rank.clear(); // clear before save to file
|
||||||
}
|
}
|
||||||
g_rank.saveRank( MF_BuildPathname("%s",get_localinfo("csstats")) );
|
g_rank.saveRank( MF_BuildPathname("%s",get_localinfo("csstats")) );
|
||||||
@ -197,27 +201,26 @@ void ServerDeactivate() {
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL ClientConnect_Post( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ){
|
BOOL ClientConnect_Post( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128])
|
||||||
|
{
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
||||||
|
|
||||||
if (pPlayer->pEdict == NULL)
|
|
||||||
{
|
|
||||||
pPlayer->Init(ENTINDEX(pEntity), pEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayer->Connect(pszAddress);
|
pPlayer->Connect(pszAddress);
|
||||||
|
|
||||||
RETURN_META_VALUE(MRES_IGNORED, TRUE);
|
RETURN_META_VALUE(MRES_IGNORED, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientDisconnect( edict_t *pEntity ) {
|
void ClientDisconnect( edict_t *pEntity )
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
{
|
||||||
if (pPlayer->rank) pPlayer->Disconnect();
|
GET_PLAYER_POINTER(pEntity)->Disconnect();
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientPutInServer_Post( edict_t *pEntity ) {
|
void ClientPutInServer_Post( edict_t *pEntity )
|
||||||
|
{
|
||||||
GET_PLAYER_POINTER(pEntity)->PutInServer();
|
GET_PLAYER_POINTER(pEntity)->PutInServer();
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +160,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\plugins\include\csstats.inc" />
|
<None Include="..\..\..\plugins\include\csstats.inc" />
|
||||||
|
<None Include="..\..\..\plugins\include\csstats_const.inc" />
|
||||||
<None Include="..\..\..\plugins\include\csx.inc" />
|
<None Include="..\..\..\plugins\include\csx.inc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -60,6 +60,9 @@
|
|||||||
<None Include="..\..\..\plugins\include\csstats.inc">
|
<None Include="..\..\..\plugins\include\csstats.inc">
|
||||||
<Filter>Pawn Includes</Filter>
|
<Filter>Pawn Includes</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\plugins\include\csstats_const.inc">
|
||||||
|
<Filter>Pawn Includes</Filter>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\plugins\include\csx.inc">
|
<None Include="..\..\..\plugins\include\csx.inc">
|
||||||
<Filter>Pawn Includes</Filter>
|
<Filter>Pawn Includes</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
@ -456,6 +456,13 @@ static cell AMX_NATIVE_CALL set_view(AMX *amx, cell *params) {
|
|||||||
|
|
||||||
plinfo[iIndex].iViewType = CAMERA_3RDPERSON;
|
plinfo[iIndex].iViewType = CAMERA_3RDPERSON;
|
||||||
pNewCamera = CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
|
pNewCamera = CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
|
||||||
|
|
||||||
|
if (!pNewCamera)
|
||||||
|
{
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Could not create camera entity.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pNewCamera->v.classname = MAKE_STRING("VexdCam");
|
pNewCamera->v.classname = MAKE_STRING("VexdCam");
|
||||||
|
|
||||||
SET_MODEL(pNewCamera, "models/rpgrocket.mdl");
|
SET_MODEL(pNewCamera, "models/rpgrocket.mdl");
|
||||||
@ -486,6 +493,13 @@ static cell AMX_NATIVE_CALL set_view(AMX *amx, cell *params) {
|
|||||||
|
|
||||||
plinfo[iIndex].iViewType = CAMERA_UPLEFT;
|
plinfo[iIndex].iViewType = CAMERA_UPLEFT;
|
||||||
pNewCamera = CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
|
pNewCamera = CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
|
||||||
|
|
||||||
|
if (!pNewCamera)
|
||||||
|
{
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Could not create camera entity.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pNewCamera->v.classname = MAKE_STRING("VexdCam");
|
pNewCamera->v.classname = MAKE_STRING("VexdCam");
|
||||||
|
|
||||||
SET_MODEL(pNewCamera, "models/rpgrocket.mdl");
|
SET_MODEL(pNewCamera, "models/rpgrocket.mdl");
|
||||||
@ -516,6 +530,13 @@ static cell AMX_NATIVE_CALL set_view(AMX *amx, cell *params) {
|
|||||||
|
|
||||||
plinfo[iIndex].iViewType = CAMERA_TOPDOWN;
|
plinfo[iIndex].iViewType = CAMERA_TOPDOWN;
|
||||||
pNewCamera = CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
|
pNewCamera = CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
|
||||||
|
|
||||||
|
if (!pNewCamera)
|
||||||
|
{
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Could not create camera entity.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pNewCamera->v.classname = MAKE_STRING("VexdCam");
|
pNewCamera->v.classname = MAKE_STRING("VexdCam");
|
||||||
|
|
||||||
SET_MODEL(pNewCamera, "models/rpgrocket.mdl");
|
SET_MODEL(pNewCamera, "models/rpgrocket.mdl");
|
||||||
|
@ -50,6 +50,16 @@
|
|||||||
|
|
||||||
#define CHECK_ENTITY(x) if (x != 0 && (FNullEnt(TypeConversion.id_to_edict(x)) || x < 0 || x > gpGlobals->maxEntities)) { MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity"); return 0; }
|
#define CHECK_ENTITY(x) if (x != 0 && (FNullEnt(TypeConversion.id_to_edict(x)) || x < 0 || x > gpGlobals->maxEntities)) { MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity"); return 0; }
|
||||||
#define CHECK_OFFSET(x) if (x < 0) { MF_LogError(amx, AMX_ERR_NATIVE, "Invalid offset"); return 0; }
|
#define CHECK_OFFSET(x) if (x < 0) { MF_LogError(amx, AMX_ERR_NATIVE, "Invalid offset"); return 0; }
|
||||||
|
#define CHECK_ENTITY_PDATA(x) \
|
||||||
|
if (FNullEnt(TypeConversion.id_to_edict(x))) { \
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity %d", x); \
|
||||||
|
return 0; \
|
||||||
|
} \
|
||||||
|
else if (!TypeConversion.id_to_edict(x)->pvPrivateData) { \
|
||||||
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity %d (no private data)", x); \
|
||||||
|
return 0; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
extern AMX_NATIVE_INFO engfunc_natives[];
|
extern AMX_NATIVE_INFO engfunc_natives[];
|
||||||
extern AMX_NATIVE_INFO dllfunc_natives[];
|
extern AMX_NATIVE_INFO dllfunc_natives[];
|
||||||
|
@ -86,7 +86,7 @@ static cell AMX_NATIVE_CALL set_tr(AMX *amx, cell *params)
|
|||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
e = TypeConversion.id_to_edict(*ptr);
|
e = TypeConversion.id_to_edict(*ptr);
|
||||||
if (!e || FNullEnt(e))
|
if (*ptr != -1 && FNullEnt(e))
|
||||||
return 0; //TODO: return error
|
return 0; //TODO: return error
|
||||||
gfm_tr->pHit = e;
|
gfm_tr->pHit = e;
|
||||||
return 1;
|
return 1;
|
||||||
@ -167,7 +167,7 @@ static cell AMX_NATIVE_CALL get_tr(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
if (gfm_tr->pHit == NULL || FNullEnt(gfm_tr->pHit))
|
if (FNullEnt(gfm_tr->pHit))
|
||||||
return -1;
|
return -1;
|
||||||
return ENTINDEX(gfm_tr->pHit);
|
return ENTINDEX(gfm_tr->pHit);
|
||||||
break;
|
break;
|
||||||
|
@ -99,7 +99,7 @@ static cell AMX_NATIVE_CALL set_tr2(AMX *amx, cell *params)
|
|||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
edict_t *e = TypeConversion.id_to_edict(*ptr);
|
edict_t *e = TypeConversion.id_to_edict(*ptr);
|
||||||
if (!e || FNullEnt(e))
|
if (*ptr != -1 && FNullEnt(e))
|
||||||
return 0; //TODO: return error
|
return 0; //TODO: return error
|
||||||
tr->pHit = e;
|
tr->pHit = e;
|
||||||
return 1;
|
return 1;
|
||||||
@ -187,7 +187,7 @@ static cell AMX_NATIVE_CALL get_tr2(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
case TR_pHit:
|
case TR_pHit:
|
||||||
{
|
{
|
||||||
if (tr->pHit == NULL || FNullEnt(tr->pHit))
|
if (FNullEnt(tr->pHit))
|
||||||
return -1;
|
return -1;
|
||||||
return ENTINDEX(tr->pHit);
|
return ENTINDEX(tr->pHit);
|
||||||
break;
|
break;
|
||||||
|
@ -18,7 +18,7 @@ static cell AMX_NATIVE_CALL copy_infokey_buffer(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
char *infobuffer = reinterpret_cast<char *>(params[1]);
|
char *infobuffer = reinterpret_cast<char *>(params[1]);
|
||||||
|
|
||||||
return MF_SetAmxString(amx, params[2], infobuffer, params[3]);
|
return MF_SetAmxString(amx, params[2], infobuffer ? infobuffer : "", params[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// lookup_sequence(entid, "sequence name", &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0);
|
// lookup_sequence(entid, "sequence name", &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0);
|
||||||
|
@ -120,11 +120,14 @@
|
|||||||
<ClInclude Include="..\..\..\public\HLTypeConversion.h" />
|
<ClInclude Include="..\..\..\public\HLTypeConversion.h" />
|
||||||
<ClInclude Include="..\..\..\public\memtools\MemoryUtils.h" />
|
<ClInclude Include="..\..\..\public\memtools\MemoryUtils.h" />
|
||||||
<ClInclude Include="..\..\..\public\resdk\common\hookchains.h" />
|
<ClInclude Include="..\..\..\public\resdk\common\hookchains.h" />
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSEntity.h" />
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSInterfaces.h" />
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSPlayer.h" />
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSPlayerItem.h" />
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSPlayerWeapon.h" />
|
||||||
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_api.h" />
|
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_api.h" />
|
||||||
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_const.h" />
|
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_const.h" />
|
||||||
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_interfaces.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\resdk\mod_regamedll_api.h" />
|
<ClInclude Include="..\..\..\public\resdk\mod_regamedll_api.h" />
|
||||||
<ClInclude Include="..\..\..\public\resdk\mod_rehlds_api.h" />
|
|
||||||
<ClInclude Include="..\fakemeta_amxx.h" />
|
<ClInclude Include="..\fakemeta_amxx.h" />
|
||||||
<ClInclude Include="..\fm_tr.h" />
|
<ClInclude Include="..\fm_tr.h" />
|
||||||
<ClInclude Include="..\dllfunc.h" />
|
<ClInclude Include="..\dllfunc.h" />
|
||||||
@ -148,4 +151,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -45,6 +45,9 @@
|
|||||||
<Filter Include="ReSDK\cstrike">
|
<Filter Include="ReSDK\cstrike">
|
||||||
<UniqueIdentifier>{0d1c5025-071d-43aa-b19a-2eee0d34a906}</UniqueIdentifier>
|
<UniqueIdentifier>{0d1c5025-071d-43aa-b19a-2eee0d34a906}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="ReSDK\cstrike\API">
|
||||||
|
<UniqueIdentifier>{2800175e-06bf-42bf-b3c1-f86561471531}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\fakemeta_amxx.cpp">
|
<ClCompile Include="..\fakemeta_amxx.cpp">
|
||||||
@ -145,14 +148,23 @@
|
|||||||
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_const.h">
|
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_const.h">
|
||||||
<Filter>ReSDK\cstrike</Filter>
|
<Filter>ReSDK\cstrike</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\public\resdk\cstrike\regamedll_interfaces.h">
|
|
||||||
<Filter>ReSDK\cstrike</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\resdk\mod_regamedll_api.h">
|
<ClInclude Include="..\..\..\public\resdk\mod_regamedll_api.h">
|
||||||
<Filter>ReSDK</Filter>
|
<Filter>ReSDK</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\public\resdk\mod_rehlds_api.h">
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSEntity.h">
|
||||||
<Filter>ReSDK</Filter>
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSInterfaces.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSPlayer.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSPlayerItem.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\public\resdk\cstrike\API\CSPlayerWeapon.h">
|
||||||
|
<Filter>ReSDK\cstrike\API</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -32,18 +32,18 @@
|
|||||||
//implement these with setjmp later.
|
//implement these with setjmp later.
|
||||||
bool IsBadReadPtr(void *l, size_t size)
|
bool IsBadReadPtr(void *l, size_t size)
|
||||||
{
|
{
|
||||||
return false;
|
return l ? false : true;
|
||||||
}
|
}
|
||||||
bool IsBadWritePtr(void *l, size_t size)
|
bool IsBadWritePtr(void *l, size_t size)
|
||||||
{
|
{
|
||||||
return false;
|
return l ? false : true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL set_pdata_int(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_int(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -65,7 +65,7 @@ static cell AMX_NATIVE_CALL set_pdata_int(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_int(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_int(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -87,7 +87,7 @@ static cell AMX_NATIVE_CALL get_pdata_int(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_float(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_float(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -109,7 +109,7 @@ static cell AMX_NATIVE_CALL set_pdata_float(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_float(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_float(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -130,7 +130,7 @@ static cell AMX_NATIVE_CALL get_pdata_float(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_string(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_string(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -167,7 +167,7 @@ static cell AMX_NATIVE_CALL get_pdata_string(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_string(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_string(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -192,30 +192,35 @@ static cell AMX_NATIVE_CALL set_pdata_string(AMX *amx, cell *params)
|
|||||||
szData = get_pdata_direct<char*>(pEdict, iOffset);
|
szData = get_pdata_direct<char*>(pEdict, iOffset);
|
||||||
if (IsBadWritePtr(szData, 1))
|
if (IsBadWritePtr(szData, 1))
|
||||||
return 0;
|
return 0;
|
||||||
strcpy(szData, data);
|
|
||||||
} else {
|
} else {
|
||||||
szData = get_pdata<char*>(pEdict, iOffset);
|
szData = get_pdata<char*>(pEdict, iOffset);
|
||||||
if (IsBadWritePtr(szData, 1))
|
if (IsBadWritePtr(szData, 1))
|
||||||
return 0;
|
return 0;
|
||||||
if (params[4] == 1)
|
|
||||||
|
if (len > static_cast<int>(strlen(szData)))
|
||||||
{
|
{
|
||||||
free(szData);
|
if (params[4] == 1)
|
||||||
szData = (char *)malloc(len + 1);
|
{
|
||||||
} else if (params[4] == 2) {
|
free(szData);
|
||||||
delete [] szData;
|
szData = (char *)malloc(len + 1);
|
||||||
szData = new char[len + 1];
|
}
|
||||||
|
else if (params[4] == 2) {
|
||||||
|
delete[] szData;
|
||||||
|
szData = new char[len + 1];
|
||||||
|
}
|
||||||
|
set_pdata<char*>(pEdict, iOffset, szData);
|
||||||
}
|
}
|
||||||
strcpy(szData, data);
|
|
||||||
set_pdata<char*>(pEdict, iOffset, szData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strncopy(szData, data, len + 1);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_pdata_ent(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_ent(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index=params[1];
|
int index=params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int iOffset=params[2];
|
int iOffset=params[2];
|
||||||
CHECK_OFFSET(iOffset);
|
CHECK_OFFSET(iOffset);
|
||||||
@ -256,7 +261,7 @@ static cell AMX_NATIVE_CALL get_pdata_ent(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_ent(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_ent(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -282,7 +287,7 @@ static cell AMX_NATIVE_CALL set_pdata_ent(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_bool(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_bool(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -303,7 +308,7 @@ static cell AMX_NATIVE_CALL get_pdata_bool(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_bool(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_bool(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -328,7 +333,7 @@ static cell AMX_NATIVE_CALL set_pdata_bool(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_byte(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_byte(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -349,7 +354,7 @@ static cell AMX_NATIVE_CALL get_pdata_byte(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_byte(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_byte(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -374,7 +379,7 @@ static cell AMX_NATIVE_CALL set_pdata_byte(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_short(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_short(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -395,7 +400,7 @@ static cell AMX_NATIVE_CALL get_pdata_short(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_short(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_short(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -420,7 +425,7 @@ static cell AMX_NATIVE_CALL set_pdata_short(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_vector(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_vector(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -449,7 +454,7 @@ static cell AMX_NATIVE_CALL get_pdata_vector(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_vector(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_vector(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -476,7 +481,7 @@ static cell AMX_NATIVE_CALL set_pdata_vector(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_pdata_ehandle(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_pdata_ehandle(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
@ -524,7 +529,7 @@ static cell AMX_NATIVE_CALL get_pdata_ehandle(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_pdata_ehandle(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_pdata_ehandle(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY_PDATA(index);
|
||||||
|
|
||||||
int offset = params[2];
|
int offset = params[2];
|
||||||
CHECK_OFFSET(offset);
|
CHECK_OFFSET(offset);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
static cell AMX_NATIVE_CALL get_ent_data(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_ent_data(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -33,7 +33,7 @@ static cell AMX_NATIVE_CALL get_ent_data(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_ent_data(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_ent_data(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -57,7 +57,7 @@ static cell AMX_NATIVE_CALL set_ent_data(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_ent_data_float(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_ent_data_float(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -72,7 +72,7 @@ static cell AMX_NATIVE_CALL get_ent_data_float(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_ent_data_float(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_ent_data_float(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -90,7 +90,7 @@ static cell AMX_NATIVE_CALL set_ent_data_float(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_ent_data_vector(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_ent_data_vector(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -107,7 +107,7 @@ static cell AMX_NATIVE_CALL get_ent_data_vector(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_ent_data_vector(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_ent_data_vector(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -125,7 +125,7 @@ static cell AMX_NATIVE_CALL set_ent_data_vector(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_ent_data_entity(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_ent_data_entity(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -142,7 +142,7 @@ static cell AMX_NATIVE_CALL set_ent_data_entity(AMX *amx, cell *params)
|
|||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
int value = params[4];
|
int value = params[4];
|
||||||
|
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
if (value != -1)
|
if (value != -1)
|
||||||
{
|
{
|
||||||
@ -165,7 +165,7 @@ static cell AMX_NATIVE_CALL set_ent_data_entity(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_ent_data_string(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_ent_data_string(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
@ -190,7 +190,7 @@ static cell AMX_NATIVE_CALL get_ent_data_string(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL set_ent_data_string(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL set_ent_data_string(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int entity = params[1];
|
int entity = params[1];
|
||||||
CHECK_ENTITY(entity);
|
CHECK_ENTITY_PDATA(entity);
|
||||||
|
|
||||||
TypeDescription data;
|
TypeDescription data;
|
||||||
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
GET_TYPE_DESCRIPTION(2, data, CommonConfig);
|
||||||
|
@ -325,6 +325,32 @@ static cell AMX_NATIVE_CALL set_user_rendering(AMX *amx, cell *params) // set_us
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cell AMX_NATIVE_CALL get_user_rendering(AMX *amx, cell *params) // get_user_rendering(index, &fx = kRenderFxNone, &r = 0, &g = 0, &b = 0, &render = kRenderNormal, &amount = 0); = 7 arguments
|
||||||
|
{
|
||||||
|
// Gets user rendering.
|
||||||
|
// params[1] = index
|
||||||
|
// params[2] = fx
|
||||||
|
// params[3] = r
|
||||||
|
// params[4] = g
|
||||||
|
// params[5] = b
|
||||||
|
// params[6] = render
|
||||||
|
// params[7] = amount
|
||||||
|
|
||||||
|
// Check index
|
||||||
|
CHECK_PLAYER(params[1]);
|
||||||
|
|
||||||
|
// Fetch player pointer
|
||||||
|
edict_t *pPlayer = TypeConversion.id_to_edict(params[1]);
|
||||||
|
|
||||||
|
*MF_GetAmxAddr(amx, params[2]) = pPlayer->v.renderfx;
|
||||||
|
*MF_GetAmxAddr(amx, params[3]) = pPlayer->v.rendercolor[0];
|
||||||
|
*MF_GetAmxAddr(amx, params[4]) = pPlayer->v.rendercolor[1];
|
||||||
|
*MF_GetAmxAddr(amx, params[5]) = pPlayer->v.rendercolor[2];
|
||||||
|
*MF_GetAmxAddr(amx, params[6]) = pPlayer->v.rendermode;
|
||||||
|
*MF_GetAmxAddr(amx, params[7]) = pPlayer->v.renderamt;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL set_user_maxspeed(AMX *amx, cell *params) // set_user_maxspeed(index, Float:speed = -1.0) = 2 arguments
|
static cell AMX_NATIVE_CALL set_user_maxspeed(AMX *amx, cell *params) // set_user_maxspeed(index, Float:speed = -1.0) = 2 arguments
|
||||||
{
|
{
|
||||||
@ -548,6 +574,7 @@ AMX_NATIVE_INFO fun_Exports[] = {
|
|||||||
{"set_user_armor", set_user_armor},
|
{"set_user_armor", set_user_armor},
|
||||||
{"set_user_origin", set_user_origin},
|
{"set_user_origin", set_user_origin},
|
||||||
{"set_user_rendering", set_user_rendering},
|
{"set_user_rendering", set_user_rendering},
|
||||||
|
{"get_user_rendering", get_user_rendering},
|
||||||
{"set_user_maxspeed", set_user_maxspeed},
|
{"set_user_maxspeed", set_user_maxspeed},
|
||||||
{"get_user_maxspeed", get_user_maxspeed},
|
{"get_user_maxspeed", get_user_maxspeed},
|
||||||
{"set_user_gravity", set_user_gravity},
|
{"set_user_gravity", set_user_gravity},
|
||||||
|
@ -151,6 +151,7 @@ public stock const Float:NULL_VECTOR[3];
|
|||||||
#define HIT_LEFTLEG 6
|
#define HIT_LEFTLEG 6
|
||||||
#define HIT_RIGHTLEG 7
|
#define HIT_RIGHTLEG 7
|
||||||
#define HIT_SHIELD 8 // CS only
|
#define HIT_SHIELD 8 // CS only
|
||||||
|
#define MAX_BODYHITS 8
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @section emit_sound() constants
|
* @section emit_sound() constants
|
||||||
@ -516,4 +517,20 @@ enum FindPlayerFlags (<<= 1)
|
|||||||
FindPlayer_IncludeConnecting // Include connecting clients
|
FindPlayer_IncludeConnecting // Include connecting clients
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constants for client statistics
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
STATSX_KILLS = 0,
|
||||||
|
STATSX_DEATHS,
|
||||||
|
STATSX_HEADSHOTS,
|
||||||
|
STATSX_TEAMKILLS,
|
||||||
|
STATSX_SHOTS,
|
||||||
|
STATSX_HITS,
|
||||||
|
STATSX_DAMAGE,
|
||||||
|
STATSX_RANK,
|
||||||
|
STATSX_MAX_STATS
|
||||||
|
}
|
||||||
|
|
||||||
#include <cstrike_const> // To keep backward compatibility
|
#include <cstrike_const> // To keep backward compatibility
|
||||||
|
@ -2142,6 +2142,9 @@ native random_num(a, b);
|
|||||||
* @note Example usage: get_user_msgid("TextMsg")
|
* @note Example usage: get_user_msgid("TextMsg")
|
||||||
* @note The message id is unique as long as the server is running, but might
|
* @note The message id is unique as long as the server is running, but might
|
||||||
* change between updates. They should not be hardcoded into plugins.
|
* change between updates. They should not be hardcoded into plugins.
|
||||||
|
* @note On first server start, this function will return 0 if used inside
|
||||||
|
* plugin_precache(). Consider hooking RegUserMsg in order to retrieve
|
||||||
|
* the correct message id.
|
||||||
*
|
*
|
||||||
* @param name Client message name
|
* @param name Client message name
|
||||||
*
|
*
|
||||||
@ -3283,7 +3286,7 @@ native DestroyForward(forward_handle);
|
|||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
native arrayset(array[], value, size);
|
native arrayset(any:array[], any:value, size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the weapon id associated with a weapon name.
|
* Returns the weapon id associated with a weapon name.
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _csstats_included
|
#define _csstats_included
|
||||||
|
|
||||||
|
#include <csstats_const>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the client's current weapon statistics.
|
* Retrieves the client's current weapon statistics.
|
||||||
*
|
*
|
||||||
@ -19,6 +21,8 @@
|
|||||||
* amxconst.inc, this function also works on custom weapons.
|
* amxconst.inc, this function also works on custom weapons.
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -39,7 +43,7 @@
|
|||||||
* @error If an invalid client index or weapon id is provided, an
|
* @error If an invalid client index or weapon id is provided, an
|
||||||
* error will be thrown.
|
* error will be thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_wstats(index, wpnindex, stats[8], bodyhits[8]);
|
native get_user_wstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the client's weapon statistics from the current round.
|
* Retrieves the client's weapon statistics from the current round.
|
||||||
@ -48,6 +52,8 @@ native get_user_wstats(index, wpnindex, stats[8], bodyhits[8]);
|
|||||||
* amxconst.inc, this function also works on custom weapons.
|
* amxconst.inc, this function also works on custom weapons.
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -68,7 +74,7 @@ native get_user_wstats(index, wpnindex, stats[8], bodyhits[8]);
|
|||||||
* @error If an invalid client index or weapon id is provided, an
|
* @error If an invalid client index or weapon id is provided, an
|
||||||
* error will be thrown.
|
* error will be thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_wrstats(index, wpnindex, stats[8], bodyhits[8]);
|
native get_user_wrstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the client's weapon statistics from the permanent storage on the
|
* Retrieves the client's weapon statistics from the permanent storage on the
|
||||||
@ -80,6 +86,8 @@ native get_user_wrstats(index, wpnindex, stats[8], bodyhits[8]);
|
|||||||
* deaths/teamkills.
|
* deaths/teamkills.
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -99,13 +107,15 @@ native get_user_wrstats(index, wpnindex, stats[8], bodyhits[8]);
|
|||||||
* @error If an invalid client index is provided, an error will be
|
* @error If an invalid client index is provided, an error will be
|
||||||
* thrown.
|
* thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_stats(index, stats[8], bodyhits[8]);
|
native get_user_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the client's statistics from the current round.
|
* Retrieves the client's statistics from the current round.
|
||||||
*
|
*
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -123,7 +133,7 @@ native get_user_stats(index, stats[8], bodyhits[8]);
|
|||||||
* @error If an invalid client index is provided, an error will be
|
* @error If an invalid client index is provided, an error will be
|
||||||
* thrown.
|
* thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_rstats(index, stats[8], bodyhits[8]);
|
native get_user_rstats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the client's statistics inflicted upon another client from the
|
* Retrieves the client's statistics inflicted upon another client from the
|
||||||
@ -131,6 +141,8 @@ native get_user_rstats(index, stats[8], bodyhits[8]);
|
|||||||
*
|
*
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -153,7 +165,7 @@ native get_user_rstats(index, stats[8], bodyhits[8]);
|
|||||||
* @error If an invalid client index is provided, an error will be
|
* @error If an invalid client index is provided, an error will be
|
||||||
* thrown.
|
* thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_vstats(index, victim, stats[8], bodyhits[8], wpnname[] = "", len = 0);
|
native get_user_vstats(index, victim, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the client's statistics received from another client from the
|
* Retrieves the client's statistics received from another client from the
|
||||||
@ -161,6 +173,8 @@ native get_user_vstats(index, victim, stats[8], bodyhits[8], wpnname[] = "", len
|
|||||||
*
|
*
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -183,7 +197,7 @@ native get_user_vstats(index, victim, stats[8], bodyhits[8], wpnname[] = "", len
|
|||||||
* @error If an invalid client index is provided, an error will be
|
* @error If an invalid client index is provided, an error will be
|
||||||
* thrown.
|
* thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_astats(index, wpnindex, stats[8], bodyhits[8], wpnname[] = "", len = 0);
|
native get_user_astats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the current round weapon, attacker and victim statistics.
|
* Resets the current round weapon, attacker and victim statistics.
|
||||||
@ -206,6 +220,8 @@ native reset_user_wstats(index);
|
|||||||
* deaths/teamkills.
|
* deaths/teamkills.
|
||||||
* @note For a list of possible body hitplaces see the HIT_* constants in
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
* amxconst.inc
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - Kills
|
* 0 - Kills
|
||||||
* 1 - Deaths
|
* 1 - Deaths
|
||||||
@ -227,7 +243,7 @@ native reset_user_wstats(index);
|
|||||||
* @return Next rank index (> 0 and > index), or 0 if no more
|
* @return Next rank index (> 0 and > index), or 0 if no more
|
||||||
* statistics exist
|
* statistics exist
|
||||||
*/
|
*/
|
||||||
native get_stats(index, stats[8], bodyhits[8], name[], len, authid[] = "", authidlen = 0);
|
native get_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], name[], len, authid[] = "", authidlen = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of all entries in the permanent statistics storage.
|
* Returns the number of all entries in the permanent statistics storage.
|
||||||
@ -240,6 +256,8 @@ native get_statsnum();
|
|||||||
* Retrieves the client's objective statistics from the permanent storage.
|
* Retrieves the client's objective statistics from the permanent storage.
|
||||||
*
|
*
|
||||||
* @note The permanent storage is updated on every respawn or client disconnect.
|
* @note The permanent storage is updated on every respawn or client disconnect.
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - total defusions
|
* 0 - total defusions
|
||||||
* 1 - bomb defused
|
* 1 - bomb defused
|
||||||
@ -254,13 +272,15 @@ native get_statsnum();
|
|||||||
* @error If an invalid client index is provided, an error will be
|
* @error If an invalid client index is provided, an error will be
|
||||||
* thrown.
|
* thrown.
|
||||||
*/
|
*/
|
||||||
native get_user_stats2(index, stats[4]);
|
native get_user_stats2(index, stats[STATSX_MAX_OBJECTIVE]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves objective statistics from the permanent storage on the server via
|
* Retrieves objective statistics from the permanent storage on the server via
|
||||||
* iterative, incremental access.
|
* iterative, incremental access.
|
||||||
*
|
*
|
||||||
* @note The permanent storage is updated on every respawn or client disconnect.
|
* @note The permanent storage is updated on every respawn or client disconnect.
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
* @note The fields in the statistics are:
|
* @note The fields in the statistics are:
|
||||||
* 0 - total defusions
|
* 0 - total defusions
|
||||||
* 1 - bomb defused
|
* 1 - bomb defused
|
||||||
@ -275,4 +295,4 @@ native get_user_stats2(index, stats[4]);
|
|||||||
* @return Next rank index (> 0 and > index), or 0 if no more
|
* @return Next rank index (> 0 and > index), or 0 if no more
|
||||||
* statistics exist
|
* statistics exist
|
||||||
*/
|
*/
|
||||||
native get_stats2(index, stats[4], authid[] = "", authidlen = 0);
|
native get_stats2(index, stats[STATSX_MAX_OBJECTIVE], authid[] = "", authidlen = 0);
|
||||||
|
29
plugins/include/csstats_const.inc
Normal file
29
plugins/include/csstats_const.inc
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Counter-Strike Functions
|
||||||
|
//
|
||||||
|
|
||||||
|
#if defined _csstats_const_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _csstats_const_included
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constants for objective based statistics
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
STATSX_TOTAL_DEFUSIONS = 0,
|
||||||
|
STATSX_BOMBS_DEFUSED,
|
||||||
|
STATSX_BOMBS_PLANTED,
|
||||||
|
STATSX_BOMB_EXPLOSIONS,
|
||||||
|
STATSX_MAX_OBJECTIVE
|
||||||
|
}
|
@ -136,3 +136,17 @@ enum {
|
|||||||
DODC_PIAT,
|
DODC_PIAT,
|
||||||
//DODC_BRIT_MORTAR,
|
//DODC_BRIT_MORTAR,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* DoD stats constants */
|
||||||
|
enum {
|
||||||
|
DODX_KILLS = 0,
|
||||||
|
DODX_DEATHS,
|
||||||
|
DODX_HEADSHOTS,
|
||||||
|
DODX_TEAMKILLS,
|
||||||
|
DODX_SHOTS,
|
||||||
|
DODX_HITS,
|
||||||
|
DODX_DAMAGE,
|
||||||
|
DODX_POINTS,
|
||||||
|
DODX_RANK,
|
||||||
|
DODX_MAX_STATS
|
||||||
|
}
|
||||||
|
@ -28,34 +28,34 @@
|
|||||||
* 6 - damage
|
* 6 - damage
|
||||||
* 7 - score
|
* 7 - score
|
||||||
* For body hits fields see amxconst.inc. */
|
* For body hits fields see amxconst.inc. */
|
||||||
native get_user_wstats(index,wpnindex,stats[9],bodyhits[8]);
|
native get_user_wstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets round stats from given weapon index.*/
|
/* Gets round stats from given weapon index.*/
|
||||||
native get_user_wrstats(index,wpnindex,stats[9],bodyhits[8]);
|
native get_user_wrstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets life (from spawn to spawn) stats from given weapon index.*/
|
/* Gets life (from spawn to spawn) stats from given weapon index.*/
|
||||||
native get_user_wlstats(index,wpnindex,stats[9],bodyhits[8]);
|
native get_user_wlstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets overall stats which are stored in file on server
|
/* Gets overall stats which are stored in file on server
|
||||||
* and updated on every respawn or user disconnect.
|
* and updated on every respawn or user disconnect.
|
||||||
* Function returns the position in stats by diff. kills to deaths. */
|
* Function returns the position in stats by diff. kills to deaths. */
|
||||||
native get_user_stats(index,stats[9],bodyhits[8]);
|
native get_user_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets round stats of player. */
|
/* Gets round stats of player. */
|
||||||
native get_user_rstats(index,stats[9],bodyhits[8]);
|
native get_user_rstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets life (from spawn to spawn) stats of player. */
|
/* Gets life (from spawn to spawn) stats of player. */
|
||||||
native get_user_lstats(index,stats[9],bodyhits[8]);
|
native get_user_lstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
||||||
* then stats are from all victims. If victim has not been hurt, function
|
* then stats are from all victims. If victim has not been hurt, function
|
||||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||||
native get_user_vstats(index,victim,stats[9],bodyhits[8],wpnname[]="",len=0);
|
native get_user_vstats(index,victim,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
||||||
|
|
||||||
/* Gets stats with which user have been killed/hurt. If killer is 0
|
/* Gets stats with which user have been killed/hurt. If killer is 0
|
||||||
* then stats are from all attacks. If killer has not hurt user, function
|
* then stats are from all attacks. If killer has not hurt user, function
|
||||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||||
native get_user_astats(index,wpnindex,stats[9],bodyhits[8],wpnname[]="",len=0);
|
native get_user_astats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
||||||
|
|
||||||
/* Resets life, weapon, victims and attackers user stats. */
|
/* Resets life, weapon, victims and attackers user stats. */
|
||||||
native reset_user_wstats(index);
|
native reset_user_wstats(index);
|
||||||
@ -63,7 +63,7 @@ native reset_user_wstats(index);
|
|||||||
/* Gets overall stats which stored in stats.dat file in amx folder
|
/* Gets overall stats which stored in stats.dat file in amx folder
|
||||||
* and updated on every mapchange or user disconnect.
|
* and updated on every mapchange or user disconnect.
|
||||||
* Function returns next index of stats entry or 0 if no more exists. */
|
* Function returns next index of stats entry or 0 if no more exists. */
|
||||||
native get_stats(index,stats[9],bodyhits[8],name[],len);
|
native get_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len);
|
||||||
|
|
||||||
/* Returns number of all entries in stats. */
|
/* Returns number of all entries in stats. */
|
||||||
native get_statsnum();
|
native get_statsnum();
|
||||||
|
@ -125,6 +125,26 @@ native set_user_origin(index, const origin[3]);
|
|||||||
*/
|
*/
|
||||||
native set_user_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0);
|
native set_user_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets player's rendering mode.
|
||||||
|
*
|
||||||
|
* @note A really useful render modes reference:
|
||||||
|
* https://sites.google.com/site/svenmanor/rendermodes
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param fx Variable to store the rendering effect
|
||||||
|
* @param r Variable to store the amount of red color
|
||||||
|
* @param g Variable to store the amount of green color
|
||||||
|
* @param b Variable to store the amount of blue color
|
||||||
|
* @param render Variable to store the render mode
|
||||||
|
* @param amount Variable to store the render amount
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If player is not connected or not within the range
|
||||||
|
* of 1 to MaxClients.
|
||||||
|
*/
|
||||||
|
native get_user_rendering(index, &fx = kRenderFxNone, &r = 0, &g = 0, &b = 0, &render = kRenderNormal, &amount = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gives an item to a player.
|
* Gives an item to a player.
|
||||||
*
|
*
|
||||||
|
@ -16,7 +16,15 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _message_stocks_included
|
#define _message_stocks_included
|
||||||
|
|
||||||
/* Creates a death message. */
|
/**
|
||||||
|
* Sends a death message.
|
||||||
|
*
|
||||||
|
* @param killer Killer id
|
||||||
|
* @param victim Victim id
|
||||||
|
* @param weaponNUM Weapon index
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
stock dod_make_deathmsg(killer, victim, weaponNUM)
|
stock dod_make_deathmsg(killer, victim, weaponNUM)
|
||||||
{
|
{
|
||||||
static msgid = 0;
|
static msgid = 0;
|
||||||
@ -33,7 +41,14 @@ stock dod_make_deathmsg(killer, victim, weaponNUM)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Kills a user without a message. */
|
/**
|
||||||
|
* Kills a user without a message.
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param flag If nonzero, the death will not affect the client's score
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
stock user_silentkill(index, flag = 1)
|
stock user_silentkill(index, flag = 1)
|
||||||
{
|
{
|
||||||
static msgid = 0;
|
static msgid = 0;
|
||||||
@ -50,7 +65,16 @@ stock user_silentkill(index, flag = 1)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Creates a death message. */
|
/**
|
||||||
|
* Creates a death message.
|
||||||
|
*
|
||||||
|
* @param killer Killer id
|
||||||
|
* @param victim Victim id
|
||||||
|
* @param headshot Headshot
|
||||||
|
* @param weapon Weapon
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
stock make_deathmsg(killer, victim, headshot, const weapon[])
|
stock make_deathmsg(killer, victim, headshot, const weapon[])
|
||||||
{
|
{
|
||||||
static msgid = 0;
|
static msgid = 0;
|
||||||
|
@ -18,88 +18,587 @@
|
|||||||
|
|
||||||
#include <message_const>
|
#include <message_const>
|
||||||
|
|
||||||
/* These functinos are used to generate client messages.
|
/**
|
||||||
* You may generate menu, smoke, shockwaves, thunderlights,
|
* Marks the beginning of a client message.
|
||||||
* intermission and many many others messages.
|
*
|
||||||
* See HL SDK for more examples. */
|
* @note You may generate menus, smoke, shockwaves, thunderlights,
|
||||||
|
* intermission and many other messages.
|
||||||
|
* @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events
|
||||||
|
* @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages
|
||||||
|
* @note You may also refer to the messages_const.inc file for examples.
|
||||||
|
* @note Each message starts with a message_begin() or message_begin_f() function
|
||||||
|
* and ends with message_end(). The specific message arguments go in between
|
||||||
|
* these two by using the write_*() functions found in messages.inc.
|
||||||
|
*
|
||||||
|
* @param dest Destination type (see MSG_* constants in messages_const.inc)
|
||||||
|
* @param msg_type Message id
|
||||||
|
* @param origin Message origin
|
||||||
|
* @param player Client index receiving the message or 0 for all clients
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message id is specified or an invalid number
|
||||||
|
* of parameters is passed, an error will be thrown.
|
||||||
|
*/
|
||||||
native message_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0);
|
native message_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks the beginning of a client message.
|
||||||
|
*
|
||||||
|
* @note You may generate menus, smoke, shockwaves, thunderlights,
|
||||||
|
* intermission and many other messages.
|
||||||
|
* @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events
|
||||||
|
* @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages
|
||||||
|
* @note You may also refer to the messages_const.inc file for examples.
|
||||||
|
* @note This function is the same as message_begin(), but the origin
|
||||||
|
* argument accepts only float values in this one.
|
||||||
|
* @note Each message starts with a message_begin() or message_begin_f() function
|
||||||
|
* and ends with message_end(). The specific message arguments go in between
|
||||||
|
* these two by using the write_*() functions found in messages.inc.
|
||||||
|
*
|
||||||
|
* @param dest Destination type (see MSG_* constants in messages_const.inc)
|
||||||
|
* @param msg_type Message id
|
||||||
|
* @param origin Message origin
|
||||||
|
* @param player Client index receiving the message or 0 for all clients
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message id is specified or an invalid number
|
||||||
|
* of parameters is passed, an error will be thrown.
|
||||||
|
*/
|
||||||
native message_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0);
|
native message_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ends a message that was started with message_begin() or message_begin_f().
|
||||||
|
*
|
||||||
|
* @note If the function is called without using message_begin() or
|
||||||
|
* message_begin_f() first, the server will crash immediately.
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native message_end();
|
native message_end();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single byte to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Byte to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_byte(x);
|
native write_byte(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single character to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Character to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_char(x);
|
native write_char(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single number to a message (short).
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Number to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_short(x);
|
native write_short(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single number to a message (long).
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Number to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_long(x);
|
native write_long(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes an entity index to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Entity index to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_entity(x);
|
native write_entity(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes an angle entry to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Angle to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_angle(x);
|
native write_angle(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes an angle entry to a message using a float value.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Angle to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_angle_f(Float:x);
|
native write_angle_f(Float:x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a coordinate entry to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Coordinate to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_coord(x);
|
native write_coord(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a coordinate entry to a message using a float value.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Coordinate to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_coord_f(Float:x);
|
native write_coord_f(Float:x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a string to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a message_begin()
|
||||||
|
* or message_begin_f() and a message_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x String to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native write_string(const x[]);
|
native write_string(const x[]);
|
||||||
|
|
||||||
/* These are the same as above, except that the messages sent
|
/**
|
||||||
* are also sent to all other plugins and Metamod plugins.
|
* Marks the beginning of a client message.
|
||||||
* This means that if you send one of these messages, other plugins will
|
*
|
||||||
* be notified, which was previously impossible.
|
* @note You may generate menus, smoke, shockwaves, thunderlights,
|
||||||
* BE CAREFUL! Using these incorrectly, or not for their intended purpose,
|
* intermission and many other messages.
|
||||||
* could cause infinite recursion or something just as bad.
|
* @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events
|
||||||
* NOTE! These natives are experimental.
|
* @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages
|
||||||
|
* @note You may also refer to the messages_const.inc file for examples.
|
||||||
|
* @note This function is the same as message_begin(), except that the messages
|
||||||
|
* sent with this one are also sent to all other AMXX and Metamod plugins.
|
||||||
|
* This means that if you send one of these messages, other plugins will
|
||||||
|
* be notified of that message, which was previously impossible.
|
||||||
|
* @note BE CAREFUL! Using this incorrectly, or not for its intended purpose,
|
||||||
|
* could cause infinite recursion or something just as bad!
|
||||||
|
* @note Each message starts with a emessage_begin() or emessage_begin_f() function
|
||||||
|
* and ends with emessage_end(). The specific message arguments go in between
|
||||||
|
* these two by using the ewrite_*() functions found in messages.inc.
|
||||||
|
*
|
||||||
|
* @param dest Destination type (see MSG_* constants in messages_const.inc)
|
||||||
|
* @param msg_type Message id
|
||||||
|
* @param origin Message origin
|
||||||
|
* @param player Client index receiving the message or 0 for all clients
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message id is specified or an invalid number
|
||||||
|
* of parameters is passed, an error will be thrown.
|
||||||
*/
|
*/
|
||||||
native emessage_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0);
|
native emessage_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks the beginning of a client message.
|
||||||
|
*
|
||||||
|
* @note You may generate menus, smoke, shockwaves, thunderlights,
|
||||||
|
* intermission and many other messages.
|
||||||
|
* @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events
|
||||||
|
* @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages
|
||||||
|
* @note You may also refer to the messages_const.inc file for examples.
|
||||||
|
* @note This function is the same as message_begin_f(), except that the messages
|
||||||
|
* sent with this one are also sent to all other AMXX and Metamod plugins.
|
||||||
|
* This means that if you send one of these messages, other plugins will
|
||||||
|
* be notified of that message, which was previously impossible.
|
||||||
|
* @note BE CAREFUL! Using this incorrectly, or not for its intended purpose,
|
||||||
|
* could cause infinite recursion or something just as bad!
|
||||||
|
* @note This function is the same as emessage_begin(), but the origin
|
||||||
|
* argument accepts only float values in this one.
|
||||||
|
* @note Each message starts with a emessage_begin() or emessage_begin_f() function
|
||||||
|
* and ends with emessage_end(). The specific message arguments go in between
|
||||||
|
* these two by using the ewrite_*() functions found in messages.inc.
|
||||||
|
*
|
||||||
|
* @param dest Destination type (see MSG_* constants in messages_const.inc)
|
||||||
|
* @param msg_type Message id
|
||||||
|
* @param origin Message origin
|
||||||
|
* @param player Client index receiving the message or 0 for all clients
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message id is specified or an invalid number
|
||||||
|
* of parameters is passed, an error will be thrown.
|
||||||
|
*/
|
||||||
native emessage_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0);
|
native emessage_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ends a message that was started with emessage_begin() or emessage_begin_f().
|
||||||
|
*
|
||||||
|
* @note If the function is called without using emessage_begin() or
|
||||||
|
* emessage_begin_f() first, the server will crash immediately.
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native emessage_end();
|
native emessage_end();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single byte to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Byte to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_byte(x);
|
native ewrite_byte(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single character to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Character to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_char(x);
|
native ewrite_char(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single number to a message (short).
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Number to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_short(x);
|
native ewrite_short(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single number to a message (long).
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Number to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_long(x);
|
native ewrite_long(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes an entity index to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Entity index to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_entity(x);
|
native ewrite_entity(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes an angle entry to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Angle to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_angle(x);
|
native ewrite_angle(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes an angle entry to a message using a float value.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Angle to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_angle_f(Float:x);
|
native ewrite_angle_f(Float:x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a coordinate entry to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Coordinate to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_coord(x);
|
native ewrite_coord(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a coordinate entry to a message using a float value.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x Coordinate to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_coord_f(Float:x);
|
native ewrite_coord_f(Float:x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a string to a message.
|
||||||
|
*
|
||||||
|
* @note This function should only be used in between a emessage_begin()
|
||||||
|
* or emessage_begin_f() and a emessage_end() function. Trying to use
|
||||||
|
* it outside of these functions will crash the server immediately.
|
||||||
|
*
|
||||||
|
* @param x String to write
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
native ewrite_string(const x[]);
|
native ewrite_string(const x[]);
|
||||||
|
|
||||||
/* Sets/Gets what engine messages are blocked. */
|
/**
|
||||||
|
* Sets whether or not an engine message will be blocked.
|
||||||
|
*
|
||||||
|
* @note For a list of message flags, have a look at the BLOCK_* constants
|
||||||
|
* in message_const.inc.
|
||||||
|
*
|
||||||
|
* @param iMessage Message id
|
||||||
|
* @param iMessageFlags BLOCK_* constant
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message id is specified, an error
|
||||||
|
* will be thrown.
|
||||||
|
*/
|
||||||
native set_msg_block(iMessage, iMessageFlags);
|
native set_msg_block(iMessage, iMessageFlags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets whether or not an engine message is blocked.
|
||||||
|
*
|
||||||
|
* @param iMessage Message id
|
||||||
|
*
|
||||||
|
* @return BLOCK_* constant
|
||||||
|
* @error If an invalid message id is specified, an error
|
||||||
|
* will be thrown.
|
||||||
|
*/
|
||||||
native get_msg_block(iMessage);
|
native get_msg_block(iMessage);
|
||||||
|
|
||||||
/* Lets you directly hook a message in the engine!
|
/**
|
||||||
* You can overwrite the message before anything happens and either let the message continue
|
* Lets you directly hook a message in the engine.
|
||||||
* or fully block it. Here is how it works:
|
*
|
||||||
* If you hook a message, the message is stored but not sent. You have the opportunity to
|
* @note The function is called in the following manner:
|
||||||
* not only execute code, but to get/set the contents of the message, before you choose to
|
* msg_id - Message id
|
||||||
* either block it or let it go on its way. The hooked function will be passed a msg_id, msg_dest, and entity index.
|
* msg_dest - Destination type (see MSG_* constants in messages_const.inc)
|
||||||
* The return value can be passed to unregister_message() to stop the message from being hooked */
|
* msg_entity - Entity receiving the message
|
||||||
|
*
|
||||||
|
* @note You can overwrite the message before anything happens by using the
|
||||||
|
* set_msg_arg_* functions and either let the message continue by
|
||||||
|
* returning PLUGIN_CONTINUE or fully block it with PLUGIN_HANDLED.
|
||||||
|
* @note If you hook a message, the message is stored but not sent. You have
|
||||||
|
* the opportunity to not only execute code, but to get/set the contents
|
||||||
|
* of the message before you choose to either block it or let it go on
|
||||||
|
* its way.
|
||||||
|
* @note The return value can be passed to unregister_message() in order to
|
||||||
|
* stop the message from being hooked.
|
||||||
|
*
|
||||||
|
* @param iMsgId Message id
|
||||||
|
* @param szFunction Function that will be called
|
||||||
|
*
|
||||||
|
* @return Id that can be passed to unregister_message() on
|
||||||
|
* success, or 0 if an invalid message id is passed
|
||||||
|
* @error If the specified function can't be found, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native register_message(iMsgId, const szFunction[]);
|
native register_message(iMsgId, const szFunction[]);
|
||||||
|
|
||||||
/* Unregisters a message hook previously created with register_message
|
/**
|
||||||
* You must pass the proper message id, and return value from the message to unregister the message successfully. */
|
* Unregisters a message hook previously created with register_message().
|
||||||
|
*
|
||||||
|
* @note You must pass the proper message id and return value from the
|
||||||
|
* message to unregister the message successfully.
|
||||||
|
*
|
||||||
|
* @param iMsgId Message id
|
||||||
|
* @param registeredmsg Registered message id
|
||||||
|
*
|
||||||
|
* @return Id that can again be passed to register_message() on
|
||||||
|
* success, or 0 if an invalid message id is passed
|
||||||
|
* @error If an invalid registered message handle is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native unregister_message(iMsgId, registeredmsg);
|
native unregister_message(iMsgId, registeredmsg);
|
||||||
|
|
||||||
|
/**
|
||||||
/* The get/set _msg commands will fail if used outside a hooked message scope.
|
* Gets number of arguments that were passed to a message.
|
||||||
* They should never be used unless inside a registered message function.
|
*
|
||||||
* There are eight different ways of sending a message, five are ints, two are floats, and one is string.
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
* These are denoted by iArgType. argn is the number
|
* it should never be used unless inside a registered message function.
|
||||||
* of the argument. Exceeding the bounds of 1 to get_msg_args() is a bad idea.
|
*
|
||||||
* As of AMX Mod X 1.5, the middle parameter of set_* no longer does anything.
|
* @return Number of arguments
|
||||||
* You cannot change the message argument type (as this would crash the mod anyway)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Gets number of arguments that were passed to this message */
|
|
||||||
native get_msg_args();
|
native get_msg_args();
|
||||||
|
|
||||||
/* Gets the argument type of argument argn */
|
/**
|
||||||
|
* Gets the argument type of a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
*
|
||||||
|
* @return Argument type (see ARG_* constants in message_const.inc)
|
||||||
|
*/
|
||||||
native get_msg_argtype(argn);
|
native get_msg_argtype(argn);
|
||||||
|
|
||||||
/* Gets the value of argn. */
|
/**
|
||||||
|
* Gets the integer value of a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
*
|
||||||
|
* @return Argument value as an integer
|
||||||
|
* @error If an invalid message argument is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native get_msg_arg_int(argn);
|
native get_msg_arg_int(argn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the float value of a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
*
|
||||||
|
* @return Argument value as a float
|
||||||
|
* @error If an invalid message argument is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native Float:get_msg_arg_float(argn);
|
native Float:get_msg_arg_float(argn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the string value from a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
* @param szReturn Buffer to store the value in
|
||||||
|
* @param iLength Maximum buffer length
|
||||||
|
*
|
||||||
|
* @return String length
|
||||||
|
* @error If an invalid message argument is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native get_msg_arg_string(argn, szReturn[], iLength);
|
native get_msg_arg_string(argn, szReturn[], iLength);
|
||||||
|
|
||||||
/* sets the value of argn. */
|
/**
|
||||||
|
* Sets the integer value of a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
* @param argtype Argument type (see ARG_* constants in message_const.inc)
|
||||||
|
* @param iValue Argument value
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message argument is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native set_msg_arg_int(argn, argtype, iValue);
|
native set_msg_arg_int(argn, argtype, iValue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the float value of a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
* @param argtype Argument type (see ARG_* constants in message_const.inc)
|
||||||
|
* @param fValue Argument value
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message argument is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native set_msg_arg_float(argn, argtype, Float:fValue);
|
native set_msg_arg_float(argn, argtype, Float:fValue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the string value of a specified argument.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param argn Argument number
|
||||||
|
* @param szString Argument value
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid message argument is passed, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native set_msg_arg_string(argn, const szString[]);
|
native set_msg_arg_string(argn, const szString[]);
|
||||||
|
|
||||||
/* Gets the origin of a message */
|
/**
|
||||||
|
* Gets the origin of a message.
|
||||||
|
*
|
||||||
|
* @note This function will fail if used outside a hooked message scope, thus
|
||||||
|
* it should never be used unless inside a registered message function.
|
||||||
|
*
|
||||||
|
* @param _Origin Array to store the origin in
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If the function is used outside a message hook, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
native get_msg_origin(const Float:_Origin[3]);
|
native get_msg_origin(const Float:_Origin[3]);
|
||||||
|
@ -27,28 +27,28 @@
|
|||||||
* 5 - hits
|
* 5 - hits
|
||||||
* 6 - damage
|
* 6 - damage
|
||||||
* For body hits fields see amxconst.inc. */
|
* For body hits fields see amxconst.inc. */
|
||||||
native get_user_wstats(index,wpnindex,stats[8],bodyhits[8]);
|
native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets round stats from given weapon index.*/
|
/* Gets round stats from given weapon index.*/
|
||||||
native get_user_wrstats(index,wpnindex,stats[8],bodyhits[8]);
|
native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets overall stats which are stored in file on server
|
/* Gets overall stats which are stored in file on server
|
||||||
* and updated on every respawn or user disconnect.
|
* and updated on every respawn or user disconnect.
|
||||||
* Function returns the position in stats by diff. kills to deaths. */
|
* Function returns the position in stats by diff. kills to deaths. */
|
||||||
native get_user_stats(index,stats[8],bodyhits[8]);
|
native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets round stats of player. */
|
/* Gets round stats of player. */
|
||||||
native get_user_rstats(index,stats[8],bodyhits[8]);
|
native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
||||||
* then stats are from all victims. If victim has not been hurt, function
|
* then stats are from all victims. If victim has not been hurt, function
|
||||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||||
native get_user_vstats(index,victim,stats[8],bodyhits[8],wpnname[]="",len=0);
|
native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
||||||
|
|
||||||
/* Gets stats with which user have been killed/hurt. If killer is 0
|
/* Gets stats with which user have been killed/hurt. If killer is 0
|
||||||
* then stats are from all attacks. If killer has not hurt user, function
|
* then stats are from all attacks. If killer has not hurt user, function
|
||||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||||
native get_user_astats(index,wpnindex,stats[8],bodyhits[8],wpnname[]="",len=0);
|
native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
||||||
|
|
||||||
/* Resets life, weapon, victims and attackers user stats. */
|
/* Resets life, weapon, victims and attackers user stats. */
|
||||||
native reset_user_wstats(index);
|
native reset_user_wstats(index);
|
||||||
@ -56,7 +56,7 @@ native reset_user_wstats(index);
|
|||||||
/* Gets overall stats which stored in stats.dat file in amx folder
|
/* Gets overall stats which stored in stats.dat file in amx folder
|
||||||
* and updated on every mapchange or user disconnect.
|
* and updated on every mapchange or user disconnect.
|
||||||
* Function returns next index of stats entry or 0 if no more exists. */
|
* Function returns next index of stats entry or 0 if no more exists. */
|
||||||
native get_stats(index,stats[8],bodyhits[8],name[],len);
|
native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len);
|
||||||
|
|
||||||
/* Returns number of all entries in stats. */
|
/* Returns number of all entries in stats. */
|
||||||
native get_statsnum();
|
native get_statsnum();
|
||||||
|
@ -27,31 +27,31 @@
|
|||||||
* 5 - hits
|
* 5 - hits
|
||||||
* 6 - damage
|
* 6 - damage
|
||||||
* For body hits fields see amxconst.inc. */
|
* For body hits fields see amxconst.inc. */
|
||||||
native get_user_wstats(index,wpnindex,stats[8],bodyhits[8]);
|
native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets round stats from given weapon index.*/
|
/* Gets round stats from given weapon index.*/
|
||||||
native get_user_wrstats(index,wpnindex,stats[8],bodyhits[8]);
|
native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets life (from spawn to spawn) stats from given weapon index.*/
|
/* Gets life (from spawn to spawn) stats from given weapon index.*/
|
||||||
native get_user_wlstats(index,wpnindex,stats[8],bodyhits[8]);
|
native get_user_wlstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets overall stats which are stored in file on server
|
/* Gets overall stats which are stored in file on server
|
||||||
* and updated on every respawn or user disconnect.
|
* and updated on every respawn or user disconnect.
|
||||||
* Function returns the position in stats by diff. kills to deaths. */
|
* Function returns the position in stats by diff. kills to deaths. */
|
||||||
native get_user_stats(index,stats[8],bodyhits[8]);
|
native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets round stats of player. */
|
/* Gets round stats of player. */
|
||||||
native get_user_rstats(index,stats[8],bodyhits[8]);
|
native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
||||||
* then stats are from all victims. If victim has not been hurt, function
|
* then stats are from all victims. If victim has not been hurt, function
|
||||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||||
native get_user_vstats(index,victim,stats[8],bodyhits[8],wpnname[]="",len=0);
|
native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
||||||
|
|
||||||
/* Gets stats with which user have been killed/hurt. If killer is 0
|
/* Gets stats with which user have been killed/hurt. If killer is 0
|
||||||
* then stats are from all attacks. If killer has not hurt user, function
|
* then stats are from all attacks. If killer has not hurt user, function
|
||||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||||
native get_user_astats(index,wpnindex,stats[8],bodyhits[8],wpnname[]="",len=0);
|
native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
||||||
|
|
||||||
/* Resets life, weapon, victims and attackers user stats. */
|
/* Resets life, weapon, victims and attackers user stats. */
|
||||||
native reset_user_wstats(index);
|
native reset_user_wstats(index);
|
||||||
@ -59,7 +59,7 @@ native reset_user_wstats(index);
|
|||||||
/* Gets overall stats which stored in stats.dat file in amx folder
|
/* Gets overall stats which stored in stats.dat file in amx folder
|
||||||
* and updated on every mapchange or user disconnect.
|
* and updated on every mapchange or user disconnect.
|
||||||
* Function returns next index of stats entry or 0 if no more exists. */
|
* Function returns next index of stats entry or 0 if no more exists. */
|
||||||
native get_stats(index,stats[8],bodyhits[8],name[],len);
|
native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len);
|
||||||
|
|
||||||
/* Returns number of all entries in stats. */
|
/* Returns number of all entries in stats. */
|
||||||
native get_statsnum();
|
native get_statsnum();
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit c91e8560fb00984465a1a916172123b80a76dd04
|
Subproject commit bee3fc51a95a6aab4143779316353ed64531fbf3
|
@ -516,4 +516,16 @@ typedef struct client_s
|
|||||||
|
|
||||||
} client_t;
|
} client_t;
|
||||||
|
|
||||||
|
using cvar_callback_t = void (*)(const char *pszNewValue);
|
||||||
|
|
||||||
|
struct cvar_listener_t
|
||||||
|
{
|
||||||
|
cvar_listener_t(const char *var_name, cvar_callback_t handler) :
|
||||||
|
func(handler), name(var_name) {}
|
||||||
|
|
||||||
|
cvar_callback_t func;
|
||||||
|
const char *name;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //_ENGINE_STRUCTS_H_
|
#endif //_ENGINE_STRUCTS_H_
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
* version.
|
* version.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
template<typename t_ret, typename ...t_args>
|
template<typename t_ret, typename ...t_args>
|
||||||
|
65
public/resdk/cstrike/API/CSEntity.h
Normal file
65
public/resdk/cstrike/API/CSEntity.h
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CBaseEntity;
|
||||||
|
class CCSEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~CCSEntity() {}
|
||||||
|
virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker);
|
||||||
|
virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand);
|
||||||
|
|
||||||
|
public:
|
||||||
|
CBaseEntity *m_pContainingEntity;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCSDelay: public CCSEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCSAnimating: public CCSDelay
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCSToggle: public CCSAnimating
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCSMonster: public CCSToggle
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
@ -28,89 +28,17 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "regamedll_const.h"
|
#include "CSEntity.h"
|
||||||
|
#include "CSPlayer.h"
|
||||||
|
|
||||||
class CBaseEntity;
|
|
||||||
class CBasePlayer;
|
|
||||||
|
|
||||||
// Implementation wrapper
|
|
||||||
class CCSEntity {
|
|
||||||
public:
|
|
||||||
virtual ~CCSEntity() {}
|
|
||||||
virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker);
|
|
||||||
virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand);
|
|
||||||
public:
|
|
||||||
CBaseEntity *m_pContainingEntity;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CCSDelay: public CCSEntity {};
|
|
||||||
class CCSAnimating: public CCSDelay {};
|
|
||||||
class CCSPlayerItem: public CCSAnimating {};
|
|
||||||
class CCSToggle: public CCSAnimating {};
|
|
||||||
class CCSMonster: public CCSToggle {};
|
|
||||||
class CCSWeaponBox: public CCSEntity {};
|
class CCSWeaponBox: public CCSEntity {};
|
||||||
class CCSArmoury: public CCSEntity {};
|
class CCSArmoury: public CCSEntity {};
|
||||||
|
|
||||||
class CCSPlayer: public CCSMonster {
|
|
||||||
public:
|
|
||||||
CCSPlayer() : m_bForceShowMenu(false)
|
|
||||||
{
|
|
||||||
m_szModel[0] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool IsConnected() const;
|
|
||||||
virtual void SetAnimation(PLAYER_ANIM playerAnim);
|
|
||||||
virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true);
|
|
||||||
virtual CBaseEntity *GiveNamedItem(const char *pszName);
|
|
||||||
virtual CBaseEntity *GiveNamedItemEx(const char *pszName);
|
|
||||||
virtual void GiveDefaultItems();
|
|
||||||
virtual void GiveShield(bool bDeploy = true);
|
|
||||||
virtual void DropShield(bool bDeploy = true);
|
|
||||||
virtual void DropPlayerItem(const char *pszItemName);
|
|
||||||
virtual void RemoveShield();
|
|
||||||
virtual void RemoveAllItems(bool bRemoveSuit);
|
|
||||||
virtual bool RemovePlayerItem(const char* pszItemName);
|
|
||||||
virtual void SetPlayerModel(bool bHasC4);
|
|
||||||
virtual void SetPlayerModelEx(const char *modelName);
|
|
||||||
virtual void SetNewPlayerModel(const char *modelName);
|
|
||||||
virtual void ClientCommand(const char *cmd, const char *arg1 = nullptr, const char *arg2 = nullptr, const char *arg3 = nullptr);
|
|
||||||
virtual void SetProgressBarTime(int time);
|
|
||||||
virtual void SetProgressBarTime2(int time, float timeElapsed);
|
|
||||||
virtual struct edict_s *EntSelectSpawnPoint();
|
|
||||||
virtual void SetBombIcon(bool bFlash = false);
|
|
||||||
virtual void SetScoreAttrib(CBasePlayer *dest);
|
|
||||||
virtual void SendItemStatus();
|
|
||||||
virtual void ReloadWeapons(CBasePlayerItem *pWeapon = nullptr, bool bForceReload = false, bool bForceRefill = false);
|
|
||||||
virtual void Observer_SetMode(int iMode);
|
|
||||||
virtual bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot);
|
|
||||||
virtual bool SwitchWeapon(CBasePlayerItem *pWeapon);
|
|
||||||
virtual void SwitchTeam();
|
|
||||||
virtual bool JoinTeam(TeamName team);
|
|
||||||
virtual void StartObserver(Vector& vecPosition, Vector& vecViewAngle);
|
|
||||||
virtual void TeamChangeUpdate();
|
|
||||||
virtual void DropSecondary();
|
|
||||||
virtual void DropPrimary();
|
|
||||||
virtual bool HasPlayerItem(CBasePlayerItem *pCheckItem);
|
|
||||||
virtual bool HasNamedPlayerItem(const char *pszItemName);
|
|
||||||
virtual CBasePlayerItem *GetItemById(WeaponIdType weaponID);
|
|
||||||
virtual CBasePlayerItem *GetItemByName(const char *itemName);
|
|
||||||
virtual void Disappear();
|
|
||||||
virtual void MakeVIP();
|
|
||||||
virtual bool MakeBomber();
|
|
||||||
|
|
||||||
CBasePlayer *BasePlayer() const;
|
|
||||||
public:
|
|
||||||
char m_szModel[32];
|
|
||||||
bool m_bForceShowMenu;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CAPI_Bot: public CCSPlayer {};
|
class CAPI_Bot: public CCSPlayer {};
|
||||||
class CAPI_CSBot: public CAPI_Bot {};
|
class CAPI_CSBot: public CAPI_Bot {};
|
||||||
class CCSShield: public CCSEntity {};
|
class CCSShield: public CCSEntity {};
|
||||||
class CCSDeadHEV: public CCSMonster {};
|
class CCSDeadHEV: public CCSMonster {};
|
||||||
class CCSSprayCan: public CCSEntity {};
|
class CCSSprayCan: public CCSEntity {};
|
||||||
class CCSBloodSplat: public CCSEntity {};
|
class CCSBloodSplat: public CCSEntity {};
|
||||||
class CCSPlayerWeapon: public CCSPlayerItem {};
|
|
||||||
class CCSWorld: public CCSEntity {};
|
class CCSWorld: public CCSEntity {};
|
||||||
class CCSDecal: public CCSEntity {};
|
class CCSDecal: public CCSEntity {};
|
||||||
class CCSCorpse: public CCSEntity {};
|
class CCSCorpse: public CCSEntity {};
|
||||||
@ -297,7 +225,6 @@ class CCSTriggerChangeTarget: public CCSDelay {};
|
|||||||
class CCSTriggerCamera: public CCSDelay {};
|
class CCSTriggerCamera: public CCSDelay {};
|
||||||
class CCSWeather: public CCSTrigger {};
|
class CCSWeather: public CCSTrigger {};
|
||||||
class CCSClientFog: public CCSEntity {};
|
class CCSClientFog: public CCSEntity {};
|
||||||
|
class CCSTriggerSetOrigin: public CCSDelay {};
|
||||||
inline CBasePlayer *CCSPlayer::BasePlayer() const {
|
class CCSTriggerRandom: public CCSDelay {};
|
||||||
return reinterpret_cast<CBasePlayer *>(this->m_pContainingEntity);
|
class CCSItemAirBox: public CCSArmoury {};
|
||||||
}
|
|
123
public/resdk/cstrike/API/CSPlayer.h
Normal file
123
public/resdk/cstrike/API/CSPlayer.h
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CSPlayerItem.h"
|
||||||
|
#include "CSPlayerWeapon.h"
|
||||||
|
|
||||||
|
class CCSPlayer: public CCSMonster {
|
||||||
|
public:
|
||||||
|
CCSPlayer() : m_bForceShowMenu(false), m_flRespawnPending(0), m_flSpawnProtectionEndTime(0)
|
||||||
|
{
|
||||||
|
m_szModel[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool IsConnected() const;
|
||||||
|
virtual void SetAnimation(PLAYER_ANIM playerAnim);
|
||||||
|
virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true);
|
||||||
|
virtual CBaseEntity *GiveNamedItem(const char *pszName);
|
||||||
|
virtual CBaseEntity *GiveNamedItemEx(const char *pszName);
|
||||||
|
virtual void GiveDefaultItems();
|
||||||
|
virtual void GiveShield(bool bDeploy = true);
|
||||||
|
virtual void DropShield(bool bDeploy = true);
|
||||||
|
virtual void DropPlayerItem(const char *pszItemName);
|
||||||
|
virtual void RemoveShield();
|
||||||
|
virtual void RemoveAllItems(bool bRemoveSuit);
|
||||||
|
virtual bool RemovePlayerItem(const char* pszItemName);
|
||||||
|
virtual void SetPlayerModel(bool bHasC4);
|
||||||
|
virtual void SetPlayerModelEx(const char *modelName);
|
||||||
|
virtual void SetNewPlayerModel(const char *modelName);
|
||||||
|
virtual void ClientCommand(const char *cmd, const char *arg1 = nullptr, const char *arg2 = nullptr, const char *arg3 = nullptr);
|
||||||
|
virtual void SetProgressBarTime(int time);
|
||||||
|
virtual void SetProgressBarTime2(int time, float timeElapsed);
|
||||||
|
virtual struct edict_s *EntSelectSpawnPoint();
|
||||||
|
virtual void SetBombIcon(bool bFlash = false);
|
||||||
|
virtual void SetScoreAttrib(CBasePlayer *dest);
|
||||||
|
virtual void SendItemStatus();
|
||||||
|
virtual void ReloadWeapons(CBasePlayerItem *pWeapon = nullptr, bool bForceReload = false, bool bForceRefill = false);
|
||||||
|
virtual void Observer_SetMode(int iMode);
|
||||||
|
virtual bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot);
|
||||||
|
virtual bool SwitchWeapon(CBasePlayerItem *pWeapon);
|
||||||
|
virtual void SwitchTeam();
|
||||||
|
virtual bool JoinTeam(TeamName team);
|
||||||
|
virtual void StartObserver(Vector& vecPosition, Vector& vecViewAngle);
|
||||||
|
virtual void TeamChangeUpdate();
|
||||||
|
virtual void DropSecondary();
|
||||||
|
virtual void DropPrimary();
|
||||||
|
virtual bool HasPlayerItem(CBasePlayerItem *pCheckItem);
|
||||||
|
virtual bool HasNamedPlayerItem(const char *pszItemName);
|
||||||
|
virtual CBasePlayerItem *GetItemById(WeaponIdType weaponID);
|
||||||
|
virtual CBasePlayerItem *GetItemByName(const char *itemName);
|
||||||
|
virtual void Disappear();
|
||||||
|
virtual void MakeVIP();
|
||||||
|
virtual bool MakeBomber();
|
||||||
|
virtual void ResetSequenceInfo();
|
||||||
|
virtual void StartDeathCam();
|
||||||
|
virtual bool RemovePlayerItemEx(const char* pszItemName, bool bRemoveAmmo);
|
||||||
|
virtual void SetSpawnProtection(float flProtectionTime);
|
||||||
|
virtual void RemoveSpawnProtection();
|
||||||
|
|
||||||
|
CBasePlayer *BasePlayer() const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum EProtectionState
|
||||||
|
{
|
||||||
|
ProtectionSt_NoSet,
|
||||||
|
ProtectionSt_Active,
|
||||||
|
ProtectionSt_Expired,
|
||||||
|
};
|
||||||
|
|
||||||
|
EProtectionState GetProtectionState() const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
char m_szModel[32];
|
||||||
|
bool m_bForceShowMenu;
|
||||||
|
float m_flRespawnPending;
|
||||||
|
float m_flSpawnProtectionEndTime;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Inlines
|
||||||
|
inline CBasePlayer *CCSPlayer::BasePlayer() const
|
||||||
|
{
|
||||||
|
return reinterpret_cast<CBasePlayer *>(this->m_pContainingEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline CCSPlayer::EProtectionState CCSPlayer::GetProtectionState() const
|
||||||
|
{
|
||||||
|
// no protection set
|
||||||
|
if (m_flSpawnProtectionEndTime <= 0.0f)
|
||||||
|
return ProtectionSt_NoSet;
|
||||||
|
|
||||||
|
// check if end time of protection isn't expired yet
|
||||||
|
if (m_flSpawnProtectionEndTime >= gpGlobals->time)
|
||||||
|
return ProtectionSt_Active;
|
||||||
|
|
||||||
|
// has expired
|
||||||
|
return ProtectionSt_Expired;
|
||||||
|
}
|
68
public/resdk/cstrike/API/CSPlayerItem.h
Normal file
68
public/resdk/cstrike/API/CSPlayerItem.h
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int iSlot;
|
||||||
|
int iPosition;
|
||||||
|
const char *pszAmmo1;
|
||||||
|
int iMaxAmmo1;
|
||||||
|
const char *pszAmmo2;
|
||||||
|
int iMaxAmmo2;
|
||||||
|
const char *pszName;
|
||||||
|
int iMaxClip;
|
||||||
|
int iId;
|
||||||
|
int iFlags;
|
||||||
|
int iWeight;
|
||||||
|
}
|
||||||
|
ItemInfo;
|
||||||
|
|
||||||
|
class CBasePlayerItem;
|
||||||
|
class CCSPlayerItem: public CCSAnimating
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CCSPlayerItem()
|
||||||
|
{
|
||||||
|
memset(&m_ItemInfo, 0, sizeof(m_ItemInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void SetItemInfo(ItemInfo *pInfo);
|
||||||
|
|
||||||
|
CBasePlayerItem *BasePlayerItem() const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
ItemInfo m_ItemInfo;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Inlines
|
||||||
|
inline CBasePlayerItem *CCSPlayerItem::BasePlayerItem() const
|
||||||
|
{
|
||||||
|
return reinterpret_cast<CBasePlayerItem *>(this->m_pContainingEntity);
|
||||||
|
}
|
50
public/resdk/cstrike/API/CSPlayerWeapon.h
Normal file
50
public/resdk/cstrike/API/CSPlayerWeapon.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CBasePlayerWeapon;
|
||||||
|
class CCSPlayerWeapon: public CCSPlayerItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CCSPlayerWeapon() :
|
||||||
|
m_bHasSecondaryAttack(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CBasePlayerWeapon *BasePlayerWeapon() const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool m_bHasSecondaryAttack;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Inlines
|
||||||
|
inline CBasePlayerWeapon *CCSPlayerWeapon::BasePlayerWeapon() const
|
||||||
|
{
|
||||||
|
return reinterpret_cast<CBasePlayerWeapon *>(this->m_pContainingEntity);
|
||||||
|
}
|
@ -25,23 +25,24 @@
|
|||||||
* version.
|
* version.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <engine_strucs.h>
|
#include <engine_strucs.h>
|
||||||
#include "regamedll_interfaces.h"
|
|
||||||
#include "regamedll_const.h"
|
#include "regamedll_const.h"
|
||||||
|
#include "API/CSInterfaces.h"
|
||||||
#include "../common/hookchains.h"
|
#include "../common/hookchains.h"
|
||||||
|
|
||||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||||
#define REGAMEDLL_API_VERSION_MINOR 1
|
#define REGAMEDLL_API_VERSION_MINOR 8
|
||||||
|
|
||||||
// CBasePlayer::Spawn hook
|
// CBasePlayer::Spawn hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Spawn;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Spawn;
|
||||||
|
|
||||||
// CBasePlayer::Precache hook
|
// CBasePlayer::Precache hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Precache;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Precache;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Precache;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Precache;
|
||||||
|
|
||||||
// CBasePlayer::ObjectCaps hook
|
// CBasePlayer::ObjectCaps hook
|
||||||
typedef IHookChainClass<int, class CBasePlayer> IReGameHook_CBasePlayer_ObjectCaps;
|
typedef IHookChainClass<int, class CBasePlayer> IReGameHook_CBasePlayer_ObjectCaps;
|
||||||
@ -52,8 +53,8 @@ typedef IHookChainClass<int, class CBasePlayer> IReGameHook_CBasePlayer_Classify
|
|||||||
typedef IHookChainRegistryClass<int, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Classify;
|
typedef IHookChainRegistryClass<int, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Classify;
|
||||||
|
|
||||||
// CBasePlayer::TraceAttack hook
|
// CBasePlayer::TraceAttack hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, struct entvars_s *, float, Vector &, TraceResult *, int> IReGameHook_CBasePlayer_TraceAttack;
|
typedef IHookChainClass<void, class CBasePlayer, struct entvars_s *, float, Vector &, TraceResult *, int> IReGameHook_CBasePlayer_TraceAttack;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, struct entvars_s *, float, Vector &, TraceResult *, int> IReGameHookRegistry_CBasePlayer_TraceAttack;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, struct entvars_s *, float, Vector &, TraceResult *, int> IReGameHookRegistry_CBasePlayer_TraceAttack;
|
||||||
|
|
||||||
// CBasePlayer::TakeDamage hook
|
// CBasePlayer::TakeDamage hook
|
||||||
typedef IHookChainClass<BOOL, class CBasePlayer, struct entvars_s *, struct entvars_s *, float&, int> IReGameHook_CBasePlayer_TakeDamage;
|
typedef IHookChainClass<BOOL, class CBasePlayer, struct entvars_s *, struct entvars_s *, float&, int> IReGameHook_CBasePlayer_TakeDamage;
|
||||||
@ -64,16 +65,16 @@ typedef IHookChainClass<BOOL, class CBasePlayer, float, int> IReGameHook_CBasePl
|
|||||||
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, float, int> IReGameHookRegistry_CBasePlayer_TakeHealth;
|
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, float, int> IReGameHookRegistry_CBasePlayer_TakeHealth;
|
||||||
|
|
||||||
// CBasePlayer::Killed hook
|
// CBasePlayer::Killed hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, struct entvars_s *, int> IReGameHook_CBasePlayer_Killed;
|
typedef IHookChainClass<void, class CBasePlayer, struct entvars_s *, int> IReGameHook_CBasePlayer_Killed;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, struct entvars_s *, int> IReGameHookRegistry_CBasePlayer_Killed;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, struct entvars_s *, int> IReGameHookRegistry_CBasePlayer_Killed;
|
||||||
|
|
||||||
// CBasePlayer::AddPoints hook
|
// CBasePlayer::AddPoints hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, int, BOOL> IReGameHook_CBasePlayer_AddPoints;
|
typedef IHookChainClass<void, class CBasePlayer, int, BOOL> IReGameHook_CBasePlayer_AddPoints;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, BOOL> IReGameHookRegistry_CBasePlayer_AddPoints;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, int, BOOL> IReGameHookRegistry_CBasePlayer_AddPoints;
|
||||||
|
|
||||||
// CBasePlayer::AddPointsToTeam hook
|
// CBasePlayer::AddPointsToTeam hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, int, BOOL> IReGameHook_CBasePlayer_AddPointsToTeam;
|
typedef IHookChainClass<void, class CBasePlayer, int, BOOL> IReGameHook_CBasePlayer_AddPointsToTeam;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, BOOL> IReGameHookRegistry_CBasePlayer_AddPointsToTeam;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, int, BOOL> IReGameHookRegistry_CBasePlayer_AddPointsToTeam;
|
||||||
|
|
||||||
// CBasePlayer::AddPlayerItem hook
|
// CBasePlayer::AddPlayerItem hook
|
||||||
typedef IHookChainClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHook_CBasePlayer_AddPlayerItem;
|
typedef IHookChainClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHook_CBasePlayer_AddPlayerItem;
|
||||||
@ -84,72 +85,72 @@ typedef IHookChainClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGam
|
|||||||
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHookRegistry_CBasePlayer_RemovePlayerItem;
|
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHookRegistry_CBasePlayer_RemovePlayerItem;
|
||||||
|
|
||||||
// CBasePlayer::GiveAmmo hook
|
// CBasePlayer::GiveAmmo hook
|
||||||
typedef IHookChainClass<int, class CBasePlayer, int , char *, int> IReGameHook_CBasePlayer_GiveAmmo;
|
typedef IHookChainClass<int, class CBasePlayer, int , const char *, int> IReGameHook_CBasePlayer_GiveAmmo;
|
||||||
typedef IHookChainRegistryClass<int, class CBasePlayer, int , char *, int> IReGameHookRegistry_CBasePlayer_GiveAmmo;
|
typedef IHookChainRegistryClass<int, class CBasePlayer, int , const char *, int> IReGameHookRegistry_CBasePlayer_GiveAmmo;
|
||||||
|
|
||||||
// CBasePlayer::ResetMaxSpeed hook
|
// CBasePlayer::ResetMaxSpeed hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_ResetMaxSpeed;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_ResetMaxSpeed;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_ResetMaxSpeed;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_ResetMaxSpeed;
|
||||||
|
|
||||||
// CBasePlayer::Jump hook
|
// CBasePlayer::Jump hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Jump;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Jump;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Jump;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Jump;
|
||||||
|
|
||||||
// CBasePlayer::Duck hook
|
// CBasePlayer::Duck hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Duck;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Duck;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Duck;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Duck;
|
||||||
|
|
||||||
// CBasePlayer::PreThink hook
|
// CBasePlayer::PreThink hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_PreThink;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_PreThink;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_PreThink;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_PreThink;
|
||||||
|
|
||||||
// CBasePlayer::PostThink hook
|
// CBasePlayer::PostThink hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_PostThink;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_PostThink;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_PostThink;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_PostThink;
|
||||||
|
|
||||||
// CBasePlayer::UpdateClientData hook
|
// CBasePlayer::UpdateClientData hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_UpdateClientData;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_UpdateClientData;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_UpdateClientData;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_UpdateClientData;
|
||||||
|
|
||||||
// CBasePlayer::ImpulseCommands hook
|
// CBasePlayer::ImpulseCommands hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_ImpulseCommands;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_ImpulseCommands;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_ImpulseCommands;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_ImpulseCommands;
|
||||||
|
|
||||||
// CBasePlayer::RoundRespawn hook
|
// CBasePlayer::RoundRespawn hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_RoundRespawn;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_RoundRespawn;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_RoundRespawn;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_RoundRespawn;
|
||||||
|
|
||||||
// CBasePlayer::Blind hook
|
// CBasePlayer::Blind hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, float, float, float, int> IReGameHook_CBasePlayer_Blind;
|
typedef IHookChainClass<void, class CBasePlayer, float, float, float, int> IReGameHook_CBasePlayer_Blind;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
||||||
|
|
||||||
// CBasePlayer::Observer_IsValidTarget hook
|
// CBasePlayer::Observer_IsValidTarget hook
|
||||||
typedef IHookChainClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
typedef IHookChainClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
||||||
typedef IHookChainRegistryClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
typedef IHookChainRegistryClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
||||||
|
|
||||||
// CBasePlayer::SetAnimation hook
|
// CBasePlayer::SetAnimation hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, PLAYER_ANIM> IReGameHook_CBasePlayer_SetAnimation;
|
typedef IHookChainClass<void, class CBasePlayer, PLAYER_ANIM> IReGameHook_CBasePlayer_SetAnimation;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, PLAYER_ANIM> IReGameHookRegistry_CBasePlayer_SetAnimation;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, PLAYER_ANIM> IReGameHookRegistry_CBasePlayer_SetAnimation;
|
||||||
|
|
||||||
// CBasePlayer::GiveDefaultItems hook
|
// CBasePlayer::GiveDefaultItems hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_GiveDefaultItems;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_GiveDefaultItems;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_GiveDefaultItems;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_GiveDefaultItems;
|
||||||
|
|
||||||
// CBasePlayer::GiveNamedItem hook
|
// CBasePlayer::GiveNamedItem hook
|
||||||
typedef IHookChainClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHook_CBasePlayer_GiveNamedItem;
|
typedef IHookChainClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHook_CBasePlayer_GiveNamedItem;
|
||||||
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_GiveNamedItem;
|
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_GiveNamedItem;
|
||||||
|
|
||||||
// CBasePlayer::AddAccount hook
|
// CBasePlayer::AddAccount hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, int, RewardType, bool> IReGameHook_CBasePlayer_AddAccount;
|
typedef IHookChainClass<void, class CBasePlayer, int, RewardType, bool> IReGameHook_CBasePlayer_AddAccount;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, RewardType, bool> IReGameHookRegistry_CBasePlayer_AddAccount;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, int, RewardType, bool> IReGameHookRegistry_CBasePlayer_AddAccount;
|
||||||
|
|
||||||
// CBasePlayer::GiveShield hook
|
// CBasePlayer::GiveShield hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, bool> IReGameHook_CBasePlayer_GiveShield;
|
typedef IHookChainClass<void, class CBasePlayer, bool> IReGameHook_CBasePlayer_GiveShield;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_GiveShield;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_GiveShield;
|
||||||
|
|
||||||
// CBasePlayer:SetClientUserInfoModel hook
|
// CBasePlayer:SetClientUserInfoModel hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, char *, char *> IReGameHook_CBasePlayer_SetClientUserInfoModel;
|
typedef IHookChainClass<void, class CBasePlayer, char *, char *> IReGameHook_CBasePlayer_SetClientUserInfoModel;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, char *, char *> IReGameHookRegistry_CBasePlayer_SetClientUserInfoModel;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, char *, char *> IReGameHookRegistry_CBasePlayer_SetClientUserInfoModel;
|
||||||
|
|
||||||
// CBasePlayer:SetClientUserInfoName hook
|
// CBasePlayer:SetClientUserInfoName hook
|
||||||
typedef IHookChainClass<bool, class CBasePlayer, char *, char *> IReGameHook_CBasePlayer_SetClientUserInfoName;
|
typedef IHookChainClass<bool, class CBasePlayer, char *, char *> IReGameHook_CBasePlayer_SetClientUserInfoName;
|
||||||
@ -160,56 +161,56 @@ typedef IHookChainClass<bool, class CBasePlayer, ItemID, ItemRestType> IReGameHo
|
|||||||
typedef IHookChainRegistryClass<bool, class CBasePlayer, ItemID, ItemRestType> IReGameHookRegistry_CBasePlayer_HasRestrictItem;
|
typedef IHookChainRegistryClass<bool, class CBasePlayer, ItemID, ItemRestType> IReGameHookRegistry_CBasePlayer_HasRestrictItem;
|
||||||
|
|
||||||
// CBasePlayer::DropPlayerItem hook
|
// CBasePlayer::DropPlayerItem hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, const char *> IReGameHook_CBasePlayer_DropPlayerItem;
|
typedef IHookChainClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHook_CBasePlayer_DropPlayerItem;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_DropPlayerItem;
|
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_DropPlayerItem;
|
||||||
|
|
||||||
// CBasePlayer::DropShield hook
|
// CBasePlayer::DropShield hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, bool> IReGameHook_CBasePlayer_DropShield;
|
typedef IHookChainClass<class CBaseEntity *, class CBasePlayer, bool> IReGameHook_CBasePlayer_DropShield;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_DropShield;
|
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_DropShield;
|
||||||
|
|
||||||
// CBasePlayer::OnSpawnEquip hook
|
// CBasePlayer::OnSpawnEquip hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, bool, bool> IReGameHook_CBasePlayer_OnSpawnEquip;
|
typedef IHookChainClass<void, class CBasePlayer, bool, bool> IReGameHook_CBasePlayer_OnSpawnEquip;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool, bool> IReGameHookRegistry_CBasePlayer_OnSpawnEquip;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, bool, bool> IReGameHookRegistry_CBasePlayer_OnSpawnEquip;
|
||||||
|
|
||||||
// CBasePlayer::Radio hook
|
// CBasePlayer::Radio hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, const char *, const char *, short, bool> IReGameHook_CBasePlayer_Radio;
|
typedef IHookChainClass<void, class CBasePlayer, const char *, const char *, short, bool> IReGameHook_CBasePlayer_Radio;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *, const char *, short, bool> IReGameHookRegistry_CBasePlayer_Radio;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, const char *, const char *, short, bool> IReGameHookRegistry_CBasePlayer_Radio;
|
||||||
|
|
||||||
// CBasePlayer::Disappear hook
|
// CBasePlayer::Disappear hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Disappear;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Disappear;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Disappear;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Disappear;
|
||||||
|
|
||||||
// CBasePlayer::MakeVIP hook
|
// CBasePlayer::MakeVIP hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_MakeVIP;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_MakeVIP;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_MakeVIP;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_MakeVIP;
|
||||||
|
|
||||||
// CBasePlayer::MakeBomber hook
|
// CBasePlayer::MakeBomber hook
|
||||||
typedef IHookChainClass<bool, class CBasePlayer> IReGameHook_CBasePlayer_MakeBomber;
|
typedef IHookChainClass<bool, class CBasePlayer> IReGameHook_CBasePlayer_MakeBomber;
|
||||||
typedef IHookChainRegistryClass<bool, class CBasePlayer> IReGameHookRegistry_CBasePlayer_MakeBomber;
|
typedef IHookChainRegistryClass<bool, class CBasePlayer> IReGameHookRegistry_CBasePlayer_MakeBomber;
|
||||||
|
|
||||||
// CBasePlayer::StartObserver hook
|
// CBasePlayer::StartObserver hook
|
||||||
typedef IVoidHookChainClass<class CBasePlayer, Vector &, Vector &> IReGameHook_CBasePlayer_StartObserver;
|
typedef IHookChainClass<void, class CBasePlayer, Vector &, Vector &> IReGameHook_CBasePlayer_StartObserver;
|
||||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, Vector &, Vector &> IReGameHookRegistry_CBasePlayer_StartObserver;
|
typedef IHookChainRegistryClass<void, class CBasePlayer, Vector &, Vector &> IReGameHookRegistry_CBasePlayer_StartObserver;
|
||||||
|
|
||||||
// CBasePlayer::GetIntoGame hook
|
// CBasePlayer::GetIntoGame hook
|
||||||
typedef IHookChainClass<bool, class CBasePlayer> IReGameHook_CBasePlayer_GetIntoGame;
|
typedef IHookChainClass<bool, class CBasePlayer> IReGameHook_CBasePlayer_GetIntoGame;
|
||||||
typedef IHookChainRegistryClass<bool, class CBasePlayer> IReGameHookRegistry_CBasePlayer_GetIntoGame;
|
typedef IHookChainRegistryClass<bool, class CBasePlayer> IReGameHookRegistry_CBasePlayer_GetIntoGame;
|
||||||
|
|
||||||
// CBaseAnimating::ResetSequenceInfo hook
|
// CBaseAnimating::ResetSequenceInfo hook
|
||||||
typedef IVoidHookChainClass<class CBaseAnimating> IReGameHook_CBaseAnimating_ResetSequenceInfo;
|
typedef IHookChainClass<void, class CBaseAnimating> IReGameHook_CBaseAnimating_ResetSequenceInfo;
|
||||||
typedef IVoidHookChainRegistryClass<class CBaseAnimating> IReGameHookRegistry_CBaseAnimating_ResetSequenceInfo;
|
typedef IHookChainRegistryClass<void, class CBaseAnimating> IReGameHookRegistry_CBaseAnimating_ResetSequenceInfo;
|
||||||
|
|
||||||
// GetForceCamera hook
|
// GetForceCamera hook
|
||||||
typedef IHookChain<int, class CBasePlayer *> IReGameHook_GetForceCamera;
|
typedef IHookChain<int, class CBasePlayer *> IReGameHook_GetForceCamera;
|
||||||
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_GetForceCamera;
|
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_GetForceCamera;
|
||||||
|
|
||||||
// PlayerBlind hook
|
// PlayerBlind hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHook_PlayerBlind;
|
typedef IHookChain<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHook_PlayerBlind;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHookRegistry_PlayerBlind;
|
typedef IHookChainRegistry<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHookRegistry_PlayerBlind;
|
||||||
|
|
||||||
// RadiusFlash_TraceLine hook
|
// RadiusFlash_TraceLine hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, TraceResult *> IReGameHook_RadiusFlash_TraceLine;
|
typedef IHookChain<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, TraceResult *> IReGameHook_RadiusFlash_TraceLine;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, TraceResult *> IReGameHookRegistry_RadiusFlash_TraceLine;
|
typedef IHookChainRegistry<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, TraceResult *> IReGameHookRegistry_RadiusFlash_TraceLine;
|
||||||
|
|
||||||
// RoundEnd hook
|
// RoundEnd hook
|
||||||
typedef IHookChain<bool, int, ScenarioEventEndRound, float> IReGameHook_RoundEnd;
|
typedef IHookChain<bool, int, ScenarioEventEndRound, float> IReGameHook_RoundEnd;
|
||||||
@ -220,32 +221,32 @@ typedef IHookChain<class CGameRules *> IReGameHook_InstallGameRules;
|
|||||||
typedef IHookChainRegistry<class CGameRules *> IReGameHookRegistry_InstallGameRules;
|
typedef IHookChainRegistry<class CGameRules *> IReGameHookRegistry_InstallGameRules;
|
||||||
|
|
||||||
// PM_Init hook
|
// PM_Init hook
|
||||||
typedef IVoidHookChain<struct playermove_s *> IReGameHook_PM_Init;
|
typedef IHookChain<void, struct playermove_s *> IReGameHook_PM_Init;
|
||||||
typedef IVoidHookChainRegistry<struct playermove_s *> IReGameHookRegistry_PM_Init;
|
typedef IHookChainRegistry<void, struct playermove_s *> IReGameHookRegistry_PM_Init;
|
||||||
|
|
||||||
// PM_Move hook
|
// PM_Move hook
|
||||||
typedef IVoidHookChain<struct playermove_s *, int> IReGameHook_PM_Move;
|
typedef IHookChain<void, struct playermove_s *, int> IReGameHook_PM_Move;
|
||||||
typedef IVoidHookChainRegistry<struct playermove_s *, int> IReGameHookRegistry_PM_Move;
|
typedef IHookChainRegistry<void, struct playermove_s *, int> IReGameHookRegistry_PM_Move;
|
||||||
|
|
||||||
// PM_AirMove hook
|
// PM_AirMove hook
|
||||||
typedef IVoidHookChain<int> IReGameHook_PM_AirMove;
|
typedef IHookChain<void, int> IReGameHook_PM_AirMove;
|
||||||
typedef IVoidHookChainRegistry<int> IReGameHookRegistry_PM_AirMove;
|
typedef IHookChainRegistry<void, int> IReGameHookRegistry_PM_AirMove;
|
||||||
|
|
||||||
// HandleMenu_ChooseAppearance hook
|
// HandleMenu_ChooseAppearance hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseAppearance;
|
typedef IHookChain<void, class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseAppearance;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseAppearance;
|
typedef IHookChainRegistry<void, class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseAppearance;
|
||||||
|
|
||||||
// HandleMenu_ChooseTeam hook
|
// HandleMenu_ChooseTeam hook
|
||||||
typedef IHookChain<BOOL, class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseTeam;
|
typedef IHookChain<BOOL, class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseTeam;
|
||||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseTeam;
|
typedef IHookChainRegistry<BOOL, class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseTeam;
|
||||||
|
|
||||||
// ShowMenu hook
|
// ShowMenu hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, int, int, BOOL, char *> IReGameHook_ShowMenu;
|
typedef IHookChain<void, class CBasePlayer *, int, int, BOOL, char *> IReGameHook_ShowMenu;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int, int, BOOL, char *> IReGameHookRegistry_ShowMenu;
|
typedef IHookChainRegistry<void, class CBasePlayer *, int, int, BOOL, char *> IReGameHookRegistry_ShowMenu;
|
||||||
|
|
||||||
// ShowVGUIMenu hook
|
// ShowVGUIMenu hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, int, int, char *> IReGameHook_ShowVGUIMenu;
|
typedef IHookChain<void, class CBasePlayer *, int, int, char *> IReGameHook_ShowVGUIMenu;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int, int, char *> IReGameHookRegistry_ShowVGUIMenu;
|
typedef IHookChainRegistry<void, class CBasePlayer *, int, int, char *> IReGameHookRegistry_ShowVGUIMenu;
|
||||||
|
|
||||||
// BuyGunAmmo hook
|
// BuyGunAmmo hook
|
||||||
typedef IHookChain<bool, class CBasePlayer *, class CBasePlayerItem *, bool> IReGameHook_BuyGunAmmo;
|
typedef IHookChain<bool, class CBasePlayer *, class CBasePlayerItem *, bool> IReGameHook_BuyGunAmmo;
|
||||||
@ -256,8 +257,8 @@ typedef IHookChain<class CBaseEntity *, class CBasePlayer *, WeaponIdType> IReGa
|
|||||||
typedef IHookChainRegistry<class CBaseEntity *, class CBasePlayer *, WeaponIdType> IReGameHookRegistry_BuyWeaponByWeaponID;
|
typedef IHookChainRegistry<class CBaseEntity *, class CBasePlayer *, WeaponIdType> IReGameHookRegistry_BuyWeaponByWeaponID;
|
||||||
|
|
||||||
// InternalCommand hook
|
// InternalCommand hook
|
||||||
typedef IVoidHookChain<edict_t *, const char *, const char *> IReGameHook_InternalCommand;
|
typedef IHookChain<void, edict_t *, const char *, const char *> IReGameHook_InternalCommand;
|
||||||
typedef IVoidHookChainRegistry<edict_t *, const char *, const char *> IReGameHookRegistry_InternalCommand;
|
typedef IHookChainRegistry<void, edict_t *, const char *, const char *> IReGameHookRegistry_InternalCommand;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::FShouldSwitchWeapon hook
|
// CHalfLifeMultiplay::FShouldSwitchWeapon hook
|
||||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_FShouldSwitchWeapon;
|
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_FShouldSwitchWeapon;
|
||||||
@ -276,8 +277,8 @@ typedef IHookChain<BOOL, class CBasePlayer *, CBaseEntity *> IReGameHook_CSGameR
|
|||||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, CBaseEntity *> IReGameHookRegistry_CSGameRules_FPlayerCanTakeDamage;
|
typedef IHookChainRegistry<BOOL, class CBasePlayer *, CBaseEntity *> IReGameHookRegistry_CSGameRules_FPlayerCanTakeDamage;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::PlayerSpawn hook
|
// CHalfLifeMultiplay::PlayerSpawn hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *> IReGameHook_CSGameRules_PlayerSpawn;
|
typedef IHookChain<void, class CBasePlayer *> IReGameHook_CSGameRules_PlayerSpawn;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *> IReGameHookRegistry_CSGameRules_PlayerSpawn;
|
typedef IHookChainRegistry<void, class CBasePlayer *> IReGameHookRegistry_CSGameRules_PlayerSpawn;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::FPlayerCanRespawn hook
|
// CHalfLifeMultiplay::FPlayerCanRespawn hook
|
||||||
typedef IHookChain<BOOL, class CBasePlayer *> IReGameHook_CSGameRules_FPlayerCanRespawn;
|
typedef IHookChain<BOOL, class CBasePlayer *> IReGameHook_CSGameRules_FPlayerCanRespawn;
|
||||||
@ -288,16 +289,16 @@ typedef IHookChain<struct edict_s *, class CBasePlayer *> IReGameHook_CSGameRule
|
|||||||
typedef IHookChainRegistry<struct edict_s *, class CBasePlayer *> IReGameHookRegistry_CSGameRules_GetPlayerSpawnSpot;
|
typedef IHookChainRegistry<struct edict_s *, class CBasePlayer *> IReGameHookRegistry_CSGameRules_GetPlayerSpawnSpot;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::ClientUserInfoChanged hook
|
// CHalfLifeMultiplay::ClientUserInfoChanged hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, char *> IReGameHook_CSGameRules_ClientUserInfoChanged;
|
typedef IHookChain<void, class CBasePlayer *, char *> IReGameHook_CSGameRules_ClientUserInfoChanged;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, char *> IReGameHookRegistry_CSGameRules_ClientUserInfoChanged;
|
typedef IHookChainRegistry<void, class CBasePlayer *, char *> IReGameHookRegistry_CSGameRules_ClientUserInfoChanged;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::PlayerKilled hook
|
// CHalfLifeMultiplay::PlayerKilled hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHook_CSGameRules_PlayerKilled;
|
typedef IHookChain<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHook_CSGameRules_PlayerKilled;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHookRegistry_CSGameRules_PlayerKilled;
|
typedef IHookChainRegistry<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHookRegistry_CSGameRules_PlayerKilled;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::DeathNotice hook
|
// CHalfLifeMultiplay::DeathNotice hook
|
||||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHook_CSGameRules_DeathNotice;
|
typedef IHookChain<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHook_CSGameRules_DeathNotice;
|
||||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHookRegistry_CSGameRules_DeathNotice;
|
typedef IHookChainRegistry<void, class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHookRegistry_CSGameRules_DeathNotice;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::CanHavePlayerItem hook
|
// CHalfLifeMultiplay::CanHavePlayerItem hook
|
||||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_CanHavePlayerItem;
|
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_CanHavePlayerItem;
|
||||||
@ -308,142 +309,237 @@ typedef IHookChain<int, class CBasePlayer *> IReGameHook_CSGameRules_DeadPlayerW
|
|||||||
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_CSGameRules_DeadPlayerWeapons;
|
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_CSGameRules_DeadPlayerWeapons;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::ServerDeactivate hook
|
// CHalfLifeMultiplay::ServerDeactivate hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_ServerDeactivate;
|
typedef IHookChain<void> IReGameHook_CSGameRules_ServerDeactivate;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_ServerDeactivate;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_ServerDeactivate;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::CheckMapConditions hook
|
// CHalfLifeMultiplay::CheckMapConditions hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_CheckMapConditions;
|
typedef IHookChain<void> IReGameHook_CSGameRules_CheckMapConditions;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_CheckMapConditions;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_CheckMapConditions;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::CleanUpMap hook
|
// CHalfLifeMultiplay::CleanUpMap hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_CleanUpMap;
|
typedef IHookChain<void> IReGameHook_CSGameRules_CleanUpMap;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_CleanUpMap;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_CleanUpMap;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::RestartRound hook
|
// CHalfLifeMultiplay::RestartRound hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_RestartRound;
|
typedef IHookChain<void> IReGameHook_CSGameRules_RestartRound;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_RestartRound;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_RestartRound;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::CheckWinConditions hook
|
// CHalfLifeMultiplay::CheckWinConditions hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_CheckWinConditions;
|
typedef IHookChain<void> IReGameHook_CSGameRules_CheckWinConditions;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_CheckWinConditions;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_CheckWinConditions;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::RemoveGuns hook
|
// CHalfLifeMultiplay::RemoveGuns hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_RemoveGuns;
|
typedef IHookChain<void> IReGameHook_CSGameRules_RemoveGuns;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_RemoveGuns;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_RemoveGuns;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::GiveC4 hook
|
// CHalfLifeMultiplay::GiveC4 hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_GiveC4;
|
typedef IHookChain<void> IReGameHook_CSGameRules_GiveC4;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_GiveC4;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_GiveC4;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::ChangeLevel hook
|
// CHalfLifeMultiplay::ChangeLevel hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_ChangeLevel;
|
typedef IHookChain<void> IReGameHook_CSGameRules_ChangeLevel;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_ChangeLevel;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_ChangeLevel;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::GoToIntermission hook
|
// CHalfLifeMultiplay::GoToIntermission hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_GoToIntermission;
|
typedef IHookChain<void> IReGameHook_CSGameRules_GoToIntermission;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_GoToIntermission;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_GoToIntermission;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::BalanceTeams hook
|
// CHalfLifeMultiplay::BalanceTeams hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_BalanceTeams;
|
typedef IHookChain<void> IReGameHook_CSGameRules_BalanceTeams;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::OnRoundFreezeEnd hook
|
// CHalfLifeMultiplay::OnRoundFreezeEnd hook
|
||||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_OnRoundFreezeEnd;
|
typedef IHookChain<void> IReGameHook_CSGameRules_OnRoundFreezeEnd;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd;
|
||||||
|
|
||||||
|
// CSGameRules::CanPlayerHearPlayer hook
|
||||||
|
typedef IHookChain<bool, class CBasePlayer *, class CBasePlayer *> IReGameHook_CSGameRules_CanPlayerHearPlayer;
|
||||||
|
typedef IHookChainRegistry<bool, class CBasePlayer *, class CBasePlayer *> IReGameHookRegistry_CSGameRules_CanPlayerHearPlayer;
|
||||||
|
|
||||||
// PM_UpdateStepSound hook
|
// PM_UpdateStepSound hook
|
||||||
typedef IVoidHookChain<> IReGameHook_PM_UpdateStepSound;
|
typedef IHookChain<void> IReGameHook_PM_UpdateStepSound;
|
||||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_PM_UpdateStepSound;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_PM_UpdateStepSound;
|
||||||
|
|
||||||
|
// CBasePlayer::StartDeathCam hook
|
||||||
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_StartDeathCam;
|
||||||
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_StartDeathCam;
|
||||||
|
|
||||||
|
// CBasePlayer::SwitchTeam hook
|
||||||
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_SwitchTeam;
|
||||||
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_SwitchTeam;
|
||||||
|
|
||||||
|
// CBasePlayer::CanSwitchTeam hook
|
||||||
|
typedef IHookChainClass<bool, class CBasePlayer, TeamName> IReGameHook_CBasePlayer_CanSwitchTeam;
|
||||||
|
typedef IHookChainRegistryClass<bool, class CBasePlayer, TeamName> IReGameHookRegistry_CBasePlayer_CanSwitchTeam;
|
||||||
|
|
||||||
|
// CBasePlayer::ThrowGrenade hook
|
||||||
|
typedef IHookChainClass<class CGrenade *, class CBasePlayer, class CBasePlayerWeapon *, Vector &, Vector &, float, unsigned short> IReGameHook_CBasePlayer_ThrowGrenade;
|
||||||
|
typedef IHookChainRegistryClass<class CGrenade *, class CBasePlayer, class CBasePlayerWeapon *, Vector &, Vector &, float, unsigned short> IReGameHookRegistry_CBasePlayer_ThrowGrenade;
|
||||||
|
|
||||||
|
// CWeaponBox::SetModel hook
|
||||||
|
typedef IHookChainClass<void, class CWeaponBox, const char *> IReGameHook_CWeaponBox_SetModel;
|
||||||
|
typedef IHookChainRegistryClass<void, class CWeaponBox, const char *> IReGameHookRegistry_CWeaponBox_SetModel;
|
||||||
|
|
||||||
|
// CGrenade::DefuseBombStart hook
|
||||||
|
typedef IHookChainClass<void, class CGrenade, class CBasePlayer *> IReGameHook_CGrenade_DefuseBombStart;
|
||||||
|
typedef IHookChainRegistryClass<void, class CGrenade, class CBasePlayer *> IReGameHookRegistry_CGrenade_DefuseBombStart;
|
||||||
|
|
||||||
|
// CGrenade::DefuseBombEnd hook
|
||||||
|
typedef IHookChainClass<void, class CGrenade, class CBasePlayer *, bool> IReGameHook_CGrenade_DefuseBombEnd;
|
||||||
|
typedef IHookChainRegistryClass<void, class CGrenade, class CBasePlayer *, bool> IReGameHookRegistry_CGrenade_DefuseBombEnd;
|
||||||
|
|
||||||
|
// CGrenade::ExplodeHeGrenade hook
|
||||||
|
typedef IHookChainClass<void, class CGrenade, TraceResult *, int> IReGameHook_CGrenade_ExplodeHeGrenade;
|
||||||
|
typedef IHookChainRegistryClass<void, class CGrenade, TraceResult *, int> IReGameHookRegistry_CGrenade_ExplodeHeGrenade;
|
||||||
|
|
||||||
|
// CGrenade::ExplodeFlashbang hook
|
||||||
|
typedef IHookChainClass<void, class CGrenade, TraceResult *, int> IReGameHook_CGrenade_ExplodeFlashbang;
|
||||||
|
typedef IHookChainRegistryClass<void, class CGrenade, TraceResult *, int> IReGameHookRegistry_CGrenade_ExplodeFlashbang;
|
||||||
|
|
||||||
|
// CGrenade::ExplodeSmokeGrenade hook
|
||||||
|
typedef IHookChainClass<void, class CGrenade> IReGameHook_CGrenade_ExplodeSmokeGrenade;
|
||||||
|
typedef IHookChainRegistryClass<void, class CGrenade> IReGameHookRegistry_CGrenade_ExplodeSmokeGrenade;
|
||||||
|
|
||||||
|
// CGrenade::ExplodeBomb hook
|
||||||
|
typedef IHookChainClass<void, class CGrenade, TraceResult *, int> IReGameHook_CGrenade_ExplodeBomb;
|
||||||
|
typedef IHookChainRegistryClass<void, class CGrenade, TraceResult *, int> IReGameHookRegistry_CGrenade_ExplodeBomb;
|
||||||
|
|
||||||
|
// ThrowHeGrenade hook
|
||||||
|
typedef IHookChain<class CGrenade *, entvars_t *, Vector &, Vector &, float, int, unsigned short> IReGameHook_ThrowHeGrenade;
|
||||||
|
typedef IHookChainRegistry<class CGrenade *, entvars_t *, Vector &, Vector &, float, int, unsigned short> IReGameHookRegistry_ThrowHeGrenade;
|
||||||
|
|
||||||
|
// ThrowFlashbang hook
|
||||||
|
typedef IHookChain<class CGrenade *, entvars_t *, Vector &, Vector &, float> IReGameHook_ThrowFlashbang;
|
||||||
|
typedef IHookChainRegistry<class CGrenade *, entvars_t *, Vector &, Vector &, float> IReGameHookRegistry_ThrowFlashbang;
|
||||||
|
|
||||||
|
// ThrowSmokeGrenade hook
|
||||||
|
typedef IHookChain<class CGrenade *, entvars_t *, Vector &, Vector &, float, unsigned short> IReGameHook_ThrowSmokeGrenade;
|
||||||
|
typedef IHookChainRegistry<class CGrenade *, entvars_t *, Vector &, Vector &, float, unsigned short> IReGameHookRegistry_ThrowSmokeGrenade;
|
||||||
|
|
||||||
|
// PlantBomb hook
|
||||||
|
typedef IHookChain<class CGrenade *, entvars_t *, Vector &, Vector &> IReGameHook_PlantBomb;
|
||||||
|
typedef IHookChainRegistry<class CGrenade *, entvars_t *, Vector &, Vector &> IReGameHookRegistry_PlantBomb;
|
||||||
|
|
||||||
|
// CBasePlayer::SetSpawnProtection hook
|
||||||
|
typedef IHookChainClass<void, class CBasePlayer, float> IReGameHook_CBasePlayer_SetSpawnProtection;
|
||||||
|
typedef IHookChainRegistryClass<void, class CBasePlayer, float> IReGameHookRegistry_CBasePlayer_SetSpawnProtection;
|
||||||
|
|
||||||
|
// CBasePlayer::RemoveSpawnProtection hook
|
||||||
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_RemoveSpawnProtection;
|
||||||
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_RemoveSpawnProtection;
|
||||||
|
|
||||||
|
// IsPenetrableEntity hook
|
||||||
|
typedef IHookChain<bool, Vector &, Vector &, entvars_t *, edict_t *> IReGameHook_IsPenetrableEntity;
|
||||||
|
typedef IHookChainRegistry<bool, Vector &, Vector &, entvars_t *, edict_t *> IReGameHookRegistry_IsPenetrableEntity;
|
||||||
|
|
||||||
class IReGameHookchains {
|
class IReGameHookchains {
|
||||||
public:
|
public:
|
||||||
virtual ~IReGameHookchains() {}
|
virtual ~IReGameHookchains() {}
|
||||||
|
|
||||||
// CBasePlayer virtual
|
// CBasePlayer virtual
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Spawn *CBasePlayer_Spawn() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Precache* CBasePlayer_Precache() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Precache *CBasePlayer_Precache() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_ObjectCaps* CBasePlayer_ObjectCaps() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_ObjectCaps *CBasePlayer_ObjectCaps() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Classify* CBasePlayer_Classify() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Classify *CBasePlayer_Classify() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_TraceAttack* CBasePlayer_TraceAttack() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_TraceAttack *CBasePlayer_TraceAttack() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_TakeDamage* CBasePlayer_TakeDamage() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_TakeDamage *CBasePlayer_TakeDamage() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_TakeHealth* CBasePlayer_TakeHealth() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_TakeHealth *CBasePlayer_TakeHealth() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Killed* CBasePlayer_Killed() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Killed *CBasePlayer_Killed() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_AddPoints* CBasePlayer_AddPoints() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_AddPoints *CBasePlayer_AddPoints() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_AddPointsToTeam* CBasePlayer_AddPointsToTeam() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_AddPointsToTeam *CBasePlayer_AddPointsToTeam() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_AddPlayerItem* CBasePlayer_AddPlayerItem() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_AddPlayerItem *CBasePlayer_AddPlayerItem() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_RemovePlayerItem* CBasePlayer_RemovePlayerItem() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_RemovePlayerItem *CBasePlayer_RemovePlayerItem() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_GiveAmmo* CBasePlayer_GiveAmmo() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_GiveAmmo *CBasePlayer_GiveAmmo() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_ResetMaxSpeed* CBasePlayer_ResetMaxSpeed() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_ResetMaxSpeed *CBasePlayer_ResetMaxSpeed() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Jump* CBasePlayer_Jump() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Jump *CBasePlayer_Jump() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Duck* CBasePlayer_Duck() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Duck *CBasePlayer_Duck() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_PreThink* CBasePlayer_PreThink() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_PreThink *CBasePlayer_PreThink() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_PostThink* CBasePlayer_PostThink() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_PostThink *CBasePlayer_PostThink() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_UpdateClientData* CBasePlayer_UpdateClientData() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_UpdateClientData *CBasePlayer_UpdateClientData() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_ImpulseCommands* CBasePlayer_ImpulseCommands() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_ImpulseCommands *CBasePlayer_ImpulseCommands() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn* CBasePlayer_RoundRespawn() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn *CBasePlayer_RoundRespawn() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Blind* CBasePlayer_Blind() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Blind *CBasePlayer_Blind() = 0;
|
||||||
|
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CBasePlayer_Observer_IsValidTarget() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget *CBasePlayer_Observer_IsValidTarget() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_SetAnimation* CBasePlayer_SetAnimation() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_SetAnimation *CBasePlayer_SetAnimation() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_GiveDefaultItems* CBasePlayer_GiveDefaultItems() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_GiveDefaultItems *CBasePlayer_GiveDefaultItems() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_GiveNamedItem* CBasePlayer_GiveNamedItem() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_GiveNamedItem *CBasePlayer_GiveNamedItem() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_AddAccount* CBasePlayer_AddAccount() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_AddAccount *CBasePlayer_AddAccount() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_GiveShield* CBasePlayer_GiveShield() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_GiveShield *CBasePlayer_GiveShield() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_SetClientUserInfoModel* CBasePlayer_SetClientUserInfoModel() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_SetClientUserInfoModel *CBasePlayer_SetClientUserInfoModel() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_SetClientUserInfoName* CBasePlayer_SetClientUserInfoName() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_SetClientUserInfoName *CBasePlayer_SetClientUserInfoName() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_HasRestrictItem* CBasePlayer_HasRestrictItem() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_HasRestrictItem *CBasePlayer_HasRestrictItem() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_DropPlayerItem* CBasePlayer_DropPlayerItem() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_DropPlayerItem *CBasePlayer_DropPlayerItem() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_DropShield* CBasePlayer_DropShield() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_DropShield *CBasePlayer_DropShield() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_OnSpawnEquip* CBasePlayer_OnSpawnEquip() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_OnSpawnEquip *CBasePlayer_OnSpawnEquip() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Radio* CBasePlayer_Radio() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Radio *CBasePlayer_Radio() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Disappear* CBasePlayer_Disappear() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Disappear *CBasePlayer_Disappear() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_MakeVIP* CBasePlayer_MakeVIP() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_MakeVIP *CBasePlayer_MakeVIP() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_MakeBomber* CBasePlayer_MakeBomber() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_MakeBomber *CBasePlayer_MakeBomber() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_StartObserver* CBasePlayer_StartObserver() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_StartObserver *CBasePlayer_StartObserver() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_GetIntoGame* CBasePlayer_GetIntoGame() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_GetIntoGame *CBasePlayer_GetIntoGame() = 0;
|
||||||
|
|
||||||
virtual IReGameHookRegistry_CBaseAnimating_ResetSequenceInfo* CBaseAnimating_ResetSequenceInfo() = 0;
|
virtual IReGameHookRegistry_CBaseAnimating_ResetSequenceInfo *CBaseAnimating_ResetSequenceInfo() = 0;
|
||||||
|
|
||||||
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera() = 0;
|
virtual IReGameHookRegistry_GetForceCamera *GetForceCamera() = 0;
|
||||||
virtual IReGameHookRegistry_PlayerBlind* PlayerBlind() = 0;
|
virtual IReGameHookRegistry_PlayerBlind *PlayerBlind() = 0;
|
||||||
virtual IReGameHookRegistry_RadiusFlash_TraceLine* RadiusFlash_TraceLine() = 0;
|
virtual IReGameHookRegistry_RadiusFlash_TraceLine *RadiusFlash_TraceLine() = 0;
|
||||||
virtual IReGameHookRegistry_RoundEnd* RoundEnd() = 0;
|
virtual IReGameHookRegistry_RoundEnd *RoundEnd() = 0;
|
||||||
virtual IReGameHookRegistry_InstallGameRules* InstallGameRules() = 0;
|
virtual IReGameHookRegistry_InstallGameRules *InstallGameRules() = 0;
|
||||||
virtual IReGameHookRegistry_PM_Init* PM_Init() = 0;
|
virtual IReGameHookRegistry_PM_Init *PM_Init() = 0;
|
||||||
virtual IReGameHookRegistry_PM_Move* PM_Move() = 0;
|
virtual IReGameHookRegistry_PM_Move *PM_Move() = 0;
|
||||||
virtual IReGameHookRegistry_PM_AirMove* PM_AirMove() = 0;
|
virtual IReGameHookRegistry_PM_AirMove *PM_AirMove() = 0;
|
||||||
virtual IReGameHookRegistry_HandleMenu_ChooseAppearance* HandleMenu_ChooseAppearance() = 0;
|
virtual IReGameHookRegistry_HandleMenu_ChooseAppearance *HandleMenu_ChooseAppearance() = 0;
|
||||||
virtual IReGameHookRegistry_HandleMenu_ChooseTeam* HandleMenu_ChooseTeam() = 0;
|
virtual IReGameHookRegistry_HandleMenu_ChooseTeam *HandleMenu_ChooseTeam() = 0;
|
||||||
virtual IReGameHookRegistry_ShowMenu* ShowMenu() = 0;
|
virtual IReGameHookRegistry_ShowMenu *ShowMenu() = 0;
|
||||||
virtual IReGameHookRegistry_ShowVGUIMenu* ShowVGUIMenu() = 0;
|
virtual IReGameHookRegistry_ShowVGUIMenu *ShowVGUIMenu() = 0;
|
||||||
virtual IReGameHookRegistry_BuyGunAmmo* BuyGunAmmo() = 0;
|
virtual IReGameHookRegistry_BuyGunAmmo *BuyGunAmmo() = 0;
|
||||||
virtual IReGameHookRegistry_BuyWeaponByWeaponID* BuyWeaponByWeaponID() = 0;
|
virtual IReGameHookRegistry_BuyWeaponByWeaponID *BuyWeaponByWeaponID() = 0;
|
||||||
virtual IReGameHookRegistry_InternalCommand* InternalCommand() = 0;
|
virtual IReGameHookRegistry_InternalCommand *InternalCommand() = 0;
|
||||||
|
|
||||||
virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon* CSGameRules_FShouldSwitchWeapon() = 0;
|
virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon *CSGameRules_FShouldSwitchWeapon() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon* CSGameRules_GetNextBestWeapon() = 0;
|
virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon *CSGameRules_GetNextBestWeapon() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_FlPlayerFallDamage* CSGameRules_FlPlayerFallDamage() = 0;
|
virtual IReGameHookRegistry_CSGameRules_FlPlayerFallDamage *CSGameRules_FlPlayerFallDamage() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_FPlayerCanTakeDamage* CSGameRules_FPlayerCanTakeDamage() = 0;
|
virtual IReGameHookRegistry_CSGameRules_FPlayerCanTakeDamage *CSGameRules_FPlayerCanTakeDamage() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_PlayerSpawn* CSGameRules_PlayerSpawn() = 0;
|
virtual IReGameHookRegistry_CSGameRules_PlayerSpawn *CSGameRules_PlayerSpawn() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_FPlayerCanRespawn* CSGameRules_FPlayerCanRespawn() = 0;
|
virtual IReGameHookRegistry_CSGameRules_FPlayerCanRespawn *CSGameRules_FPlayerCanRespawn() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_GetPlayerSpawnSpot* CSGameRules_GetPlayerSpawnSpot() = 0;
|
virtual IReGameHookRegistry_CSGameRules_GetPlayerSpawnSpot *CSGameRules_GetPlayerSpawnSpot() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_ClientUserInfoChanged* CSGameRules_ClientUserInfoChanged() = 0;
|
virtual IReGameHookRegistry_CSGameRules_ClientUserInfoChanged *CSGameRules_ClientUserInfoChanged() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_PlayerKilled* CSGameRules_PlayerKilled() = 0;
|
virtual IReGameHookRegistry_CSGameRules_PlayerKilled *CSGameRules_PlayerKilled() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_DeathNotice* CSGameRules_DeathNotice() = 0;
|
virtual IReGameHookRegistry_CSGameRules_DeathNotice *CSGameRules_DeathNotice() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_CanHavePlayerItem* CSGameRules_CanHavePlayerItem() = 0;
|
virtual IReGameHookRegistry_CSGameRules_CanHavePlayerItem *CSGameRules_CanHavePlayerItem() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_DeadPlayerWeapons* CSGameRules_DeadPlayerWeapons() = 0;
|
virtual IReGameHookRegistry_CSGameRules_DeadPlayerWeapons *CSGameRules_DeadPlayerWeapons() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_ServerDeactivate* CSGameRules_ServerDeactivate() = 0;
|
virtual IReGameHookRegistry_CSGameRules_ServerDeactivate *CSGameRules_ServerDeactivate() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_CheckMapConditions* CSGameRules_CheckMapConditions() = 0;
|
virtual IReGameHookRegistry_CSGameRules_CheckMapConditions *CSGameRules_CheckMapConditions() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_CleanUpMap* CSGameRules_CleanUpMap() = 0;
|
virtual IReGameHookRegistry_CSGameRules_CleanUpMap *CSGameRules_CleanUpMap() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_RestartRound* CSGameRules_RestartRound() = 0;
|
virtual IReGameHookRegistry_CSGameRules_RestartRound *CSGameRules_RestartRound() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_CheckWinConditions* CSGameRules_CheckWinConditions() = 0;
|
virtual IReGameHookRegistry_CSGameRules_CheckWinConditions *CSGameRules_CheckWinConditions() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_RemoveGuns* CSGameRules_RemoveGuns() = 0;
|
virtual IReGameHookRegistry_CSGameRules_RemoveGuns *CSGameRules_RemoveGuns() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_GiveC4* CSGameRules_GiveC4() = 0;
|
virtual IReGameHookRegistry_CSGameRules_GiveC4 *CSGameRules_GiveC4() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_ChangeLevel* CSGameRules_ChangeLevel() = 0;
|
virtual IReGameHookRegistry_CSGameRules_ChangeLevel *CSGameRules_ChangeLevel() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_GoToIntermission* CSGameRules_GoToIntermission() = 0;
|
virtual IReGameHookRegistry_CSGameRules_GoToIntermission *CSGameRules_GoToIntermission() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0;
|
virtual IReGameHookRegistry_CSGameRules_BalanceTeams *CSGameRules_BalanceTeams() = 0;
|
||||||
virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd() = 0;
|
virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd *CSGameRules_OnRoundFreezeEnd() = 0;
|
||||||
virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound() = 0;
|
virtual IReGameHookRegistry_PM_UpdateStepSound *PM_UpdateStepSound() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_StartDeathCam *CBasePlayer_StartDeathCam() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_SwitchTeam *CBasePlayer_SwitchTeam() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_CanSwitchTeam *CBasePlayer_CanSwitchTeam() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_ThrowGrenade *CBasePlayer_ThrowGrenade() = 0;
|
||||||
|
virtual IReGameHookRegistry_CSGameRules_CanPlayerHearPlayer *CSGameRules_CanPlayerHearPlayer() = 0;
|
||||||
|
virtual IReGameHookRegistry_CWeaponBox_SetModel *CWeaponBox_SetModel() = 0;
|
||||||
|
virtual IReGameHookRegistry_CGrenade_DefuseBombStart *CGrenade_DefuseBombStart() = 0;
|
||||||
|
virtual IReGameHookRegistry_CGrenade_DefuseBombEnd *CGrenade_DefuseBombEnd() = 0;
|
||||||
|
virtual IReGameHookRegistry_CGrenade_ExplodeHeGrenade *CGrenade_ExplodeHeGrenade() = 0;
|
||||||
|
virtual IReGameHookRegistry_CGrenade_ExplodeFlashbang *CGrenade_ExplodeFlashbang() = 0;
|
||||||
|
virtual IReGameHookRegistry_CGrenade_ExplodeSmokeGrenade *CGrenade_ExplodeSmokeGrenade() = 0;
|
||||||
|
virtual IReGameHookRegistry_CGrenade_ExplodeBomb *CGrenade_ExplodeBomb() = 0;
|
||||||
|
virtual IReGameHookRegistry_ThrowHeGrenade *ThrowHeGrenade() = 0;
|
||||||
|
virtual IReGameHookRegistry_ThrowFlashbang *ThrowFlashbang() = 0;
|
||||||
|
virtual IReGameHookRegistry_ThrowSmokeGrenade *ThrowSmokeGrenade() = 0;
|
||||||
|
virtual IReGameHookRegistry_PlantBomb *PlantBomb() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_RemoveSpawnProtection *CBasePlayer_RemoveSpawnProtection() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_SetSpawnProtection *CBasePlayer_SetSpawnProtection() = 0;
|
||||||
|
virtual IReGameHookRegistry_IsPenetrableEntity *IsPenetrableEntity() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ReGameFuncs_t {
|
struct ReGameFuncs_t {
|
||||||
@ -466,17 +562,19 @@ public:
|
|||||||
|
|
||||||
virtual int GetMajorVersion() = 0;
|
virtual int GetMajorVersion() = 0;
|
||||||
virtual int GetMinorVersion() = 0;
|
virtual int GetMinorVersion() = 0;
|
||||||
virtual const ReGameFuncs_t* GetFuncs() = 0;
|
virtual const ReGameFuncs_t *GetFuncs() = 0;
|
||||||
virtual IReGameHookchains* GetHookchains() = 0;
|
virtual IReGameHookchains *GetHookchains() = 0;
|
||||||
|
|
||||||
virtual class CGameRules* GetGameRules() = 0;
|
virtual class CGameRules *GetGameRules() = 0;
|
||||||
virtual struct WeaponInfoStruct* GetWeaponInfo(int weaponID) = 0;
|
virtual struct WeaponInfoStruct *GetWeaponInfo(int weaponID) = 0;
|
||||||
virtual struct WeaponInfoStruct* GetWeaponInfo(const char* weaponName) = 0;
|
virtual struct WeaponInfoStruct *GetWeaponInfo(const char *weaponName) = 0;
|
||||||
virtual struct playermove_s* GetPlayerMove() = 0;
|
virtual struct playermove_s *GetPlayerMove() = 0;
|
||||||
virtual struct WeaponSlotInfo* GetWeaponSlot(WeaponIdType weaponID) = 0;
|
virtual struct WeaponSlotInfo *GetWeaponSlot(WeaponIdType weaponID) = 0;
|
||||||
virtual struct WeaponSlotInfo* GetWeaponSlot(const char* weaponName) = 0;
|
virtual struct WeaponSlotInfo *GetWeaponSlot(const char *weaponName) = 0;
|
||||||
virtual struct ItemInfo* GetItemInfo(WeaponIdType weaponID) = 0;
|
virtual ItemInfo *GetItemInfo(WeaponIdType weaponID) = 0;
|
||||||
virtual struct AmmoInfo* GetAmmoInfo(AmmoType ammoID) = 0;
|
virtual struct AmmoInfo *GetAmmoInfo(AmmoType ammoID) = 0;
|
||||||
|
virtual struct AmmoInfoStruct *GetAmmoInfoEx(AmmoType ammoID) = 0;
|
||||||
|
virtual struct AmmoInfoStruct *GetAmmoInfoEx(const char *ammoName) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VRE_GAMEDLL_API_VERSION "VRE_GAMEDLL_API_VERSION001"
|
#define VRE_GAMEDLL_API_VERSION "VRE_GAMEDLL_API_VERSION001"
|
||||||
|
47
public/resdk/engine/IObjectContainer.h
Normal file
47
public/resdk/engine/IObjectContainer.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class IObjectContainer {
|
||||||
|
public:
|
||||||
|
virtual ~IObjectContainer() {}
|
||||||
|
|
||||||
|
virtual void Init() = 0;
|
||||||
|
|
||||||
|
virtual bool Add(void *newObject) = 0;
|
||||||
|
virtual bool Remove(void *object) = 0;
|
||||||
|
virtual void Clear(bool freeElementsMemory) = 0;
|
||||||
|
|
||||||
|
virtual void *GetFirst() = 0;
|
||||||
|
virtual void *GetNext() = 0;
|
||||||
|
|
||||||
|
virtual int CountElements() = 0;
|
||||||
|
virtual bool Contains(void *object) = 0;
|
||||||
|
virtual bool IsEmpty() = 0;
|
||||||
|
};
|
65
public/resdk/engine/ObjectList.h
Normal file
65
public/resdk/engine/ObjectList.h
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "IObjectContainer.h"
|
||||||
|
|
||||||
|
class ObjectList: public IObjectContainer {
|
||||||
|
public:
|
||||||
|
EXT_FUNC void Init();
|
||||||
|
EXT_FUNC bool Add(void *newObject);
|
||||||
|
EXT_FUNC void *GetFirst();
|
||||||
|
EXT_FUNC void *GetNext();
|
||||||
|
|
||||||
|
ObjectList();
|
||||||
|
virtual ~ObjectList();
|
||||||
|
|
||||||
|
EXT_FUNC void Clear(bool freeElementsMemory = false);
|
||||||
|
EXT_FUNC int CountElements();
|
||||||
|
void *RemoveTail();
|
||||||
|
void *RemoveHead();
|
||||||
|
|
||||||
|
bool AddTail(void *newObject);
|
||||||
|
bool AddHead(void *newObject);
|
||||||
|
EXT_FUNC bool Remove(void *object);
|
||||||
|
EXT_FUNC bool Contains(void *object);
|
||||||
|
EXT_FUNC bool IsEmpty();
|
||||||
|
|
||||||
|
typedef struct element_s {
|
||||||
|
struct element_s *prev; // pointer to the last element or NULL
|
||||||
|
struct element_s *next; // pointer to the next elemnet or NULL
|
||||||
|
void *object; // the element's object
|
||||||
|
} element_t;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
element_t *m_head; // first element in list
|
||||||
|
element_t *m_tail; // last element in list
|
||||||
|
element_t *m_current; // current element in list
|
||||||
|
int m_number;
|
||||||
|
};
|
@ -27,11 +27,13 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "archtypes.h"
|
||||||
|
|
||||||
typedef void(*xcommand_t)(void);
|
typedef void(*xcommand_t)(void);
|
||||||
typedef struct cmd_function_s
|
typedef struct cmd_function_s
|
||||||
{
|
{
|
||||||
struct cmd_function_s *next;
|
struct cmd_function_s *next;
|
||||||
char *name;
|
const char *name;
|
||||||
xcommand_t function;
|
xcommand_t function;
|
||||||
int flags;
|
int flags;
|
||||||
} cmd_function_t;
|
} cmd_function_t;
|
||||||
|
48
public/resdk/engine/pr_dlls.h
Normal file
48
public/resdk/engine/pr_dlls.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
const int MAX_EXTENSION_DLL = 50;
|
||||||
|
|
||||||
|
typedef struct functiontable_s
|
||||||
|
{
|
||||||
|
uint32 pFunction;
|
||||||
|
char *pFunctionName;
|
||||||
|
} functiontable_t;
|
||||||
|
|
||||||
|
typedef struct extensiondll_s
|
||||||
|
{
|
||||||
|
void *lDLLHandle;
|
||||||
|
functiontable_t *functionTable;
|
||||||
|
int functionCount;
|
||||||
|
} extensiondll_t;
|
||||||
|
|
||||||
|
typedef void(*ENTITYINIT)(struct entvars_s *);
|
||||||
|
typedef void(*DISPATCHFUNCTION)(struct entvars_s *, void *);
|
||||||
|
typedef void(*FIELDIOFUNCTION)(SAVERESTOREDATA *, const char *, void *, TYPEDESCRIPTION *, int);
|
@ -27,15 +27,25 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(WIN32)
|
||||||
|
#define FORCE_STACK_ALIGN
|
||||||
|
#else
|
||||||
|
#define FORCE_STACK_ALIGN __attribute__((force_align_arg_pointer))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define EXT_FUNC FORCE_STACK_ALIGN
|
||||||
|
|
||||||
#include <engine_strucs.h>
|
#include <engine_strucs.h>
|
||||||
#include <com_model.h>
|
#include <com_model.h>
|
||||||
#include "cmd_rehlds.h"
|
#include "cmd_rehlds.h"
|
||||||
|
#include "ObjectList.h"
|
||||||
|
#include "pr_dlls.h"
|
||||||
#include "rehlds_interfaces.h"
|
#include "rehlds_interfaces.h"
|
||||||
#include "FlightRecorder.h"
|
#include "FlightRecorder.h"
|
||||||
#include "../common/hookchains.h"
|
#include "../common/hookchains.h"
|
||||||
|
|
||||||
#define REHLDS_API_VERSION_MAJOR 3
|
#define REHLDS_API_VERSION_MAJOR 3
|
||||||
#define REHLDS_API_VERSION_MINOR 0
|
#define REHLDS_API_VERSION_MINOR 4
|
||||||
|
|
||||||
//Steam_NotifyClientConnect hook
|
//Steam_NotifyClientConnect hook
|
||||||
typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect;
|
typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect;
|
||||||
@ -189,6 +199,10 @@ typedef IHookChainRegistry<int, enum sv_delta_s, IGameClient *, struct packet_en
|
|||||||
typedef IHookChain<bool, edict_t *, IGameClient *, int, const char*, float, float, int, int, int, const float*> IRehldsHook_SV_EmitSound2;
|
typedef IHookChain<bool, edict_t *, IGameClient *, int, const char*, float, float, int, int, int, const float*> IRehldsHook_SV_EmitSound2;
|
||||||
typedef IHookChainRegistry<bool, edict_t *, IGameClient *, int, const char*, float, float, int, int, int, const float*> IRehldsHookRegistry_SV_EmitSound2;
|
typedef IHookChainRegistry<bool, edict_t *, IGameClient *, int, const char*, float, float, int, int, int, const float*> IRehldsHookRegistry_SV_EmitSound2;
|
||||||
|
|
||||||
|
//CreateFakeClient hook
|
||||||
|
typedef IHookChain<edict_t *, const char *> IRehldsHook_CreateFakeClient;
|
||||||
|
typedef IHookChainRegistry<edict_t *, const char *> IRehldsHookRegistry_CreateFakeClient;
|
||||||
|
|
||||||
class IRehldsHookchains {
|
class IRehldsHookchains {
|
||||||
public:
|
public:
|
||||||
virtual ~IRehldsHookchains() { }
|
virtual ~IRehldsHookchains() { }
|
||||||
@ -231,6 +245,7 @@ public:
|
|||||||
virtual IRehldsHookRegistry_SV_Spawn_f* SV_Spawn_f() = 0;
|
virtual IRehldsHookRegistry_SV_Spawn_f* SV_Spawn_f() = 0;
|
||||||
virtual IRehldsHookRegistry_SV_CreatePacketEntities* SV_CreatePacketEntities() = 0;
|
virtual IRehldsHookRegistry_SV_CreatePacketEntities* SV_CreatePacketEntities() = 0;
|
||||||
virtual IRehldsHookRegistry_SV_EmitSound2* SV_EmitSound2() = 0;
|
virtual IRehldsHookRegistry_SV_EmitSound2* SV_EmitSound2() = 0;
|
||||||
|
virtual IRehldsHookRegistry_CreateFakeClient* CreateFakeClient() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RehldsFuncs_t {
|
struct RehldsFuncs_t {
|
||||||
@ -267,7 +282,7 @@ struct RehldsFuncs_t {
|
|||||||
cvar_t*(*GetCvarVars)();
|
cvar_t*(*GetCvarVars)();
|
||||||
int (*SV_GetChallenge)(const netadr_t& adr);
|
int (*SV_GetChallenge)(const netadr_t& adr);
|
||||||
void (*SV_AddResource)(resourcetype_t type, const char *name, int size, unsigned char flags, int index);
|
void (*SV_AddResource)(resourcetype_t type, const char *name, int size, unsigned char flags, int index);
|
||||||
int(*MSG_ReadShort)(void);
|
int(*MSG_ReadShort)();
|
||||||
int(*MSG_ReadBuf)(int iSize, void *pbuf);
|
int(*MSG_ReadBuf)(int iSize, void *pbuf);
|
||||||
void(*MSG_WriteBuf)(sizebuf_t *sb, int iSize, void *buf);
|
void(*MSG_WriteBuf)(sizebuf_t *sb, int iSize, void *buf);
|
||||||
void(*MSG_WriteByte)(sizebuf_t *sb, int c);
|
void(*MSG_WriteByte)(sizebuf_t *sb, int c);
|
||||||
@ -282,6 +297,13 @@ struct RehldsFuncs_t {
|
|||||||
bool(*SV_EmitSound2)(edict_t *entity, IGameClient *receiver, int channel, const char *sample, float volume, float attenuation, int flags, int pitch, int emitFlags, const float *pOrigin);
|
bool(*SV_EmitSound2)(edict_t *entity, IGameClient *receiver, int channel, const char *sample, float volume, float attenuation, int flags, int pitch, int emitFlags, const float *pOrigin);
|
||||||
void(*SV_UpdateUserInfo)(IGameClient *pGameClient);
|
void(*SV_UpdateUserInfo)(IGameClient *pGameClient);
|
||||||
bool(*StripUnprintableAndSpace)(char *pch);
|
bool(*StripUnprintableAndSpace)(char *pch);
|
||||||
|
void(*Cmd_RemoveCmd)(const char *cmd_name);
|
||||||
|
void(*GetCommandMatches)(const char *string, ObjectList *pMatchList);
|
||||||
|
bool(*AddExtDll)(void *hModule);
|
||||||
|
void(*AddCvarListener)(const char *var_name, cvar_callback_t func);
|
||||||
|
void(*RemoveExtDll)(void *hModule);
|
||||||
|
void(*RemoveCvarListener)(const char *var_name, cvar_callback_t func);
|
||||||
|
ENTITYINIT(*GetEntityInit)(char *pszClassName);
|
||||||
};
|
};
|
||||||
|
|
||||||
class IRehldsApi {
|
class IRehldsApi {
|
||||||
@ -297,4 +319,4 @@ public:
|
|||||||
virtual IRehldsFlightRecorder* GetFlightRecorder() = 0;
|
virtual IRehldsFlightRecorder* GetFlightRecorder() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VREHLDS_HLDS_API_VERSION "VREHLDS_HLDS_API_VERSION001"
|
#define VREHLDS_HLDS_API_VERSION "VREHLDS_HLDS_API_VERSION001"
|
||||||
|
@ -81,6 +81,7 @@ public:
|
|||||||
virtual IGameClient* GetClient(int id) = 0;
|
virtual IGameClient* GetClient(int id) = 0;
|
||||||
virtual client_t* GetClient_t(int id) = 0;
|
virtual client_t* GetClient_t(int id) = 0;
|
||||||
virtual int GetIndexOfClient_t(client_t* client) = 0;
|
virtual int GetIndexOfClient_t(client_t* client) = 0;
|
||||||
|
virtual int GetMaxClientsLimit() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IRehldsServerData {
|
class IRehldsServerData {
|
||||||
|
@ -7,15 +7,15 @@ IReGameHookchains * ReGameHookchains;
|
|||||||
|
|
||||||
bool RegamedllApi_Init()
|
bool RegamedllApi_Init()
|
||||||
{
|
{
|
||||||
auto library = GET_GAME_INFO(PLID, GINFO_DLL_FULLPATH);
|
const auto library = GET_GAME_INFO(PLID, GINFO_DLL_FULLPATH);
|
||||||
|
|
||||||
if (!library || !GET_IFACE<IReGameApi>(library, ReGameApi, VRE_GAMEDLL_API_VERSION, false) || !ReGameApi)
|
if (!library || !GET_IFACE<IReGameApi>(library, ReGameApi, VRE_GAMEDLL_API_VERSION, false) || !ReGameApi)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto majorVersion = ReGameApi->GetMajorVersion();
|
const auto majorVersion = ReGameApi->GetMajorVersion();
|
||||||
auto minorVersion = ReGameApi->GetMinorVersion();
|
const auto minorVersion = ReGameApi->GetMinorVersion();
|
||||||
|
|
||||||
if (majorVersion != REGAMEDLL_API_VERSION_MAJOR || minorVersion < REGAMEDLL_API_VERSION_MINOR)
|
if (majorVersion != REGAMEDLL_API_VERSION_MAJOR || minorVersion < REGAMEDLL_API_VERSION_MINOR)
|
||||||
{
|
{
|
||||||
|
@ -15,9 +15,9 @@ bool RehldsApi_Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PLATFORM_WINDOWS)
|
#if defined(PLATFORM_WINDOWS)
|
||||||
auto library = "swds";
|
const auto library = "swds";
|
||||||
#elif defined(PLATFORM_POSIX)
|
#elif defined(PLATFORM_POSIX)
|
||||||
auto library = "engine_i486";
|
const auto library = "engine_i486";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!GET_IFACE<IRehldsApi>(library, RehldsApi, VREHLDS_HLDS_API_VERSION) || !RehldsApi)
|
if (!GET_IFACE<IRehldsApi>(library, RehldsApi, VREHLDS_HLDS_API_VERSION) || !RehldsApi)
|
||||||
@ -25,8 +25,8 @@ bool RehldsApi_Init()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto majorVersion = RehldsApi->GetMajorVersion();
|
const auto majorVersion = RehldsApi->GetMajorVersion();
|
||||||
auto minorVersion = RehldsApi->GetMinorVersion();
|
const auto minorVersion = RehldsApi->GetMinorVersion();
|
||||||
|
|
||||||
if (majorVersion != REHLDS_API_VERSION_MAJOR || minorVersion < REHLDS_API_VERSION_MINOR)
|
if (majorVersion != REHLDS_API_VERSION_MAJOR || minorVersion < REHLDS_API_VERSION_MINOR)
|
||||||
{
|
{
|
||||||
|
@ -275,6 +275,7 @@ scripting_files = [
|
|||||||
'include/amxmodx.inc',
|
'include/amxmodx.inc',
|
||||||
'include/core.inc',
|
'include/core.inc',
|
||||||
'include/csstats.inc',
|
'include/csstats.inc',
|
||||||
|
'include/csstats_const.inc',
|
||||||
'include/cstrike.inc',
|
'include/cstrike.inc',
|
||||||
'include/cstrike_const.inc',
|
'include/cstrike_const.inc',
|
||||||
'include/csx.inc',
|
'include/csx.inc',
|
||||||
|
@ -5,6 +5,22 @@ if [ ! -d "amxmodx" ]; then
|
|||||||
git clone --recursive https://github.com/alliedmodders/amxmodx.git
|
git clone --recursive https://github.com/alliedmodders/amxmodx.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "amxmodx/build_deps" ]; then
|
||||||
|
mkdir amxmodx/build_deps
|
||||||
|
fi
|
||||||
|
|
||||||
|
download_archive ()
|
||||||
|
{
|
||||||
|
if [ `command -v wget` ]; then
|
||||||
|
wget "$url" -O "$dest"
|
||||||
|
elif [ `command -v curl` ]; then
|
||||||
|
curl -o $dest $url
|
||||||
|
else
|
||||||
|
echo "Failed to locate wget or curl. Please install one of these programs."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$1" != "--no-mysql" ]; then
|
if [ "$1" != "--no-mysql" ]; then
|
||||||
ismac=0
|
ismac=0
|
||||||
iswin=0
|
iswin=0
|
||||||
@ -34,14 +50,9 @@ if [ "$1" != "--no-mysql" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "mysql-5.5" ]; then
|
if [ ! -d "mysql-5.5" ]; then
|
||||||
if [ `command -v wget` ]; then
|
url=$mysqlurl
|
||||||
wget $mysqlurl -O mysql.$archive_ext
|
dest=mysql.$archive_ext
|
||||||
elif [ `command -v curl` ]; then
|
download_archive
|
||||||
curl -o mysql.$archive_ext $mysqlurl
|
|
||||||
else
|
|
||||||
echo "Failed to locate wget or curl. Install one of these programs to download MySQL."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
$decomp mysql.$archive_ext
|
$decomp mysql.$archive_ext
|
||||||
mv $mysqlver mysql-5.5
|
mv $mysqlver mysql-5.5
|
||||||
rm mysql.$archive_ext
|
rm mysql.$archive_ext
|
||||||
@ -95,3 +106,15 @@ if [ $? -eq 1 ]; then
|
|||||||
python setup.py install --user
|
python setup.py install --user
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $iswin -eq 1 ]; then
|
||||||
|
if [ ! -d "amxmodx/build_deps/nasm-2.13.03" ]; then
|
||||||
|
url=http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
|
||||||
|
dest=amxmodx/build_deps/nasm-2.13.03-win32.zip
|
||||||
|
download_archive
|
||||||
|
cd amxmodx/build_deps
|
||||||
|
unzip nasm-2.13.03-win32.zip
|
||||||
|
rm nasm-2.13.03-win32.zip
|
||||||
|
mv nasm-2.13.03 nasm
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user