L L4D2node

NPCPhysics_SolverExists

0x00793930 · 162 bytes · __cdecl

_Z23NPCPhysics_SolverExistsP11CAI_BaseNPCP11CBaseEntity

Decompiled

undefined (2 params)

/* NPCPhysics_SolverExists(CAI_BaseNPC*, CBaseEntity*) */

undefined4 NPCPhysics_SolverExists(CAI_BaseNPC *param_1,CBaseEntity *param_2)

{
  int *piVar1;
  uint uVar2;
  int iVar3;
  undefined *puVar4;
  CAI_BaseNPC *pCVar5;
  
  iVar3 = CEntityClassList<CPhysicsNPCSolver>::m_pClassList;
  if (CEntityClassList<CPhysicsNPCSolver>::m_pClassList == 0) {
    return 0;
  }
  do {
    uVar2 = *(uint *)(iVar3 + 0x44c);
    if (((uVar2 == 0xffffffff) ||
        (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar4 + 8) != uVar2 >> 0xc)) {
      if (param_2 == (CBaseEntity *)0x0) goto LAB_00793990;
    }
    else if (param_2 == *(CBaseEntity **)(puVar4 + 4)) {
LAB_00793990:
      uVar2 = *(uint *)(iVar3 + 0x448);
      pCVar5 = (CAI_BaseNPC *)0x0;
      if (((uVar2 != 0xffffffff) &&
          (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) {
        pCVar5 = *(CAI_BaseNPC **)(puVar4 + 4);
      }
      if (param_1 == pCVar5) {
        return 1;
      }
    }
    piVar1 = (int *)(iVar3 + 0x444);
    iVar3 = *piVar1;
    if (*piVar1 == 0) {
      return 0;
    }
  } 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)