CBaseEntity::ValidateEntityConnections
0x006081c0 · 928 bytes · __thiscall
_ZN11CBaseEntity25ValidateEntityConnectionsEv
Decompiled
undefined (1 param)
/* CBaseEntity::ValidateEntityConnections() */
void __thiscall CBaseEntity::ValidateEntityConnections(CBaseEntity *this)
{
float fVar1;
float fVar2;
float fVar3;
char *pcVar4;
int iVar5;
char cVar6;
int *piVar7;
int iVar8;
float *pfVar9;
undefined4 uVar10;
int *piVar11;
int iVar12;
undefined1 *puVar13;
if (((((*(int *)(this + 0xf8) != 0) && (pcVar4 = *(char **)(this + 0x7c), pcVar4 != "scripted_*"))
&& (cVar6 = ClassMatchesComplex(this,"scripted_*"), cVar6 == '\0')) &&
(((pcVar4 != "trigger_relay" &&
(cVar6 = ClassMatchesComplex(this,"trigger_relay"), cVar6 == '\0')) &&
((pcVar4 != "trigger_auto" &&
((cVar6 = ClassMatchesComplex(this,"trigger_auto"), cVar6 == '\0' && (pcVar4 != "path_*"))))
)))) && (((((cVar6 = ClassMatchesComplex(this,"path_*"), cVar6 == '\0' &&
(((((pcVar4 != "monster_*" &&
(cVar6 = ClassMatchesComplex(this,"monster_*"), cVar6 == '\0')) &&
(pcVar4 != "trigger_teleport")) &&
((cVar6 = ClassMatchesComplex(this,"trigger_teleport"), cVar6 == '\0' &&
(pcVar4 != "func_train")))) &&
(((cVar6 = ClassMatchesComplex(this,"func_train"), cVar6 == '\0' &&
((pcVar4 != "func_tracktrain" &&
(cVar6 = ClassMatchesComplex(this,"func_tracktrain"), cVar6 == '\0')))) &&
(pcVar4 != "func_plat*")))))) &&
((((((cVar6 = ClassMatchesComplex(this,"func_plat*"), cVar6 == '\0' &&
(pcVar4 != "npc_*")) &&
(cVar6 = ClassMatchesComplex(this,"npc_*"), cVar6 == '\0')) &&
((pcVar4 != "info_big*" &&
(cVar6 = ClassMatchesComplex(this,"info_big*"), cVar6 == '\0')))) &&
(pcVar4 != "env_texturetoggle")) &&
(((cVar6 = ClassMatchesComplex(this,"env_texturetoggle"), cVar6 == '\0' &&
(pcVar4 != "env_render")) &&
((cVar6 = ClassMatchesComplex(this,"env_render"), cVar6 == '\0' &&
(((pcVar4 != "func_areaportalwindow" &&
(cVar6 = ClassMatchesComplex(this,"func_areaportalwindow"), cVar6 == '\0'))
&& (pcVar4 != "point_view*")))))))))) &&
(((cVar6 = ClassMatchesComplex(this,"point_view*"), cVar6 == '\0' &&
(pcVar4 != "func_traincontrols")) &&
(cVar6 = ClassMatchesComplex(this,"func_traincontrols"), cVar6 == '\0')))) &&
(((pcVar4 != "multisource" &&
(cVar6 = ClassMatchesComplex(this,"multisource"), cVar6 == '\0')) &&
((pcVar4 != "xen_plant*" &&
(cVar6 = ClassMatchesComplex(this,"xen_plant*"), cVar6 == '\0')))))))) {
piVar7 = (int *)(**(code **)(*(int *)this + 0x30))(this);
do {
if (piVar7 == (int *)0x0) {
pfVar9 = (float *)(**(code **)(*(int *)this + 0x288))(this);
fVar1 = *pfVar9;
fVar2 = pfVar9[1];
fVar3 = pfVar9[2];
Warning("---------------------------------\n");
puVar13 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar13 = *(undefined1 **)(this + 0x7c);
}
uVar10 = GetDebugName(this);
Warning("Entity %s - (%s) has a target and NO OUTPUTS\n",uVar10,puVar13);
Warning("Location %f %f %f\n",(double)fVar1,(double)fVar2,(double)fVar3);
Warning();
return;
}
iVar5 = piVar7[1];
iVar12 = 0;
if (0 < iVar5) {
do {
piVar11 = (int *)(iVar12 * 0x40 + *piVar7);
if (((*piVar11 == 0xb) && ((*(byte *)((int)piVar11 + 0xe) & 0x10) != 0)) &&
(iVar8 = CBaseEntityOutput::NumberOfElements((CBaseEntityOutput *)(this + piVar11[2])),
iVar8 != 0)) {
return;
}
iVar12 = iVar12 + 1;
} while (iVar12 != iVar5);
}
piVar7 = (int *)piVar7[3];
} while( true );
}
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.