z_spawn_const_ang
0x00a582e0 · 255 bytes · __cdecl
_ZL17z_spawn_const_angRK8CCommand
Decompiled
undefined (1 param)
/* z_spawn_const_ang(CCommand const&) */
void z_spawn_const_ang(CCommand *param_1)
{
char cVar1;
CBasePlayer *pCVar2;
char *pcVar3;
double dVar4;
pCVar2 = (CBasePlayer *)UTIL_GetCommandClient();
if (pCVar2 != (CBasePlayer *)0x0) {
cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2);
if (cVar1 != '\0') {
if (*(int *)param_1 < 2) {
ClientPrint(pCVar2,2,"Constant z_spawn angle disabled.\n",(char *)0x0,(char *)0x0,
(char *)0x0,(char *)0x0);
g_bSpawnAtConstAng = 0;
}
else {
g_bSpawnAtConstAng = 1;
dVar4 = strtod(*(char **)(param_1 + 0x40c),(char **)0x0);
g_flConstSpawnAng = (float)dVar4;
pcVar3 = (char *)UTIL_VarArgs("Constant z_spawn angle set to %f.\n",
(double)g_flConstSpawnAng);
ClientPrint(pCVar2,2,pcVar3,(char *)0x0,(char *)0x0,(char *)0x0,(char *)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.