CEnvBeam::Precache
0x00681ad0 · 254 bytes · __thiscall
_ZN8CEnvBeam8PrecacheEv
Decompiled
undefined (1 param)
/* CEnvBeam::Precache() */
void __thiscall CEnvBeam::Precache(CEnvBeam *this)
{
char *pcVar1;
int iVar2;
undefined4 uVar3;
int in_GS_OFFSET;
char *pcVar4;
undefined4 local_230 [4];
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pcVar1 = *(char **)(this + 0x508);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar2 = V_stristr(pcVar1,".vmt");
if (iVar2 == 0) {
pcVar1 = "";
if (*(char **)(this + 0x508) != (char *)0x0) {
pcVar1 = *(char **)(this + 0x508);
}
V_strncpy(local_220,pcVar1,0x200);
V_SetExtension(local_220,".vmt",0x200);
AllocPooledString((char *)local_230);
*(undefined4 *)(this + 0x508) = local_230[0];
}
pcVar4 = "prop_physics";
AllocPooledString((char *)local_230);
g_iszPhysicsPropClassname = local_230[0];
pcVar1 = "";
if (*(char **)(this + 0x508) != (char *)0x0) {
pcVar1 = *(char **)(this + 0x508);
}
uVar3 = CBaseEntity::PrecacheModel(pcVar1);
*(undefined4 *)(this + 0x4e8) = uVar3;
CBeam::Precache((CBeam *)this);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(this,pcVar4);
}
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.