ScratchPad_DrawWorldToScratchPad
0x0081fea0 · 281 bytes · __cdecl
_Z32ScratchPad_DrawWorldToScratchPadP13IScratchPad3Dm
Decompiled
undefined (2 params)
/* ScratchPad_DrawWorldToScratchPad(IScratchPad3D*, unsigned long) */
void ScratchPad_DrawWorldToScratchPad(IScratchPad3D *param_1,ulong param_2)
{
CBaseEntity *pCVar1;
int iVar2;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
(**(code **)(*(int *)param_1 + 0x38))(param_1,0,0);
if ((param_2 & 1) != 0) {
(**(code **)(*engine + 0x140))(engine,param_1,0);
}
if ((param_2 & 6) != 0) {
pCVar1 = (CBaseEntity *)
CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0);
if (pCVar1 != (CBaseEntity *)0x0) {
do {
iVar2 = __dynamic_cast(pCVar1,&CBaseEntity::typeinfo,&CBasePlayer::typeinfo,0);
if (iVar2 == 0) {
if ((param_2 & 4) != 0) {
local_28 = 0x3e99999a;
local_24 = 0x3e99999a;
local_20 = 0x3f800000;
LAB_0081ff2c:
ScratchPad_DrawEntityToScratchPad(param_1,param_2,pCVar1,(Vector *)&local_28);
}
}
else if ((param_2 & 2) != 0) {
local_28 = 0x3f800000;
local_24 = 0x3f000000;
local_20 = 0;
goto LAB_0081ff2c;
}
pCVar1 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar1);
} while (pCVar1 != (CBaseEntity *)0x0);
}
}
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.