L L4D2node

Charger::IsChargeBlocked

0x00a7b940 · 392 bytes · __thiscall

_ZN7Charger15IsChargeBlockedERK6VectorS2_

Decompiled

undefined (3 params)

/* Charger::IsChargeBlocked(Vector const&, Vector const&) */

undefined4 __thiscall Charger::IsChargeBlocked(Charger *this,Vector *param_1,Vector *param_2)

{
  uint uVar1;
  int iVar2;
  undefined4 uVar3;
  undefined *puVar4;
  int iVar5;
  Vector local_90 [12];
  Vector local_84 [12];
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  float local_6c;
  float local_68;
  float local_64;
  float local_5c;
  float local_58;
  float local_54;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_2c;
  undefined1 local_28;
  undefined1 local_27;
  
  local_2c = 0;
  local_28 = 1;
  local_6c = *(float *)param_1;
  local_68 = *(float *)(param_1 + 4);
  local_5c = *(float *)param_2 - local_6c;
  local_64 = *(float *)(param_1 + 8);
  local_58 = *(float *)(param_2 + 4) - local_68;
  local_54 = *(float *)(param_2 + 8) - local_64;
  local_34 = 0;
  local_38 = 0;
  local_3c = 0;
  local_27 = local_5c * local_5c + local_58 * local_58 + local_54 * local_54 != 0.0;
  local_44 = 0;
  local_48 = 0;
  local_4c = 0;
  iVar5 = 0;
  if (0 < *(int *)(this + 0x4334)) {
    do {
      uVar1 = *(uint *)(*(int *)(this + 0x4328) + iVar5 * 4);
      if ((((uVar1 != 0xffffffff) &&
           (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (iVar2 = *(int *)(puVar4 + 4), iVar2 != 0)) {
        CCollisionProperty::CollisionAABBToWorldAABB
                  ((CCollisionProperty *)(iVar2 + 0x194),(Vector *)(iVar2 + 0x19c),
                   (Vector *)(iVar2 + 0x1a8),local_90,local_84);
        local_78 = 0;
        local_74 = 0;
        local_70 = 0;
        uVar3 = IsRayIntersectingOBB
                          ((Ray_t *)&local_6c,(Vector *)&vec3_origin,(QAngle *)&local_78,local_90,
                           local_84);
        if ((char)uVar3 != '\0') {
          return uVar3;
        }
      }
      iVar5 = iVar5 + 1;
    } while (iVar5 < *(int *)(this + 0x4334));
  }
  return 0;
}

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)