mirror of
https://github.com/arthurdead/proxysend.git
synced 2025-12-06 18:08:22 +00:00
css
This commit is contained in:
parent
09aa70e774
commit
7b493af742
@ -30,7 +30,7 @@ def CopyFiles(src, dest, files):
|
||||
|
||||
# Include files
|
||||
CopyFiles('sourcemod/scripting/include', 'addons/sourcemod/scripting/include',
|
||||
[ 'proxysend.inc', ]
|
||||
[ 'proxysend.inc', 'proxysend_tf2.inc' ]
|
||||
)
|
||||
|
||||
# GameData files
|
||||
|
||||
4796
extension.cpp
4796
extension.cpp
File diff suppressed because it is too large
Load Diff
@ -1,80 +1,80 @@
|
||||
"Games"
|
||||
{
|
||||
"tf"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"CBaseClient::UpdateSendState"
|
||||
{
|
||||
"linux" "46"
|
||||
}
|
||||
"CBaseClient::SendSnapshot"
|
||||
{
|
||||
"linux" "52"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"SendTable_CalcDelta"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z19SendTable_CalcDeltaPK9SendTablePKviS3_iPiii"
|
||||
}
|
||||
"SendTable_Encode"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z16SendTable_EncodePK9SendTablePKvP8bf_writeiP10CUtlMemoryI20CSendProxyRecipientsiEb"
|
||||
}
|
||||
"SV_ComputeClientPacks"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z21SV_ComputeClientPacksiPP11CGameClientP14CFrameSnapshot"
|
||||
}
|
||||
"CGameServer::SendClientMessages"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN11CGameServer18SendClientMessagesEb"
|
||||
}
|
||||
"CFrameSnapshotManager::GetPackedEntity"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN21CFrameSnapshotManager15GetPackedEntityEP14CFrameSnapshoti"
|
||||
}
|
||||
"CGameClient::GetSendFrame"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN11CGameClient12GetSendFrameEv"
|
||||
}
|
||||
"SV_PackEntity"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZL13SV_PackEntityiP7edict_tP11ServerClassP14CFrameSnapshot"
|
||||
}
|
||||
"InvalidateSharedEdictChangeInfos"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z32InvalidateSharedEdictChangeInfosv"
|
||||
}
|
||||
"PackWork_t::Process"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN10PackWork_t7ProcessERS_"
|
||||
}
|
||||
"SendProxy_StringT_To_String"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z27SendProxy_StringT_To_StringPK8SendPropPKvS3_P8DVariantii"
|
||||
}
|
||||
"SendProxy_Color32ToInt"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z22SendProxy_Color32ToIntPK8SendPropPKvS3_P8DVariantii"
|
||||
}
|
||||
"SendProxy_EHandleToInt"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z22SendProxy_EHandleToIntPK8SendPropPKvS3_P8DVariantii"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"Games"
|
||||
{
|
||||
"#default"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"CBaseClient::UpdateSendState"
|
||||
{
|
||||
"linux" "46"
|
||||
}
|
||||
"CBaseClient::SendSnapshot"
|
||||
{
|
||||
"linux" "52"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"SendTable_CalcDelta"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z19SendTable_CalcDeltaPK9SendTablePKviS3_iPiii"
|
||||
}
|
||||
"SendTable_Encode"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z16SendTable_EncodePK9SendTablePKvP8bf_writeiP10CUtlMemoryI20CSendProxyRecipientsiEb"
|
||||
}
|
||||
"SV_ComputeClientPacks"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z21SV_ComputeClientPacksiPP11CGameClientP14CFrameSnapshot"
|
||||
}
|
||||
"CGameServer::SendClientMessages"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN11CGameServer18SendClientMessagesEb"
|
||||
}
|
||||
"CFrameSnapshotManager::GetPackedEntity"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN21CFrameSnapshotManager15GetPackedEntityEP14CFrameSnapshoti"
|
||||
}
|
||||
"CGameClient::GetSendFrame"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN11CGameClient12GetSendFrameEv"
|
||||
}
|
||||
"SV_PackEntity"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZL13SV_PackEntityiP7edict_tP11ServerClassP14CFrameSnapshot"
|
||||
}
|
||||
"InvalidateSharedEdictChangeInfos"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_Z32InvalidateSharedEdictChangeInfosv"
|
||||
}
|
||||
"PackWork_t::Process"
|
||||
{
|
||||
"library" "engine"
|
||||
"linux" "@_ZN10PackWork_t7ProcessERS_"
|
||||
}
|
||||
"SendProxy_StringT_To_String"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z27SendProxy_StringT_To_StringPK8SendPropPKvS3_P8DVariantii"
|
||||
}
|
||||
"SendProxy_Color32ToInt"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z22SendProxy_Color32ToIntPK8SendPropPKvS3_P8DVariantii"
|
||||
}
|
||||
"SendProxy_EHandleToInt"
|
||||
{
|
||||
"library" "server"
|
||||
"linux" "@_Z22SendProxy_EHandleToIntPK8SendPropPKvS3_P8DVariantii"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
#endif
|
||||
#define __PROXYSEND_INC
|
||||
|
||||
#include <tf2>
|
||||
#include <sdktools>
|
||||
|
||||
typeset proxysend_callbacks
|
||||
@ -12,7 +11,6 @@ typeset proxysend_callbacks
|
||||
function Action (int entity, const char[] prop, RoundState &value, int element, int client);
|
||||
function Action (int entity, const char[] prop, RenderMode &value, int element, int client);
|
||||
function Action (int entity, const char[] prop, RenderFx &value, int element, int client);
|
||||
function Action (int entity, const char[] prop, TFClassType &value, int element, int client);
|
||||
|
||||
function Action (int entity, const char[] prop, bool &value, int element, int client);
|
||||
|
||||
@ -28,58 +26,9 @@ typeset proxysend_callbacks
|
||||
native void proxysend_hook(int entity, const char[] prop, proxysend_callbacks callback, bool per_client);
|
||||
native void proxysend_unhook(int entity, const char[] prop, proxysend_callbacks callback);
|
||||
|
||||
stock int get_bit_for_cond(TFCond cond)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: return (1 << icond);
|
||||
case 1: return (1 << (icond - 32));
|
||||
case 2: return (1 << (icond - 64));
|
||||
case 3: return (1 << (icond - 96));
|
||||
case 4: return (1 << (icond - 128));
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
stock void get_prop_name_for_cond(TFCond cond, char[] name, int len)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: strcopy(name, len, "m_nPlayerCond");
|
||||
case 1: strcopy(name, len, "m_nPlayerCondEx");
|
||||
case 2: strcopy(name, len, "m_nPlayerCondEx2");
|
||||
case 3: strcopy(name, len, "m_nPlayerCondEx3");
|
||||
case 4: strcopy(name, len, "m_nPlayerCondEx4");
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
}
|
||||
|
||||
stock void proxysend_hook_cond(int entity, TFCond cond, proxysend_callbacks callback, bool per_client)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: proxysend_hook(entity, "m_nPlayerCond", callback, per_client);
|
||||
case 1: proxysend_hook(entity, "m_nPlayerCondEx", callback, per_client);
|
||||
case 2: proxysend_hook(entity, "m_nPlayerCondEx2", callback, per_client);
|
||||
case 3: proxysend_hook(entity, "m_nPlayerCondEx3", callback, per_client);
|
||||
case 4: proxysend_hook(entity, "m_nPlayerCondEx4", callback, per_client);
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
}
|
||||
|
||||
stock void proxysend_unhook_cond(int entity, TFCond cond, proxysend_callbacks callback)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: proxysend_unhook(entity, "m_nPlayerCond", callback);
|
||||
case 1: proxysend_unhook(entity, "m_nPlayerCondEx", callback);
|
||||
case 2: proxysend_unhook(entity, "m_nPlayerCondEx2", callback);
|
||||
case 3: proxysend_unhook(entity, "m_nPlayerCondEx3", callback);
|
||||
case 4: proxysend_unhook(entity, "m_nPlayerCondEx4", callback);
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
}
|
||||
#if defined _tf2_included || defined _tf2_stocks_included
|
||||
#include <proxysend_tf2>
|
||||
#endif
|
||||
|
||||
#if !defined REQUIRE_EXTENSIONS
|
||||
public __ext_proxysend_SetNTVOptional()
|
||||
@ -103,4 +52,4 @@ public Extension __ext_proxysend =
|
||||
#else
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
63
sourcemod/scripting/include/proxysend_tf2.inc
Normal file
63
sourcemod/scripting/include/proxysend_tf2.inc
Normal file
@ -0,0 +1,63 @@
|
||||
#if defined __PROXYSEND_TF2_INC
|
||||
#endinput
|
||||
#endif
|
||||
#define __PROXYSEND_TF2_INC
|
||||
|
||||
#include <tf2>
|
||||
|
||||
#if !defined __PROXYSEND_INC
|
||||
#include <proxysend>
|
||||
#endif
|
||||
|
||||
stock int get_bit_for_cond(TFCond cond)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: return (1 << icond);
|
||||
case 1: return (1 << (icond - 32));
|
||||
case 2: return (1 << (icond - 64));
|
||||
case 3: return (1 << (icond - 96));
|
||||
case 4: return (1 << (icond - 128));
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
stock void get_prop_name_for_cond(TFCond cond, char[] name, int len)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: strcopy(name, len, "m_nPlayerCond");
|
||||
case 1: strcopy(name, len, "m_nPlayerCondEx");
|
||||
case 2: strcopy(name, len, "m_nPlayerCondEx2");
|
||||
case 3: strcopy(name, len, "m_nPlayerCondEx3");
|
||||
case 4: strcopy(name, len, "m_nPlayerCondEx4");
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
}
|
||||
|
||||
stock void proxysend_hook_cond(int entity, TFCond cond, proxysend_callbacks callback, bool per_client)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: proxysend_hook(entity, "m_nPlayerCond", callback, per_client);
|
||||
case 1: proxysend_hook(entity, "m_nPlayerCondEx", callback, per_client);
|
||||
case 2: proxysend_hook(entity, "m_nPlayerCondEx2", callback, per_client);
|
||||
case 3: proxysend_hook(entity, "m_nPlayerCondEx3", callback, per_client);
|
||||
case 4: proxysend_hook(entity, "m_nPlayerCondEx4", callback, per_client);
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
}
|
||||
|
||||
stock void proxysend_unhook_cond(int entity, TFCond cond, proxysend_callbacks callback)
|
||||
{
|
||||
int icond = view_as<int>(cond);
|
||||
switch(icond / 32) {
|
||||
case 0: proxysend_unhook(entity, "m_nPlayerCond", callback);
|
||||
case 1: proxysend_unhook(entity, "m_nPlayerCondEx", callback);
|
||||
case 2: proxysend_unhook(entity, "m_nPlayerCondEx2", callback);
|
||||
case 3: proxysend_unhook(entity, "m_nPlayerCondEx3", callback);
|
||||
case 4: proxysend_unhook(entity, "m_nPlayerCondEx4", callback);
|
||||
default: ThrowError("Invalid TFCond value %d", icond);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user