CLogicBranch::UpdateValue
0x006eb040 · 264 bytes · __thiscall
_ZN12CLogicBranch11UpdateValueEbP11CBaseEntityNS_17LogicBranchFire_tE
Decompiled
undefined (4 params)
/* CLogicBranch::UpdateValue(bool, CBaseEntity*, CLogicBranch::LogicBranchFire_t) */
void __thiscall
CLogicBranch::UpdateValue
(CLogicBranch *param_1,CLogicBranch param_2,CBaseEntity *param_3,int param_4)
{
uint uVar1;
undefined *puVar2;
int iVar3;
if ((param_1[0x440] != param_2) && (param_1[0x440] = param_2, 0 < *(int *)(param_1 + 0x450))) {
iVar3 = 0;
do {
while( true ) {
uVar1 = *(uint *)(*(int *)(param_1 + 0x444) + iVar3 * 4);
if ((((uVar1 == 0xffffffff) ||
(puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar2 + 8) != uVar1 >> 0xc)) ||
(*(CBaseEntity **)(puVar2 + 4) == (CBaseEntity *)0x0)) break;
iVar3 = iVar3 + 1;
CEventQueue::AddEvent
((CEventQueue *)g_EventQueue,*(CBaseEntity **)(puVar2 + 4),"_OnLogicBranchChanged"
,0.0,(CBaseEntity *)param_1,(CBaseEntity *)param_1,0);
if (*(int *)(param_1 + 0x450) <= iVar3) goto LAB_006eb0fd;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(param_1 + 0x450));
}
LAB_006eb0fd:
if (param_4 != 0) {
return;
}
if (param_1[0x440] == (CLogicBranch)0x0) {
COutputEvent::FireOutput((COutputEvent *)(param_1 + 0x470),param_3,(CBaseEntity *)param_1,0.0);
return;
}
COutputEvent::FireOutput((COutputEvent *)(param_1 + 0x458),param_3,(CBaseEntity *)param_1,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.