Linefile_Read_f
0x001dafb0 · 364 bytes · unknown
_Z15Linefile_Read_fv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Linefile_Read_f() */
void Linefile_Read_f(void)
{
char cVar1;
int iVar2;
int iVar3;
int in_GS_OFFSET;
Vector local_168 [4];
undefined1 local_164 [4];
undefined1 local_160 [4];
CUtlBuffer local_15c [56];
char local_124 [260];
int local_20;
DAT_003b0c18 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&g_Points);
_DAT_003b0c1c = g_Points;
V_snprintf(local_124,0x104,"maps/%s.lin",&DAT_003b7f70);
CUtlBuffer::CUtlBuffer(local_15c,0,0,1);
/* try { // try from 001db069 to 001db118 has its CatchHandler @ 001db11e */
cVar1 = (**(code **)(*(int *)(g_pFileSystem + 4) + 0x38))
(g_pFileSystem + 4,local_124,0,local_15c,0,0,0);
if (cVar1 == '\0') {
ConMsg("couldn\'t open %s\n",local_124);
}
else {
ConMsg("Reading %s...\n",local_124);
iVar3 = 0;
while( true ) {
iVar2 = CUtlBuffer::Scanf(local_15c,"%f %f %f\n",local_168,local_164,local_160);
if (iVar2 != 3) break;
iVar3 = iVar3 + 1;
CUtlVector<Vector,CUtlMemory<Vector,int>>::InsertBefore
((CUtlVector<Vector,CUtlMemory<Vector,int>> *)&g_Points,DAT_003b0c18,local_168);
}
ConMsg("%i lines read\n",iVar3);
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_15c);
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.