CPushBlockerEnum::EnumElement
0x00792d70 · 604 bytes · __thiscall
_ZN16CPushBlockerEnum11EnumElementEP13IHandleEntity
Decompiled
undefined (2 params)
/* CPushBlockerEnum::EnumElement(IHandleEntity*) */
undefined4 __thiscall CPushBlockerEnum::EnumElement(CPushBlockerEnum *this,IHandleEntity *param_1)
{
uint uVar1;
code *pcVar2;
char cVar3;
uint *puVar4;
CBaseEntity *this_00;
CBaseEntity *pCVar5;
int iVar6;
int *piVar7;
undefined4 uVar8;
undefined4 uVar9;
int iVar10;
int iVar11;
undefined1 local_70 [55];
char local_39;
puVar4 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
uVar1 = *puVar4;
if (uVar1 == 0xffffffff) {
return 0;
}
iVar10 = (uVar1 & 0xfff) * 0x10;
if (*(uint *)(gEntList + iVar10 + 8) != uVar1 >> 0xc) {
return 0;
}
piVar7 = *(int **)(gEntList + iVar10 + 4);
if (piVar7 == (int *)0x0) {
return 0;
}
this_00 = (CBaseEntity *)(**(code **)(*piVar7 + 0x18))(piVar7);
if (this_00 == (CBaseEntity *)0x0) {
return 0;
}
if (*(int *)(this_00 + 0x2dc) == s_nEnumCount) {
return 0;
}
if (this_00[0x1b6] == (CBaseEntity)0x0) {
return 0;
}
if ((*(ushort *)(this_00 + 0x1b4) & 4) != 0) {
return 0;
}
if (this_00[0x186] == (CBaseEntity)0x0) {
return 0;
}
if ((byte)((char)this_00[0x186] - 6U) < 3) {
return 0;
}
if (*(int *)(this + 0x48) < 1) {
return 0;
}
iVar10 = 0;
while (cVar3 = (**(code **)(*g_pGameRules + 0x74))
(g_pGameRules,*(undefined4 *)(this_00 + 0x234),
*(undefined4 *)(this + iVar10 * 4 + 0x28)), cVar3 == '\0') {
iVar10 = iVar10 + 1;
if (*(int *)(this + 0x48) <= iVar10) {
return 0;
}
}
pCVar5 = (CBaseEntity *)CBaseEntity::GetRootMoveParent(this_00);
if (pCVar5 == *(CBaseEntity **)(this + 8)) {
return 0;
}
iVar10 = CBaseEntity::GetGroundEntity(this_00);
if ((((byte)this_00[0x150] & 1) != 0) || (iVar10 != 0)) {
iVar6 = *(int *)(*(int *)(this + 4) + 0x10) + -1;
iVar11 = iVar6 * 0x10;
for (; -1 < iVar6; iVar6 = iVar6 + -1) {
piVar7 = (int *)(*(int *)(*(int *)(this + 4) + 4) + iVar11);
iVar11 = iVar11 + -0x10;
if (iVar10 == *piVar7) goto LAB_00792f48;
}
}
cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
if ((cVar3 == '\0') || (cVar3 = (**(code **)(*(int *)this_00 + 0x558))(this_00), cVar3 == '\0')) {
this[0x10] = (CPushBlockerEnum)0x0;
}
else {
this[0x10] = (CPushBlockerEnum)0x1;
}
piVar7 = (int *)(**(code **)(*(int *)this_00 + 0x10))(this_00);
pcVar2 = *(code **)(*enginetrace + 0x24);
uVar8 = (**(code **)(*(int *)this_00 + 0x2c8))(this_00);
uVar9 = (**(code **)(*piVar7 + 0x24))(piVar7);
if ((((byte)this_00[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition(this_00), ((byte)this_00[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
(*pcVar2)(enginetrace,piVar7,this_00 + 0x2e0,this_00 + 0x2e0,uVar9,uVar8,this + 0xc,local_70);
if (local_39 != '\0') {
LAB_00792f48:
if (pCVar5 != (CBaseEntity *)0x0) {
*(int *)(pCVar5 + 0x2dc) = s_nEnumCount;
CPhysicsPushedEntities::AddEntity(*(CPhysicsPushedEntities **)(this + 4),pCVar5);
return 0;
}
}
return 0;
}
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.