CBotDoorEnumerator::EnumElement
0x0086cc10 · 301 bytes · __thiscall
_ZN18CBotDoorEnumerator11EnumElementEP13IHandleEntity
Decompiled
undefined (2 params)
/* CBotDoorEnumerator::EnumElement(IHandleEntity*) */
undefined4 __thiscall
CBotDoorEnumerator::EnumElement(CBotDoorEnumerator *this,IHandleEntity *param_1)
{
int *piVar1;
char cVar2;
uint *puVar3;
CBaseEntity *this_00;
uint uVar4;
int iVar5;
puVar3 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
uVar4 = *puVar3;
if ((((uVar4 != 0xffffffff) &&
(iVar5 = (uVar4 & 0xfff) * 0x10, *(uint *)(gEntList + iVar5 + 8) == uVar4 >> 0xc)) &&
(piVar1 = *(int **)(gEntList + iVar5 + 4), piVar1 != (int *)0x0)) &&
((this_00 = (CBaseEntity *)(**(code **)(*piVar1 + 0x18))(piVar1), this_00 != (CBaseEntity *)0x0
&& (uVar4 = (**(code **)(*(int *)this_00 + 0xa4))(this_00), (uVar4 & 0x10) != 0)))) {
if ((*(char **)(this_00 + 0x7c) == "func_door*") ||
(cVar2 = CBaseEntity::ClassMatchesComplex(this_00,"func_door*"), cVar2 != '\0')) {
iVar5 = __dynamic_cast(this_00,&CBaseEntity::typeinfo,&CBaseDoor::typeinfo,0);
if (iVar5 == 0) {
return 0;
}
if (*(int *)(iVar5 + 0x440) - 2U < 2) {
return 0;
}
}
else {
if ((*(char **)(this_00 + 0x7c) != "prop_door*") &&
(cVar2 = CBaseEntity::ClassMatchesComplex(this_00,"prop_door*"), cVar2 == '\0')) {
return 0;
}
iVar5 = __dynamic_cast(this_00,&CBaseEntity::typeinfo,&CBasePropDoor::typeinfo,0);
if (iVar5 == 0) {
return 0;
}
if ((*(uint *)(&DAT_000015f4 + iVar5) & 0xfffffffd) == 1) {
return 0;
}
}
if (*(int *)(this + 8) < *(int *)(this + 0xc)) {
*(CBaseEntity **)(*(int *)(this + 4) + *(int *)(this + 8) * 4) = this_00;
*(int *)(this + 8) = *(int *)(this + 8) + 1;
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.