CTerrorGameMovement::CheckForLadders
0x004fa930 · 951 bytes · __thiscall
_ZN19CTerrorGameMovement15CheckForLaddersEb
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CTerrorGameMovement::CheckForLadders(bool) */
void __thiscall CTerrorGameMovement::CheckForLadders(CTerrorGameMovement *this,bool param_1)
{
int *piVar1;
uint uVar2;
CBaseEntity *this_00;
char cVar3;
int iVar4;
int iVar5;
undefined *puVar6;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (___atan2f_finite == 0) {
local_20 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/terror/terrorgamemovement.cpp",0x71a,
&CheckForLadders(bool)::tm_fmt,"(%s)%s","Unaccounted",
"CTerrorGameMovement::CheckForLadders");
local_20 = ___atan2f_finite;
}
iVar5 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 004faa56 to 004faaa4 has its CatchHandler @ 004fad05 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
if ((char *)*_DAT_0105d15c != "CTerrorGameMovement::CheckForLadders") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc2930c,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
piVar1 = *(int **)(this + 0x810);
/* try { // try from 004fa9ed to 004fa9f2 has its CatchHandler @ 004fad1a */
/* try { // try from 004fab1b to 004fabfe has its CatchHandler @ 004fad1a */
if (((piVar1 == (int *)0x0) || (cVar3 = (**(code **)(*piVar1 + 0x7e8))(piVar1), cVar3 != '\0')) ||
((cVar3 = (**(code **)(**(int **)(this + 0x810) + 300))(*(int **)(this + 0x810)), cVar3 == '\0'
|| ((*(CBaseEntity **)(this + 0x810))[0x39f2] != (CBaseEntity)0x0)))) {
LAB_004fa9fb:
iVar5 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
}
else {
iVar5 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(this + 0x810));
cVar3 = IsASurvivorTeam(iVar5);
if (cVar3 == '\0') {
this_00 = *(CBaseEntity **)(this + 0x810);
/* try { // try from 004fac69 to 004fac81 has its CatchHandler @ 004fad1a */
iVar5 = CBaseEntity::GetTeamNumber(this_00);
if ((iVar5 != 3) || (iVar5 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar5 != 2))
goto LAB_004fa9fb;
}
iVar5 = *(int *)(this + 0x810);
uVar2 = *(uint *)(iVar5 + 0x3ee0);
if ((((uVar2 == 0xffffffff) ||
(((puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc ||
(*(uint *)(puVar6 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)))) &&
((((uVar2 = *(uint *)(iVar5 + 0x3edc), uVar2 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)))) &&
(((uVar2 = *(uint *)(iVar5 + 0x2a4c), uVar2 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar6 + 8) != uVar2 >> 0xc || (*(int *)(puVar6 + 4) == 0)))))) {
CCSGameMovement::CheckForLadders((CCSGameMovement *)this,param_1);
}
CheckForLedges(this);
iVar5 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
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.