CTerrorMeleeWeapon::WeaponTranslateMainActivity
0x00568120 · 284 bytes · __thiscall
_ZN18CTerrorMeleeWeapon27WeaponTranslateMainActivityE8Activity
Decompiled
undefined (2 params)
/* CTerrorMeleeWeapon::WeaponTranslateMainActivity(Activity) */
int __thiscall
CTerrorMeleeWeapon::WeaponTranslateMainActivity(CTerrorMeleeWeapon *param_1,int param_2)
{
int iVar1;
char *pcVar2;
iVar1 = CMeleeWeaponInfoStore::GetMeleeWeaponInfo
((CMeleeWeaponInfoStore *)g_MeleeWeaponInfoStore,*(int *)(param_1 + 0x17e0));
if (iVar1 == 0) {
return param_2;
}
if (param_2 == 0x2d) {
pcVar2 = (char *)(iVar1 + 0x21d);
}
else if (param_2 < 0x2e) {
if (param_2 == 8) {
pcVar2 = (char *)(iVar1 + 0x26d);
}
else if (param_2 < 9) {
if (param_2 == 1) {
pcVar2 = (char *)(iVar1 + 0x12d);
}
else {
pcVar2 = (char *)(iVar1 + 0x17d);
if (param_2 != 6) {
return param_2;
}
}
}
else if (param_2 == 0xc) {
pcVar2 = (char *)(iVar1 + 0x2bd);
}
else if (param_2 == 0x1d) {
pcVar2 = (char *)(iVar1 + 0x4ed);
}
else {
if (param_2 != 10) {
return param_2;
}
pcVar2 = (char *)(iVar1 + 0x1cd);
}
}
else if (param_2 == 0x1ff) {
pcVar2 = (char *)(iVar1 + 0x3ad);
}
else if (param_2 < 0x200) {
if (param_2 == 0x1fc) {
pcVar2 = (char *)(iVar1 + 0x30d);
}
else {
pcVar2 = (char *)(iVar1 + 0x35d);
if (param_2 != 0x1fe) {
return param_2;
}
}
}
else if (param_2 == 0x201) {
pcVar2 = (char *)(iVar1 + 0x44d);
}
else if (param_2 < 0x201) {
pcVar2 = (char *)(iVar1 + 0x3fd);
}
else {
pcVar2 = (char *)(iVar1 + 0x49d);
if (param_2 != 0x202) {
return param_2;
}
}
iVar1 = ActivityList_IndexForName(pcVar2);
return iVar1;
}
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.