CMeleeWeaponInfo::ParseSwing
0x00543d90 · 340 bytes · __thiscall
_ZN16CMeleeWeaponInfo10ParseSwingEP12melee_anim_tP9KeyValues
Decompiled
undefined (3 params)
/* CMeleeWeaponInfo::ParseSwing(melee_anim_t*, KeyValues*) */
void __thiscall
CMeleeWeaponInfo::ParseSwing(CMeleeWeaponInfo *this,melee_anim_t *param_1,KeyValues *param_2)
{
char *pcVar1;
undefined4 uVar2;
longdouble lVar3;
pcVar1 = (char *)KeyValues::GetString(param_2,"activity","ACT_INVALID");
uVar2 = ActivityList_IndexForName(pcVar1);
*(undefined4 *)param_1 = uVar2;
pcVar1 = (char *)KeyValues::GetString(param_2,"player_activity","ACT_INVALID");
uVar2 = ActivityList_IndexForName(pcVar1);
*(undefined4 *)(param_1 + 4) = uVar2;
pcVar1 = (char *)KeyValues::GetString(param_2,"player_activity_idle","ACT_INVALID");
uVar2 = ActivityList_IndexForName(pcVar1);
*(undefined4 *)(param_1 + 8) = uVar2;
lVar3 = (longdouble)KeyValues::GetFloat(param_2,"starttime",0.0);
*(float *)(param_1 + 0x14) = (float)lVar3;
lVar3 = (longdouble)KeyValues::GetFloat(param_2,"endtime",0.0);
*(float *)(param_1 + 0x18) = (float)lVar3;
lVar3 = (longdouble)KeyValues::GetFloat(param_2,"duration",1.0);
*(float *)(param_1 + 0x1c) = (float)lVar3;
pcVar1 = (char *)KeyValues::GetString(param_2,"startdir","E");
uVar2 = GetDirectionEnumFromString(this,pcVar1);
*(undefined4 *)(param_1 + 0xc) = uVar2;
pcVar1 = (char *)KeyValues::GetString(param_2,"enddir","W");
uVar2 = GetDirectionEnumFromString(this,pcVar1);
*(undefined4 *)(param_1 + 0x10) = uVar2;
ParseVector(param_2,"force_dir",(Vector *)(param_1 + 0x24));
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.