CHLTVServer::UpdateTick
0x00172320 · 935 bytes · __thiscall
_ZN11CHLTVServer10UpdateTickEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CHLTVServer::UpdateTick() */
void __thiscall CHLTVServer::UpdateTick(CHLTVServer *this)
{
uint *puVar1;
char cVar2;
int iVar3;
int iVar4;
bool bVar5;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_Plat_SetBenchmarkMode == 0) {
local_20 = 0;
}
else {
(**(code **)(_Plat_SetBenchmarkMode + 0x50))
(_Plat_SetBenchmarkMode,&local_34,0,0,0,0,"/data/src/engine/./hltvserver.cpp",0x634,
&UpdateTick()::tm_fmt,"(%s)%s",&DAT_002b07c7,"CHLTVServer::UpdateTick");
local_20 = _Plat_SetBenchmarkMode;
}
iVar4 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00172526 to 00172586 has its CatchHandler @ 00172708 */
if (((_DAT_0040b028 == 0) && (DAT_0040b02c != '\0')) ||
(iVar3 = ThreadGetCurrentId(), iVar4 != iVar3)) {
iVar4 = *(int *)(this + 0x51bc);
}
else {
if ((char *)*_DAT_0040b030 != "CHLTVServer::UpdateTick") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2b1700,(char *)0x0,0x2b07c7);
}
puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
iVar4 = *(int *)(this + 0x51bc);
DAT_0040b02c = '\0';
}
if (iVar4 < 0) {
*(undefined4 *)(this + 0x10) = 0;
*(undefined4 *)(this + 0x51c4) = 0;
}
else {
iVar4 = *(int *)(this + 0x51c0);
/* try { // try from 001723ed to 001724ab has its CatchHandler @ 001726e7 */
cVar2 = (**(code **)(*(int *)this + 0x54))(this);
if (cVar2 != '\0') {
iVar4 = *(int *)(this + 0x51bc);
iVar3 = (**(code **)(**(int **)(this + 0x51b8) + 0x14))(*(int **)(this + 0x51b8));
if (iVar3 < iVar4) {
iVar4 = *(int *)(this + 0x51bc);
}
else {
/* try { // try from 0017265b to 0017265d has its CatchHandler @ 001726e7 */
iVar4 = (**(code **)(**(int **)(this + 0x51b8) + 0x14))(*(int **)(this + 0x51b8));
}
}
iVar4 = CClientFrameManager::GetClientFrame((CClientFrameManager *)(this + 0x1cc),iVar4,false);
if ((iVar4 != 0) && (iVar4 != *(int *)(this + 0x51c4))) {
*(int *)(this + 0x51c4) = iVar4;
*(undefined4 *)(this + 0x10) = *(undefined4 *)(iVar4 + 8);
cVar2 = (**(code **)(*(int *)this + 0x54))(this);
if (cVar2 == '\0') {
CDeltaEntityCache::SetTick
((CDeltaEntityCache *)(this + 0x63e0),*(int *)(*(int *)(this + 0x51c4) + 8),
*(int *)(*(int *)(this + 0x51c4) + 4) + 1);
}
else {
RestoreTick(this,*(int *)(this + 0x10));
if (*(int *)(tv_transmitall._28_4_ + 0x30) == 0) {
/* try { // try from 001726dd to 001726e1 has its CatchHandler @ 001726e7 */
EntityPVSCheck(this,*(CClientFrame **)(this + 0x51c4));
}
}
iVar4 = (int)((float)*(int *)(this + 0x10) - 16.0 / *(float *)(this + 0x110));
if (0 < iVar4) {
CClientFrameManager::DeleteClientFrames((CClientFrameManager *)(this + 0x1cc),iVar4);
}
bVar5 = DAT_0040b02c == '\0';
*(undefined4 *)(this + 0x83f8) = 0;
iVar4 = _DAT_0040b9d4;
if (((bVar5) || (_DAT_0040b028 != 0)) && (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
return;
}
return;
}
}
iVar4 = _DAT_0040b9d4;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.