CBaseEntity::DrawInputOverlay
0x00608bf0 · 795 bytes · __thiscall
_ZN11CBaseEntity16DrawInputOverlayEPKcPS_9variant_t
Decompiled
undefined (4 params)
/* CBaseEntity::DrawInputOverlay(char const*, CBaseEntity*, variant_t) */
void __thiscall
CBaseEntity::DrawInputOverlay
(CBaseEntity *this,undefined4 param_1,CBaseEntity *param_2,variant_t *param_4)
{
float fVar1;
undefined4 uVar2;
undefined4 uVar3;
undefined1 *puVar4;
undefined4 uVar5;
undefined1 *puVar6;
int in_GS_OFFSET;
char *pcVar7;
undefined4 local_434;
char local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)(param_4 + 0x10) == 5) {
if (param_2 == (CBaseEntity *)0x0) {
puVar6 = *(undefined1 **)param_4;
uVar2 = 0;
}
else {
uVar2 = GetDebugName(param_2);
puVar6 = (undefined1 *)0x0;
if (*(int *)(param_4 + 0x10) == 5) {
puVar6 = *(undefined1 **)param_4;
}
}
fVar1 = *(float *)(gpGlobals + 0xc);
pcVar7 = "%3.1f (%s,%d) <-- (%s)\n";
}
else {
if (*(int *)(param_4 + 0x10) != 2) {
uVar2 = 0;
if (param_2 != (CBaseEntity *)0x0) {
uVar2 = GetDebugName(param_2);
}
V_snprintf(local_420,0x400,"%3.1f (%s) <-- (%s)\n",(double)*(float *)(gpGlobals + 0xc),
param_1,uVar2);
goto LAB_00608c87;
}
if (param_2 == (CBaseEntity *)0x0) {
uVar2 = 0;
LAB_00608f22:
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)param_4 != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)param_4;
}
}
else {
uVar2 = GetDebugName(param_2);
if (*(int *)(param_4 + 0x10) == 2) goto LAB_00608f22;
puVar6 = (undefined1 *)variant_t::ToString(param_4);
}
fVar1 = *(float *)(gpGlobals + 0xc);
pcVar7 = "%3.1f (%s,%s) <-- (%s)\n";
}
V_snprintf(local_420,0x400,pcVar7,(double)fVar1,param_1,puVar6,uVar2);
LAB_00608c87:
AddTimedOverlay(this,local_420,10);
if (*(int *)(param_4 + 0x10) == 5) {
uVar2 = 0;
if (param_2 != (CBaseEntity *)0x0) {
uVar2 = GetDebugName(param_2);
}
uVar3 = GetDebugName(this);
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)(this + 0x7c);
}
uVar5 = 0;
if (*(int *)(param_4 + 0x10) == 5) {
uVar5 = *(undefined4 *)param_4;
}
DevMsg(2,"input: (%s,%d) -> (%s,%s), from (%s)\n",param_1,uVar5,puVar6,uVar3,uVar2);
}
else if (*(int *)(param_4 + 0x10) == 2) {
local_434 = 0;
if (param_2 != (CBaseEntity *)0x0) {
local_434 = GetDebugName(param_2);
}
uVar2 = GetDebugName(this);
puVar6 = *(undefined1 **)(this + 0x7c);
if (puVar6 == (undefined1 *)0x0) {
puVar6 = &DAT_00d539c2;
}
if (*(int *)(param_4 + 0x10) == 2) {
puVar4 = &DAT_00d539c2;
if (*(undefined1 **)param_4 != (undefined1 *)0x0) {
puVar4 = *(undefined1 **)param_4;
}
}
else {
puVar4 = (undefined1 *)variant_t::ToString(param_4);
}
DevMsg(2,"input: (%s,%s) -> (%s,%s), from (%s)\n",param_1,puVar4,puVar6,uVar2,local_434);
}
else {
uVar2 = 0;
if (param_2 != (CBaseEntity *)0x0) {
uVar2 = GetDebugName(param_2);
}
uVar3 = GetDebugName(this);
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)(this + 0x7c);
}
DevMsg(2,"input: (%s) -> (%s,%s), from (%s)\n",param_1,puVar6,uVar3,uVar2);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.