CBaseFlex::FlexControllerLocalToGlobal
0x00628e30 · 239 bytes · __thiscall
_ZN9CBaseFlex27FlexControllerLocalToGlobalEPK16flexsettinghdr_ti
Decompiled
undefined (3 params)
/* CBaseFlex::FlexControllerLocalToGlobal(flexsettinghdr_t const*, int) */
undefined4 __thiscall
CBaseFlex::FlexControllerLocalToGlobal(CBaseFlex *this,flexsettinghdr_t *param_1,int param_2)
{
undefined4 uVar1;
uint uVar2;
undefined1 *puVar3;
int iVar4;
flexsettinghdr_t *local_28;
undefined4 local_24;
void *local_20;
local_24 = 0;
local_20 = (void *)0x0;
local_28 = param_1;
/* try { // try from 00628e60 to 00628f13 has its CatchHandler @ 00628f27 */
uVar2 = CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>
*)(this + 0x179c),(FS_LocalToGlobal_t *)&local_28);
uVar2 = uVar2 & 0xffff;
if (uVar2 == 0xffff) {
puVar3 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar3 = *(undefined1 **)(this + 0x7c);
}
if (*(int *)(this + 0x30) == 0) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
Warning("Unable to find mapping for flexcontroller %i, settings %p on %i/%s\n",param_2,param_1,
iVar4,puVar3);
EnsureTranslations(this,param_1);
uVar2 = CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>
*)(this + 0x179c),(FS_LocalToGlobal_t *)&local_28);
uVar2 = uVar2 & 0xffff;
if (uVar2 == 0xffff) {
Error("CBaseFlex::FlexControllerLocalToGlobal failed!\n");
iVar4 = 0x13ffec;
goto LAB_00628ee0;
}
}
iVar4 = uVar2 * 0x14;
LAB_00628ee0:
uVar1 = *(undefined4 *)(*(int *)(*(int *)(this + 0x17a0) + 0x10 + iVar4) + param_2 * 4);
operator_delete(local_20);
return uVar1;
}
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.