CUtlVector<CHandle<CTonemapTrigger>,CUtlMemory<CHandle<CTonemapTrigger>,int>>::FindAndRemove
0x007c1570 · 274 bytes · __thiscall
_ZN10CUtlVectorI7CHandleI15CTonemapTriggerE10CUtlMemoryIS2_iEE13FindAndRemoveERKS2_
Decompiled
undefined (2 params)
/* CUtlVector<CHandle<CTonemapTrigger>, CUtlMemory<CHandle<CTonemapTrigger>, int>
>::FindAndRemove(CHandle<CTonemapTrigger> const&) */
undefined4 __thiscall
CUtlVector<CHandle<CTonemapTrigger>,CUtlMemory<CHandle<CTonemapTrigger>,int>>::FindAndRemove
(CUtlVector<CHandle<CTonemapTrigger>,CUtlMemory<CHandle<CTonemapTrigger>,int>> *this,
CHandle *param_1)
{
int *piVar1;
uint uVar2;
uint uVar3;
undefined *puVar4;
uint *puVar5;
int iVar6;
int local_24;
int local_20;
local_24 = *(int *)(this + 0xc);
if (0 < local_24) {
local_20 = 0;
uVar2 = *(uint *)param_1;
piVar1 = (int *)(g_pEntityList + (uVar2 & 0xfff) * 0x10 + 4);
puVar5 = *(uint **)this;
do {
iVar6 = 0;
if (uVar2 != 0xffffffff) {
if (piVar1 == (int *)0x0) {
iVar6 = 0;
}
else if (piVar1[1] == uVar2 >> 0xc) {
iVar6 = *piVar1;
}
}
uVar3 = *puVar5;
if (((uVar3 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) {
if (iVar6 == 0) {
LAB_007c1630:
iVar6 = (local_24 - local_20) + -1;
if (0 < iVar6) {
_V_memmove(puVar5,*(uint **)this + local_20 + 1,iVar6 * 4);
local_24 = *(int *)(this + 0xc);
}
*(int *)(this + 0xc) = local_24 + -1;
return 1;
}
}
else if (iVar6 == *(int *)(puVar4 + 4)) goto LAB_007c1630;
local_20 = local_20 + 1;
puVar5 = puVar5 + 1;
} while (local_20 != local_24);
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.