ScratchPad_DrawEntityToScratchPad
0x0081fbd0 · 694 bytes · __cdecl
_Z33ScratchPad_DrawEntityToScratchPadP13IScratchPad3DmP11CBaseEntityRK6Vector
Decompiled
undefined (4 params)
/* ScratchPad_DrawEntityToScratchPad(IScratchPad3D*, unsigned long, CBaseEntity*, Vector const&) */
void ScratchPad_DrawEntityToScratchPad
(IScratchPad3D *param_1,ulong param_2,CBaseEntity *param_3,Vector *param_4)
{
int iVar1;
undefined1 *puVar2;
int in_GS_OFFSET;
float local_470;
float local_46c;
float local_468;
float local_464;
float local_460;
float local_45c;
undefined4 local_458;
undefined4 local_454;
undefined4 local_450;
undefined4 local_44c;
undefined1 local_448;
undefined1 local_447;
float local_444;
float local_440;
float local_43c;
undefined1 local_438;
undefined4 local_434;
undefined4 local_430;
undefined4 local_42c;
undefined1 local_428;
undefined4 local_424;
char local_420 [512];
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CCollisionProperty::CollisionAABBToWorldAABB
((CCollisionProperty *)(param_3 + 0x194),(Vector *)(param_3 + 0x19c),
(Vector *)(param_3 + 0x1a8),(Vector *)&local_470,(Vector *)&local_464);
(**(code **)(*(int *)param_1 + 0x30))(param_1,(Vector *)&local_470,(Vector *)&local_464,param_4);
local_420[0] = '\0';
if ((param_2 & 0x10) == 0) {
if ((param_2 & 8) == 0) goto LAB_0081fc70;
LAB_0081fd0c:
puVar2 = &DAT_00d539c2;
if (*(undefined1 **)(param_3 + 0x7c) != (undefined1 *)0x0) {
puVar2 = *(undefined1 **)(param_3 + 0x7c);
}
V_snprintf(local_220,0x200,"class: %s",puVar2);
V_strncat(local_420,local_220,0x200,-1);
}
else {
if (*(int *)(param_3 + 0x30) == 0) {
iVar1 = 0;
}
else {
iVar1 = *(int *)(param_3 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
V_snprintf(local_220,0x200,"edict: %d",iVar1);
V_strncat(local_420,local_220,0x200,-1);
if ((param_2 & 8) != 0) {
if (local_420[0] != '\0') {
V_strncat(local_420,", ",0x200,-1);
}
goto LAB_0081fd0c;
}
}
if (local_420[0] != '\0') {
local_458 = 0x3f800000;
local_448 = 1;
local_447 = 1;
local_438 = 1;
local_428 = 1;
local_454 = 0x3f800000;
local_450 = 0x3f800000;
local_44c = 0x3f800000;
local_440 = (local_460 + local_46c) * 0.5;
local_43c = (local_45c + local_468) * 0.5;
local_434 = 0;
local_444 = (local_464 + local_470) * 0.5;
local_430 = 0;
local_42c = 0;
local_424 = 0x40000000;
(**(code **)(*(int *)param_1 + 0x34))(param_1,local_420,&local_458);
}
LAB_0081fc70:
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.