GCSDK::CRecordInfo::AddIndex
0x00093a70 · 515 bytes · __thiscall
_ZN5GCSDK11CRecordInfo8AddIndexERKNS_10FieldSet_tE
Decompiled
undefined (2 params)
/* GCSDK::CRecordInfo::AddIndex(GCSDK::FieldSet_t const&) */
int __thiscall GCSDK::CRecordInfo::AddIndex(CRecordInfo *this,FieldSet_t *param_1)
{
char cVar1;
CUtlVector<int,CUtlMemory<int,int>> *this_00;
int iVar2;
int iVar3;
int iVar4;
iVar3 = *(int *)(this + 0xd4);
if (0 < iVar3) {
iVar2 = 0;
iVar4 = 0;
do {
cVar1 = FieldSet_t::CompareFieldSets
(param_1,this,(FieldSet_t *)(*(int *)(this + 200) + iVar2),this);
if (cVar1 != '\0') {
return -1;
}
iVar3 = *(int *)(this + 0xd4);
iVar4 = iVar4 + 1;
iVar2 = iVar2 + 0xb0;
} while (iVar4 < iVar3);
}
CUtlVector<GCSDK::FieldSet_t,CUtlMemory<GCSDK::FieldSet_t,int>>::GrowVector
((CUtlVector<GCSDK::FieldSet_t,CUtlMemory<GCSDK::FieldSet_t,int>> *)(this + 200),1);
CUtlVector<GCSDK::FieldSet_t,CUtlMemory<GCSDK::FieldSet_t,int>>::ShiftElementsRight
((CUtlVector<GCSDK::FieldSet_t,CUtlMemory<GCSDK::FieldSet_t,int>> *)(this + 200),iVar3,1
);
this_00 = (CUtlVector<int,CUtlMemory<int,int>> *)(iVar3 * 0xb0 + *(int *)(this + 200));
if (this_00 == (CUtlVector<int,CUtlMemory<int,int>> *)0x0) {
return iVar3;
}
*(undefined4 *)this_00 = 0;
*(undefined4 *)(this_00 + 4) = 0;
*(undefined4 *)(this_00 + 8) = 0;
*(undefined4 *)(this_00 + 0xc) = 0;
*(undefined4 *)(this_00 + 0x10) = 0;
*(undefined4 *)(this_00 + 0x14) = 0;
*(undefined4 *)(this_00 + 0x18) = 0;
*(undefined4 *)(this_00 + 0x1c) = 0;
*(undefined4 *)(this_00 + 0x20) = 0;
*(undefined4 *)(this_00 + 0x24) = 0;
iVar2 = *(int *)(param_1 + 0xc);
if (iVar2 != 0) {
CUtlVector<int,CUtlMemory<int,int>>::GrowVector(this_00,iVar2);
CUtlVector<int,CUtlMemory<int,int>>::ShiftElementsRight(this_00,0,iVar2);
if (0 < iVar2) {
iVar4 = 0;
do {
*(undefined4 *)(*(int *)this_00 + iVar4 * 4) = *(undefined4 *)(*(int *)param_1 + iVar4 * 4);
iVar4 = iVar4 + 1;
} while (iVar4 != iVar2);
}
}
iVar2 = *(int *)(param_1 + 0x20);
*(undefined4 *)(this_00 + 0x20) = 0;
if (iVar2 != 0) {
CUtlVector<int,CUtlMemory<int,int>>::GrowVector(this_00 + 0x14,iVar2);
CUtlVector<int,CUtlMemory<int,int>>::ShiftElementsRight(this_00 + 0x14,0,iVar2);
if (0 < iVar2) {
iVar4 = 0;
do {
*(undefined4 *)(*(int *)(this_00 + 0x14) + iVar4 * 4) =
*(undefined4 *)(*(int *)(param_1 + 0x14) + iVar4 * 4);
iVar4 = iVar4 + 1;
} while (iVar4 != iVar2);
}
}
this_00[0x28] = *(CUtlVector<int,CUtlMemory<int,int>> *)(param_1 + 0x28);
this_00[0x29] = *(CUtlVector<int,CUtlMemory<int,int>> *)(param_1 + 0x29);
*(undefined4 *)(this_00 + 0x2c) = *(undefined4 *)(param_1 + 0x2c);
/* try { // try from 00093bb8 to 00093c5b has its CatchHandler @ 00093c8b */
V_strncpy((char *)(this_00 + 0x30),(char *)(param_1 + 0x30),0x80);
return iVar3;
}
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.