ReadInterval
0x00468a70 · 254 bytes · __cdecl
_Z12ReadIntervalPKc
Decompiled
undefined (1 param)
/* ReadInterval(char const*) */
char * ReadInterval(char *param_1)
{
char *pcVar1;
int in_GS_OFFSET;
double dVar2;
double dVar3;
char *in_stack_00000008;
char local_90 [128];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
param_1[0] = '\0';
param_1[1] = '\0';
param_1[2] = '\0';
param_1[3] = '\0';
param_1[4] = '\0';
param_1[5] = '\0';
param_1[6] = '\0';
param_1[7] = '\0';
V_strncpy(local_90,in_stack_00000008,0x80);
pcVar1 = strtok(local_90,",");
if (pcVar1 != (char *)0x0) {
dVar2 = strtod(pcVar1,(char **)0x0);
*(float *)param_1 = (float)dVar2;
pcVar1 = strtok((char *)0x0,",");
if (pcVar1 != (char *)0x0) {
dVar3 = strtod(pcVar1,(char **)0x0);
*(float *)(param_1 + 4) = (float)(dVar3 - (double)(float)dVar2);
}
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return param_1;
}
/* 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.