L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)