CServerGameClients::GetBugReportInfo
0x006c5a40 · 1206 bytes · __thiscall
_ZN18CServerGameClients16GetBugReportInfoEPci
Decompiled
undefined (3 params)
/* CServerGameClients::GetBugReportInfo(char*, int) */
void __thiscall
CServerGameClients::GetBugReportInfo(CServerGameClients *this,char *param_1,int param_2)
{
float fVar1;
char cVar2;
CBaseEntity *this_00;
int *piVar3;
int *piVar4;
int iVar5;
int *piVar6;
CBasePlayer *pCVar7;
int *piVar8;
int iVar9;
int *piVar10;
int iVar11;
undefined1 *puVar12;
undefined1 local_cb0 [4];
undefined1 local_cac [3228];
piVar10 = (int *)&stack0xfffff2f4;
*param_1 = '\0';
if ((*(int *)(debug_l4dverbose._28_4_ + 0x30) == 0) ||
(piVar8 = (int *)GetGlobalTeam(2), piVar8 == (int *)0x0)) {
iVar9 = *(int *)(gpGlobals + 0x14);
}
else {
V_snprintf(param_1,param_2,"%s\nSurvivorBot Data\n");
iVar9 = (**(code **)(*piVar8 + 0x354))();
if (0 < iVar9) {
iVar11 = 0;
do {
this_00 = (CBaseEntity *)(**(code **)(*piVar8 + 0x358))();
if ((((this_00 != (CBaseEntity *)0x0) &&
(cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(), cVar2 != '\0')) &&
(cVar2 = (**(code **)(*(int *)this_00 + 0x778))(), cVar2 != '\0')) &&
(((piVar3 = (int *)__dynamic_cast(), piVar3 != (int *)0x0 &&
(piVar4 = (int *)(**(code **)(*piVar3 + 0x9a8))(), piVar4 != (int *)0x0)) &&
((iVar5 = (**(code **)(*piVar4 + 8))(), iVar5 != 0 &&
(piVar6 = (int *)__dynamic_cast(), piVar6 != (int *)0x0)))))) {
iVar5 = (**(code **)(*piVar6 + 8))();
if ((iVar5 != 0) && (piVar6 = (int *)__dynamic_cast(), piVar6 != (int *)0x0)) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
(**(code **)(*piVar6 + 0xac))();
(**(code **)(*piVar3 + 0x9b8))();
V_snprintf(param_1,param_2,"%s%s(%4.2f %4.2f %4.2f): %s");
}
iVar5 = (**(code **)(*piVar4 + 0xc))();
if ((((iVar5 != 0) && (piVar3 = (int *)__dynamic_cast(), piVar3 != (int *)0x0)) &&
(iVar5 = (**(code **)(*piVar3 + 8))(), iVar5 != 0)) &&
(piVar3 = (int *)__dynamic_cast(), piVar3 != (int *)0x0)) {
(**(code **)(*piVar3 + 0xac))();
V_snprintf(param_1,param_2,"%s - %s\n");
}
}
iVar11 = iVar11 + 1;
} while (iVar11 != iVar9);
}
V_snprintf(param_1,param_2,"%s\n");
iVar9 = *(int *)(gpGlobals + 0x14);
}
if (iVar9 == 1) {
pCVar7 = (CBasePlayer *)UTIL_PlayerByIndex(1);
piVar8 = (int *)FindPickerEntity(pCVar7);
if (piVar8 != (int *)0x0) {
(**(code **)(*piVar8 + 0x20))();
piVar10 = (int *)&stack0xfffff2f0;
V_snprintf(param_1,param_2,"Picker %i/%s - ent %s model %s\n");
}
*piVar10 = (int)local_cb0;
piVar10[-1] = 0x6c5e10;
iVar9 = GetRecentNPCSpeech((recentNPCSpeech_t *)*piVar10);
if (0 < iVar9) {
piVar10[2] = (int)"%sRecent NPC speech:\n";
piVar10[3] = (int)param_1;
piVar10[1] = param_2;
*piVar10 = (int)param_1;
piVar10[-1] = 0x6c5e43;
V_snprintf((char *)*piVar10,piVar10[1],(char *)piVar10[2]);
iVar11 = 0;
puVar12 = local_cac;
do {
piVar10[6] = (int)puVar12;
iVar11 = iVar11 + 1;
piVar10[7] = (int)(puVar12 + 0x200);
fVar1 = *(float *)(puVar12 + -4);
piVar10[3] = (int)param_1;
piVar10[2] = (int)"%s time: %6.3f sound name: %s scene: %s\n";
*(double *)(piVar10 + 4) = (double)fVar1;
piVar10[1] = param_2;
*piVar10 = (int)param_1;
piVar10[-1] = 0x6c5e95;
V_snprintf((char *)*piVar10,piVar10[1],(char *)piVar10[2]);
puVar12 = puVar12 + 0x284;
} while (iVar11 != iVar9);
fVar1 = *(float *)(gpGlobals + 0xc);
piVar10[2] = (int)"%sCurrent time: %6.3f\n";
*(double *)(piVar10 + 4) = (double)fVar1;
piVar10[3] = (int)param_1;
piVar10[1] = param_2;
*piVar10 = (int)param_1;
piVar10[-1] = 0x6c5ed1;
V_snprintf((char *)*piVar10,piVar10[1],(char *)piVar10[2]);
return;
}
}
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.