L L4D2node

CPhysicsNPCSolver::Think

0x007946f0 · 154 bytes · __thiscall

_ZN17CPhysicsNPCSolver5ThinkEv

Decompiled

undefined (1 param)

/* CPhysicsNPCSolver::Think() */

void __thiscall CPhysicsNPCSolver::Think(CPhysicsNPCSolver *this)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  int iVar4;
  undefined *puVar5;
  
  if (this[0x45c] == (CPhysicsNPCSolver)0x0) {
    cVar3 = CheckTouching(this);
  }
  else {
    cVar3 = IsIntersecting(this);
  }
  if (cVar3 == '\x01') {
    if (this[0x45c] != (CPhysicsNPCSolver)0x0) {
      uVar1 = *(uint *)(this + 0x44c);
      iVar4 = 0;
      if (((uVar1 != 0xffffffff) &&
          (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
        iVar4 = *(int *)(puVar5 + 4);
      }
      piVar2 = *(int **)(iVar4 + 0x238);
      if (piVar2 == (int *)0x0) goto LAB_0079477c;
      (**(code **)(*piVar2 + 100))(piVar2);
    }
    ResetCancelTime(this);
    return;
  }
LAB_0079477c:
  UTIL_Remove((CBaseEntity *)this);
  return;
}

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)