CEventAction::CEventAction
0x0063b7c0 · 578 bytes · __thiscall
_ZN12CEventActionC1EPKc
Decompiled
undefined (2 params)
/* CEventAction::CEventAction(char const*) */
void __thiscall CEventAction::CEventAction(CEventAction *this,char *param_1)
{
int iVar1;
char *pcVar2;
long lVar3;
long lVar4;
int in_GS_OFFSET;
double dVar5;
char cVar6;
undefined4 local_130 [4];
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = s_iNextIDStamp + 1;
s_iNextIDStamp = iVar1;
*(undefined4 *)(this + 0x18) = 0;
*(int *)(this + 0x14) = iVar1;
*(undefined4 *)(this + 0xc) = 0;
*(undefined4 *)this = 0;
*(undefined4 *)(this + 8) = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 0x10) = 0xffffffff;
if (param_1 != (char *)0x0) {
pcVar2 = strchr(param_1,0x1b);
cVar6 = (-(pcVar2 == (char *)0x0) & 0x11U) + 0x1b;
pcVar2 = (char *)nexttoken(local_120,0x100,param_1,cVar6);
if (local_120[0] != '\0') {
AllocPooledString((char *)local_130);
*(undefined4 *)this = local_130[0];
}
pcVar2 = (char *)nexttoken(local_120,0x100,pcVar2,cVar6);
AllocPooledString((char *)local_130);
*(undefined4 *)(this + 4) = local_130[0];
pcVar2 = (char *)nexttoken(local_120,0x100,pcVar2,cVar6);
if (local_120[0] != '\0') {
AllocPooledString((char *)local_130);
*(undefined4 *)(this + 8) = local_130[0];
}
pcVar2 = (char *)nexttoken(local_120,0x100,pcVar2,cVar6);
if (local_120[0] != '\0') {
dVar5 = strtod(local_120,(char **)0x0);
*(float *)(this + 0xc) = (float)dVar5;
}
nexttoken(local_120,0x100,pcVar2,cVar6);
if (local_120[0] != '\0') {
lVar3 = strtol(local_120,(char **)0x0,10);
lVar4 = -1;
if (lVar3 != 0) {
lVar4 = lVar3;
}
*(long *)(this + 0x10) = lVar4;
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.