CRestore::ReadVMatrixWorldspace
0x004a9760 · 198 bytes · __cdecl
_ZN8CRestore21ReadVMatrixWorldspaceEP7VMatrixii
Decompiled
undefined (3 params)
/* CRestore::ReadVMatrixWorldspace(VMatrix*, int, int) */
int CRestore::ReadVMatrixWorldspace(VMatrix *param_1,int param_2,int param_3)
{
float fVar1;
float fVar2;
float fVar3;
float *pfVar4;
int iVar5;
VMatrix local_5c [76];
pfVar4 = (float *)&vec3_origin;
if (*(int *)(*(int *)(param_1 + 0x1c) + 0x504) != 0) {
pfVar4 = (float *)(*(int *)(param_1 + 0x1c) + 0x51c);
}
fVar1 = *pfVar4;
fVar2 = pfVar4[1];
fVar3 = pfVar4[2];
if (0 < param_3) {
iVar5 = 0;
do {
iVar5 = iVar5 + 1;
BufferReadBytes((CRestore *)param_1,(char *)local_5c,0x40);
VMatrix::operator=((VMatrix *)param_2,local_5c);
*(float *)(param_2 + 0xc) = fVar1 + *(float *)(param_2 + 0xc);
*(float *)(param_2 + 0x1c) = fVar2 + *(float *)(param_2 + 0x1c);
*(float *)(param_2 + 0x2c) = fVar3 + *(float *)(param_2 + 0x2c);
param_2 = (int)(param_2 + 0x40);
} while (iVar5 != param_3);
}
return param_3;
}
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.