ActivityList_RegisterSharedActivity
0x003ed790 · 152 bytes · __cdecl
_Z35ActivityList_RegisterSharedActivityPKci
Decompiled
undefined (2 params)
/* ActivityList_RegisterSharedActivity(char const*, int) */
undefined4 ActivityList_RegisterSharedActivity(char *param_1,int param_2)
{
int *piVar1;
undefined4 uVar2;
int iVar3;
ActivityList_RegisterSharedActivity(char_const*,int)::lastActivityIndex = param_2;
piVar1 = (int *)ListFromString(param_1);
if (piVar1 == (int *)0x0) {
if (DAT_00f72d70 < 1) {
LAB_003ed819:
ActivityList_AddActivityEntry(param_1,param_2,false);
return 1;
}
piVar1 = g_ActivityList;
if (param_2 != *g_ActivityList) {
iVar3 = 0;
do {
piVar1 = piVar1 + 2;
iVar3 = iVar3 + 1;
if (iVar3 == DAT_00f72d70) goto LAB_003ed819;
} while (param_2 != *piVar1);
}
}
uVar2 = CStringRegistry::GetStringForKey
((CStringRegistry *)&g_ActivityStrings,*(ushort *)(piVar1 + 1));
Warning("***\nShared activity collision! %s<->%s\n***\n",param_1,uVar2);
return 0;
}
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.