L L4D2node

CPhysicsNPCSolver::Spawn

0x00793ce0 · 133 bytes · __thiscall

_ZN17CPhysicsNPCSolver5SpawnEv

Decompiled

undefined (1 param)

/* CPhysicsNPCSolver::Spawn() */

void __thiscall CPhysicsNPCSolver::Spawn(CPhysicsNPCSolver *this)

{
  uint uVar1;
  int iVar2;
  undefined *puVar3;
  
  if (this[0x45c] == (CPhysicsNPCSolver)0x0) {
    uVar1 = *(uint *)(this + 0x44c);
    iVar2 = 0;
    if (((uVar1 != 0xffffffff) &&
        (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
      iVar2 = *(int *)(puVar3 + 4);
    }
    if (*(float *)(iVar2 + 0x254) <= 3.4028235e+38 && *(float *)(iVar2 + 0x254) != 3.4028235e+38) {
      *(undefined4 *)(iVar2 + 0x254) = 0x7f7fffff;
    }
    ResetCancelTime(this);
    return;
  }
  BecomePenetrationSolver(this);
  ResetCancelTime(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)