CLogicMeasureMovement::MeasureThink
0x006ee8c0 · 1349 bytes · __thiscall
_ZN21CLogicMeasureMovement12MeasureThinkEv
Decompiled
undefined (1 param)
/* CLogicMeasureMovement::MeasureThink() */
void __thiscall CLogicMeasureMovement::MeasureThink(CLogicMeasureMovement *this)
{
float fVar1;
CBaseEntity *this_00;
uint uVar2;
char *pcVar3;
int iVar4;
int *piVar5;
QAngle *pQVar6;
uint uVar7;
undefined *puVar8;
undefined4 uVar9;
int *piVar10;
float fVar11;
float *local_100;
undefined4 local_f4;
undefined4 local_f0;
undefined4 local_ec;
undefined1 local_e8 [12];
undefined1 local_dc [48];
matrix3x4_t local_ac [48];
undefined1 local_7c [48];
float local_4c;
float local_48;
float local_44;
undefined4 local_40;
undefined4 local_30;
undefined4 local_20;
piVar10 = (int *)&stack0xfffffee4;
uVar7 = *(uint *)(this + 0x44c);
if ((((uVar7 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar7 >> 0xc)) || (*(int *)(puVar8 + 4) == 0)) {
pcVar3 = *(char **)(this + 0x440);
if (pcVar3 == (char *)0x0) {
pcVar3 = "";
}
iVar4 = V_strnicmp(pcVar3,"!player",8);
if (iVar4 == 0) {
pcVar3 = "";
if (*(char **)(this + 0x440) != (char *)0x0) {
pcVar3 = *(char **)(this + 0x440);
}
SetMeasureTarget(this,pcVar3);
uVar7 = *(uint *)(this + 0x44c);
}
else {
uVar7 = *(uint *)(this + 0x44c);
}
}
piVar5 = (int *)&stack0xfffffee4;
if (((((uVar7 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10, piVar5 = (int *)&stack0xfffffee4,
puVar8 == (undefined *)0xfffffffc)) ||
((piVar5 = (int *)&stack0xfffffee4, *(uint *)(puVar8 + 8) != uVar7 >> 0xc ||
((this_00 = *(CBaseEntity **)(puVar8 + 4), piVar5 = (int *)&stack0xfffffee4,
this_00 == (CBaseEntity *)0x0 ||
(uVar7 = *(uint *)(this + 0x450), piVar5 = (int *)&stack0xfffffee4, uVar7 == 0xffffffff))))
)) || ((puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10, piVar5 = (int *)&stack0xfffffee4,
puVar8 == (undefined *)0xfffffffc ||
(((piVar5 = (int *)&stack0xfffffee4, *(uint *)(puVar8 + 8) != uVar7 >> 0xc ||
(piVar5 = (int *)&stack0xfffffee4, *(int *)(puVar8 + 4) == 0)) ||
(uVar2 = *(uint *)(this + 0x454), piVar5 = (int *)&stack0xfffffee4,
uVar2 == 0xffffffff)))))) ||
(((puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, piVar5 = (int *)&stack0xfffffee4,
puVar8 == (undefined *)0xfffffffc ||
(piVar5 = (int *)&stack0xfffffee4, *(uint *)(puVar8 + 8) != uVar2 >> 0xc)) ||
((((piVar5 = (int *)&stack0xfffffee4, *(int *)(puVar8 + 4) == 0 ||
((uVar2 = *(uint *)(this + 0x458), piVar5 = (int *)&stack0xfffffee4, uVar2 == 0xffffffff ||
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, piVar5 = (int *)&stack0xfffffee4,
puVar8 == (undefined *)0xfffffffc)))) ||
(piVar5 = (int *)&stack0xfffffee4, *(uint *)(puVar8 + 8) != uVar2 >> 0xc)) ||
(piVar5 = (int *)&stack0xfffffee4, *(int *)(puVar8 + 4) == 0)))))) goto LAB_006ee980;
if (*(int *)(this + 0x460) == 0) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
MatrixInvert((matrix3x4_t *)(this_00 + 0x28c),local_ac);
uVar7 = *(uint *)(this + 0x450);
LAB_006eeb1a:
iVar4 = 0;
if ((uVar7 != 0xffffffff) &&
(piVar5 = (int *)(g_pEntityList + (uVar7 & 0xfff) * 0x10 + 4), piVar5 != (int *)0x0))
goto LAB_006eeb34;
}
else {
if (*(int *)(this + 0x460) == 1) {
(**(code **)(*(int *)this_00 + 0x234))();
uVar7 = *(uint *)(this + 0x44c);
piVar5 = (int *)0x0;
piVar10 = (int *)&stack0xfffffee0;
if (uVar7 != 0xffffffff) {
puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10;
if ((puVar8 == (undefined *)0xfffffffc) || (*(uint *)(puVar8 + 8) != uVar7 >> 0xc)) {
piVar5 = (int *)0x0;
}
else {
piVar5 = *(int **)(puVar8 + 4);
}
}
pQVar6 = (QAngle *)(**(code **)(*piVar5 + 0x238))();
AngleIMatrix(pQVar6,(Vector *)&local_4c,local_ac);
uVar7 = *(uint *)(this + 0x450);
goto LAB_006eeb1a;
}
piVar5 = (int *)(g_pEntityList + (uVar7 & 0xfff) * 0x10 + 4);
piVar10 = (int *)&stack0xfffffee4;
LAB_006eeb34:
if (piVar5[1] == uVar7 >> 0xc) {
iVar4 = *piVar5;
}
else {
iVar4 = 0;
}
}
local_100 = &local_4c;
if ((*(byte *)(iVar4 + 0x14d) & 8) != 0) {
*piVar10 = iVar4;
piVar10[-1] = 0x6eece8;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar10);
}
*piVar10 = (int)local_ac;
piVar10[2] = (int)local_dc;
piVar10[1] = iVar4 + 0x28c;
piVar10[-1] = 0x6eeb71;
ConcatTransforms((matrix3x4_t *)*piVar10,(matrix3x4_t *)piVar10[1],(matrix3x4_t *)piVar10[2]);
if ((*(float *)(this + 0x45c) != 0.0) && (*(float *)(this + 0x45c) != 1.0)) {
*piVar10 = (int)local_dc;
piVar10[1] = 3;
piVar10[2] = (int)local_100;
piVar10[-1] = 0x6eeda2;
MatrixGetColumn((matrix3x4_t *)*piVar10,piVar10[1],(Vector *)piVar10[2]);
fVar11 = 1.0 / *(float *)(this + 0x45c);
local_4c = local_4c * fVar11;
*piVar10 = (int)local_100;
piVar10[1] = 3;
piVar10[2] = (int)local_dc;
local_48 = local_48 * fVar11;
local_44 = fVar11 * local_44;
piVar10[-1] = 0x6eedf2;
MatrixSetColumn((Vector *)*piVar10,piVar10[1],(matrix3x4_t *)piVar10[2]);
}
*piVar10 = (int)local_dc;
iVar4 = 0;
piVar10[1] = (int)local_7c;
piVar10[-1] = 0x6eebaa;
MatrixInvert((matrix3x4_t *)*piVar10,(matrix3x4_t *)piVar10[1]);
uVar7 = *(uint *)(this + 0x458);
if (((uVar7 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar7 >> 0xc)) {
iVar4 = *(int *)(puVar8 + 4);
}
if ((*(byte *)(iVar4 + 0x14d) & 8) != 0) {
*piVar10 = iVar4;
piVar10[-1] = 0x6eecd8;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar10);
}
piVar10[1] = (int)local_7c;
*piVar10 = iVar4 + 0x28c;
piVar10[2] = (int)local_100;
piVar10[-1] = 0x6eec0a;
ConcatTransforms((matrix3x4_t *)*piVar10,(matrix3x4_t *)piVar10[1],(matrix3x4_t *)piVar10[2]);
piVar10[1] = (int)local_e8;
*piVar10 = (int)local_100;
piVar10[-1] = 0x6eec1c;
MatrixAngles((matrix3x4_t *)*piVar10,(float *)piVar10[1]);
uVar9 = 0;
uVar7 = *(uint *)(this + 0x454);
local_f4 = local_40;
local_f0 = local_30;
local_ec = local_20;
if (((uVar7 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar7 >> 0xc)) {
uVar9 = *(undefined4 *)(puVar8 + 4);
}
*piVar10 = uVar9;
piVar10[1] = (int)&local_f4;
piVar10[-1] = 0x6eec88;
CBaseEntity::SetAbsOrigin((CBaseEntity *)*piVar10,(Vector *)piVar10[1]);
uVar7 = *(uint *)(this + 0x454);
uVar9 = 0;
if (((uVar7 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar7 >> 0xc)) {
uVar9 = *(undefined4 *)(puVar8 + 4);
}
piVar10[1] = (int)local_e8;
*piVar10 = uVar9;
piVar10[-1] = 0x6eecc7;
CBaseEntity::SetAbsAngles((CBaseEntity *)*piVar10,(QAngle *)piVar10[1]);
piVar5 = piVar10;
LAB_006ee980:
piVar5[2] = 0;
fVar11 = *(float *)(gpGlobals + 0x1c);
fVar1 = *(float *)(gpGlobals + 0xc);
*piVar5 = (int)this;
piVar5[1] = (int)(fVar11 + fVar1);
piVar5[-1] = 0x6ee9a5;
CBaseEntity::SetNextThink((CBaseEntity *)*piVar5,(float)piVar5[1],(char *)piVar5[2]);
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.