UpdateTangentSpace
0x000d0410 · 179 bytes · __regparm3
_ZL18UpdateTangentSpaceP13CCoreDispInfoiRK6VectorS3_
Decompiled
undefined (4 params)
/* UpdateTangentSpace(CCoreDispInfo*, int, Vector const&, Vector const&) */
void __regparm3
UpdateTangentSpace(CCoreDispInfo *param_1,int param_2,Vector *param_3,Vector *param_4)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
int iVar7;
int iVar8;
iVar7 = param_2 * 0x90;
iVar8 = *(int *)(param_1 + 0x1b8) + iVar7;
*(undefined4 *)(iVar8 + 0x40) = *(undefined4 *)param_3;
*(undefined4 *)(iVar8 + 0x44) = *(undefined4 *)(param_3 + 4);
*(undefined4 *)(iVar8 + 0x48) = *(undefined4 *)(param_3 + 8);
fVar1 = *(float *)(param_3 + 8);
fVar2 = *(float *)(param_3 + 4);
fVar3 = *(float *)param_3;
fVar4 = *(float *)param_4;
fVar5 = *(float *)(param_4 + 4);
fVar6 = *(float *)(param_4 + 8);
iVar8 = *(int *)(param_1 + 0x1b8) + iVar7;
*(float *)(iVar8 + 0x4c) = fVar4;
*(undefined4 *)(iVar8 + 0x50) = *(undefined4 *)(param_4 + 4);
*(undefined4 *)(iVar8 + 0x54) = *(undefined4 *)(param_4 + 8);
iVar7 = iVar7 + *(int *)(param_1 + 0x1b8);
*(float *)(iVar7 + 0x58) = fVar1 * fVar5 - fVar2 * fVar6;
*(float *)(iVar7 + 0x5c) = fVar6 * fVar3 - fVar1 * fVar4;
*(float *)(iVar7 + 0x60) = fVar4 * fVar2 - fVar5 * fVar3;
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.