CFrameSnapshotManager::AddExplicitDelete
0x001f2290 · 252 bytes · __thiscall
_ZN21CFrameSnapshotManager17AddExplicitDeleteEi
Decompiled
undefined (2 params)
/* CFrameSnapshotManager::AddExplicitDelete(int) */
uint __thiscall CFrameSnapshotManager::AddExplicitDelete(CFrameSnapshotManager *this,int param_1)
{
CFrameSnapshotManager *pCVar1;
int *piVar2;
uint uVar3;
int iVar4;
uint uVar5;
int iVar6;
pCVar1 = this + 0x409c;
uVar5 = ThreadGetCurrentId();
if (uVar5 == *(uint *)(this + 0x409c)) {
LAB_001f22c7:
*(int *)(this + 0x40a0) = *(int *)(this + 0x40a0) + 1;
}
else {
LOCK();
uVar3 = *(uint *)pCVar1;
if (uVar3 == 0) {
*(uint *)pCVar1 = uVar5;
}
UNLOCK();
if (uVar3 == 0) goto LAB_001f22c7;
CThreadFastMutex::Lock((uint)pCVar1,uVar5);
}
iVar4 = *(int *)(this + 0x40b0);
if (0 < iVar4) {
if (**(int **)(this + 0x40a4) == param_1) goto LAB_001f2340;
iVar6 = 0;
do {
iVar6 = iVar6 + 1;
if (iVar6 == iVar4) goto LAB_001f2300;
} while ((*(int **)(this + 0x40a4))[iVar6] != param_1);
if (iVar6 != -1) goto LAB_001f2340;
}
LAB_001f2300:
CUtlVector<int,CUtlMemory<int,int>>::GrowVector
((CUtlVector<int,CUtlMemory<int,int>> *)(this + 0x40a4),1);
/* try { // try from 001f232b to 001f232f has its CatchHandler @ 001f239a */
CUtlVector<int,CUtlMemory<int,int>>::ShiftElementsRight
((CUtlVector<int,CUtlMemory<int,int>> *)(this + 0x40a4),iVar4,1);
piVar2 = (int *)(*(int *)(this + 0x40a4) + iVar4 * 4);
if (piVar2 != (int *)0x0) {
*piVar2 = param_1;
}
LAB_001f2340:
*(int *)(this + 0x40a0) = *(int *)(this + 0x40a0) + -1;
uVar5 = *(uint *)(this + 0x40a0);
if (uVar5 == 0) {
LOCK();
uVar5 = *(uint *)pCVar1;
*(uint *)pCVar1 = 0;
UNLOCK();
}
return uVar5;
}
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.