CBreakParser::ParseKeyValue
0x0049c060 · 875 bytes · __thiscall
_ZN12CBreakParser13ParseKeyValueEPvPKcS2_
Decompiled
undefined (4 params)
/* CBreakParser::ParseKeyValue(void*, char const*, char const*) */
void __thiscall
CBreakParser::ParseKeyValue(CBreakParser *this,void *param_1,char *param_2,char *param_3)
{
int iVar1;
long lVar2;
char *extraout_ECX;
char *extraout_ECX_00;
double dVar3;
iVar1 = _V_stricmp(param_2,"model");
if (iVar1 == 0) {
FixupModelName((char *)((int)param_1 + 0xc),(int)param_3,extraout_ECX);
return;
}
iVar1 = _V_stricmp(param_2,"ragdoll");
if (iVar1 != 0) {
iVar1 = _V_stricmp(param_2,"motiondisabled");
if (iVar1 == 0) {
*(undefined1 *)((int)param_1 + 0x426) = 1;
}
else {
iVar1 = _V_stricmp(param_2,"offset");
if (iVar1 == 0) {
UTIL_StringToVector(param_1,param_3);
return;
}
iVar1 = _V_stricmp(param_2,"health");
if (iVar1 == 0) {
dVar3 = strtod(param_3,(char **)0x0);
*(float *)((int)param_1 + 0x418) = (float)dVar3;
}
else {
iVar1 = _V_stricmp(param_2,"fadetime");
if (iVar1 == 0) {
dVar3 = strtod(param_3,(char **)0x0);
*(float *)((int)param_1 + 0x40c) = (float)dVar3;
if (this[0xc] == (CBreakParser)0x0) {
*(undefined4 *)((int)param_1 + 0x420) = 1;
}
}
else {
iVar1 = _V_stricmp(param_2,"fademindist");
if (iVar1 == 0) {
dVar3 = strtod(param_3,(char **)0x0);
*(float *)((int)param_1 + 0x410) = (float)dVar3;
}
else {
iVar1 = _V_stricmp(param_2,"fademaxdist");
if (iVar1 == 0) {
dVar3 = strtod(param_3,(char **)0x0);
*(float *)((int)param_1 + 0x414) = (float)dVar3;
}
else {
iVar1 = _V_stricmp(param_2,"debris");
if (iVar1 == 0) {
lVar2 = strtol(param_3,(char **)0x0,10);
*(uint *)((int)param_1 + 0x420) = (uint)(lVar2 < 1) * 3 + 1;
this[0xc] = (CBreakParser)0x1;
}
else {
iVar1 = _V_stricmp(param_2,"burst");
if (iVar1 == 0) {
dVar3 = strtod(param_3,(char **)0x0);
*(float *)((int)param_1 + 0x41c) = (float)dVar3;
}
else {
iVar1 = _V_stricmp(param_2,"placementbone");
if (iVar1 == 0) {
V_strncpy((char *)((int)param_1 + 0x20c),param_3,0x200);
*(undefined1 *)((int)param_1 + 0x425) = 1;
}
else {
iVar1 = _V_stricmp(param_2,"placementattachment");
if (iVar1 == 0) {
V_strncpy((char *)((int)param_1 + 0x20c),param_3,0x200);
*(undefined1 *)((int)param_1 + 0x425) = 0;
}
else {
iVar1 = _V_stricmp(param_2,"multiplayer_break");
if (iVar1 == 0) {
if ((param_3 != "server") &&
(iVar1 = _V_stricmp(param_3,"server"), iVar1 != 0)) {
if ((param_3 != "client") &&
(iVar1 = _V_stricmp(param_3,"client"), iVar1 != 0)) {
return;
}
*(undefined4 *)((int)param_1 + 0x428) = 2;
return;
}
*(undefined4 *)((int)param_1 + 0x428) = 1;
}
}
}
}
}
}
}
}
}
}
return;
}
FixupModelName((char *)((int)param_1 + 0xc),(int)param_3,extraout_ECX_00);
*(undefined1 *)((int)param_1 + 0x424) = 1;
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.