L L4D2node

CPhysicsNPCSolver::IsIntersecting

0x00793d80 · 794 bytes · __thiscall

_ZN17CPhysicsNPCSolver14IsIntersectingEv

Decompiled

undefined (1 param)

/* CPhysicsNPCSolver::IsIntersecting() */

bool __thiscall CPhysicsNPCSolver::IsIntersecting(CPhysicsNPCSolver *this)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  uint uVar7;
  int iVar8;
  code *pcVar9;
  bool bVar10;
  float *pfVar11;
  undefined4 uVar12;
  CBaseEntity *this_00;
  undefined *puVar13;
  float local_cc;
  float local_c8;
  float local_c4;
  undefined4 local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  float local_ac;
  float local_a8;
  float local_a4;
  float local_9c;
  float local_98;
  float local_94;
  undefined4 local_8c;
  undefined1 local_88;
  undefined1 local_87;
  undefined1 local_70 [55];
  undefined1 local_39;
  
  this_00 = (CBaseEntity *)0x0;
  uVar7 = *(uint *)(this + 0x448);
  if (((uVar7 != 0xffffffff) &&
      (puVar13 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar13 + 8) == uVar7 >> 0xc)) {
    this_00 = *(CBaseEntity **)(puVar13 + 4);
  }
  uVar7 = *(uint *)(this + 0x44c);
  bVar10 = false;
  if (((uVar7 != 0xffffffff) &&
      (puVar13 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar13 + 8) == uVar7 >> 0xc)) {
    iVar8 = *(int *)(puVar13 + 4);
    bVar10 = iVar8 != 0 && this_00 != (CBaseEntity *)0x0;
    if (iVar8 != 0 && this_00 != (CBaseEntity *)0x0) {
      pfVar11 = (float *)(**(code **)(*(int *)(this_00 + 0x194) + 4))(this_00 + 0x194);
      fVar1 = *pfVar11;
      fVar2 = pfVar11[1];
      fVar3 = pfVar11[2];
      pfVar11 = (float *)(**(code **)(*(int *)(this_00 + 0x194) + 8))(this_00 + 0x194);
      fVar4 = *pfVar11;
      fVar5 = pfVar11[1];
      fVar6 = pfVar11[2];
      if (((byte)this_00[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this_00);
        if (((byte)this_00[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition(this_00);
        }
      }
      local_87 = 0;
      local_bc = 0;
      local_b8 = 0;
      local_b4 = 0;
      local_8c = 0;
      local_98 = ((fVar5 + 1.0) - (fVar2 - 1.0)) * 0.5;
      local_94 = ((fVar6 + 1.0) - (fVar3 - 1.0)) * 0.5;
      local_a8 = ((fVar2 - 1.0) + fVar5 + 1.0) * 0.5;
      local_9c = ((fVar4 + 1.0) - (fVar1 - 1.0)) * 0.5;
      local_ac = ((fVar1 - 1.0) + fVar4 + 1.0) * 0.5;
      local_c8 = *(float *)(this_00 + 0x2e4) + local_a8;
      local_cc = *(float *)(this_00 + 0x2e0) + local_ac;
      local_88 = local_94 * local_94 + local_98 * local_98 + local_9c * local_9c < 1e-06;
      local_a4 = ((fVar3 - 1.0) + fVar6 + 1.0) * 0.5;
      local_ac = -local_ac;
      local_a8 = -local_a8;
      local_c4 = *(float *)(this_00 + 0x2e8) + local_a4;
      local_a4 = -local_a4;
      pcVar9 = *(code **)(*enginetrace + 0xc);
      uVar12 = (**(code **)(*(int *)this_00 + 0x2c8))(this_00);
      (*pcVar9)(enginetrace,&local_cc,uVar12,iVar8,local_70);
      return (bool)local_39;
    }
  }
  return bVar10;
}

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)