L L4D2node

CPhysicsNPCSolver::UpdateOnRemove

0x00793320 · 279 bytes · __thiscall

_ZN17CPhysicsNPCSolver14UpdateOnRemoveEv

Decompiled

undefined (1 param)

/* CPhysicsNPCSolver::UpdateOnRemove() */

void __thiscall CPhysicsNPCSolver::UpdateOnRemove(CPhysicsNPCSolver *this)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  undefined *puVar3;
  CBaseEntity *pCVar4;
  
  if (this[0x45c] != (CPhysicsNPCSolver)0x0) {
    pCVar4 = (CBaseEntity *)0x0;
    (**(code **)(*physenv + 0x7c))(physenv,*(undefined4 *)(this + 0x450));
    uVar1 = *(uint *)(this + 0x44c);
    *(undefined4 *)(this + 0x450) = 0;
    if (((uVar1 != 0xffffffff) &&
        (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
      pCVar4 = *(CBaseEntity **)(puVar3 + 4);
    }
    uVar1 = *(uint *)(this + 0x448);
    if (((uVar1 == 0xffffffff) ||
        (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) {
      pCVar2 = (CBaseEntity *)0x0;
    }
    else {
      pCVar2 = *(CBaseEntity **)(puVar3 + 4);
    }
    PhysEnableEntityCollisions(pCVar2,pCVar4);
    CBaseEntity::UpdateOnRemove((CBaseEntity *)this);
    return;
  }
  uVar1 = *(uint *)(this + 0x44c);
  if (((uVar1 != 0xffffffff) &&
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar3 + 8) == uVar1 >> 0xc && (*(int *)(puVar3 + 4) != 0)))) {
    *(undefined4 *)(*(int *)(puVar3 + 4) + 0x254) = 0;
    CBaseEntity::UpdateOnRemove((CBaseEntity *)this);
    return;
  }
  CBaseEntity::UpdateOnRemove((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)