CC_AI_LOS_Debug
0x00600460 · 120 bytes · __cdecl
_Z15CC_AI_LOS_DebugP7IConVarPKcf
Decompiled
undefined (3 params)
/* CC_AI_LOS_Debug(IConVar*, char const*, float) */
void CC_AI_LOS_Debug(IConVar *param_1,char *param_2,float param_3)
{
int iVar1;
CBaseEntity *pCVar2;
iVar1 = *(int *)(ai_debug_los._28_4_ + 0x30);
pCVar2 = (CBaseEntity *)
CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0);
do {
if (pCVar2 == (CBaseEntity *)0x0) {
return;
}
if (iVar1 == 1) {
if ((pCVar2[0x1b6] != (CBaseEntity)0x0) && ((*(ushort *)(pCVar2 + 0x1b4) & 4) == 0))
goto LAB_006004cd;
LAB_00600495:
*(uint *)(pCVar2 + 0x110) = *(uint *)(pCVar2 + 0x110) & 0xffffff7f;
}
else {
if (iVar1 != 2) goto LAB_00600495;
LAB_006004cd:
*(uint *)(pCVar2 + 0x110) = *(uint *)(pCVar2 + 0x110) | 0x80;
}
pCVar2 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar2);
} while( true );
}
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.