CTakeDamageInfo::DebugGetDamageTypeString
0x004c88e0 · 168 bytes · __cdecl
_ZN15CTakeDamageInfo24DebugGetDamageTypeStringEjPci
Decompiled
undefined (3 params)
/* CTakeDamageInfo::DebugGetDamageTypeString(unsigned int, char*, int) */
void CTakeDamageInfo::DebugGetDamageTypeString(uint param_1,char *param_2,int param_3)
{
bool bVar1;
int iVar2;
int iVar3;
if (param_1 == 0) {
iVar3 = V_snprintf(param_2,param_3,"%s","GENERIC");
param_2 = param_2 + iVar3;
param_3 = param_3 - iVar3;
}
iVar3 = 1;
do {
while( true ) {
if (param_3 < 1) {
return;
}
if ((1 << ((char)iVar3 - 1U & 0x1f) & param_1) != 0) break;
bVar1 = 0x1d < iVar3;
iVar3 = iVar3 + 1;
if (bVar1) {
return;
}
}
iVar2 = V_snprintf(param_2,param_3,"%s ",*(undefined4 *)(s_DamageTypeToStrTable + iVar3 * 4));
param_3 = param_3 - iVar2;
param_2 = param_2 + iVar2;
bVar1 = iVar3 < 0x1e;
iVar3 = iVar3 + 1;
} while (bVar1);
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.