L L4D2node

CPointHurt::HurtThink

0x007d8ed0 · 675 bytes · __thiscall

_ZN10CPointHurt9HurtThinkEv

Decompiled

undefined (1 param)

/* CPointHurt::HurtThink() */

void __thiscall CPointHurt::HurtThink(CPointHurt *this)

{
  CBaseEntity CVar1;
  uint uVar2;
  float fVar3;
  char *pcVar4;
  CBaseEntity *pCVar5;
  undefined *puVar6;
  CBaseEntity *this_00;
  float local_88;
  float local_84;
  float local_80;
  CTakeDamageInfo local_7c [108];
  
  if (*(int *)(this + 0x450) == 0) {
    fVar3 = *(float *)(this + 0x448);
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    CTakeDamageInfo::CTakeDamageInfo
              (local_7c,(CBaseEntity *)this,(CBaseEntity *)this,(float)*(int *)(this + 0x440),
               *(int *)(this + 0x444),0);
    RadiusDamage(local_7c,(Vector *)(this + 0x2e0),fVar3,0,(CBaseEntity *)0x0);
  }
  else {
    uVar2 = *(uint *)(this + 0x454);
    pCVar5 = (CBaseEntity *)0x0;
    if (((uVar2 != 0xffffffff) &&
        (puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
      pCVar5 = *(CBaseEntity **)(puVar6 + 4);
    }
    this_00 = (CBaseEntity *)0x0;
    CTakeDamageInfo::CTakeDamageInfo
              (local_7c,(CBaseEntity *)this,pCVar5,(float)*(int *)(this + 0x440),
               *(int *)(this + 0x444),0);
    while( true ) {
      uVar2 = *(uint *)(this + 0x454);
      pCVar5 = (CBaseEntity *)0x0;
      if (((uVar2 != 0xffffffff) &&
          (puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
        pCVar5 = *(CBaseEntity **)(puVar6 + 4);
      }
      pcVar4 = *(char **)(this + 0x450);
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "";
      }
      this_00 = (CBaseEntity *)
                CGlobalEntityList::FindEntityByName
                          ((CGlobalEntityList *)gEntList,this_00,pcVar4,(CBaseEntity *)0x0,pCVar5,
                           (CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
      if (this_00 == (CBaseEntity *)0x0) break;
      if (((byte)this_00[0x14d] & 8) == 0) {
        if (((byte)this[0x14d] & 8) != 0) goto LAB_007d9097;
LAB_007d8f73:
        CVar1 = this_00[0x14d];
      }
      else {
        CBaseEntity::CalcAbsolutePosition(this_00);
        if (((byte)this[0x14d] & 8) == 0) goto LAB_007d8f73;
LAB_007d9097:
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        CVar1 = this_00[0x14d];
      }
      if (((byte)CVar1 & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this_00);
      }
      local_88 = *(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0);
      local_84 = *(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4);
      local_80 = *(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8);
      GuessDamageForce(local_7c,(Vector *)&local_88,(Vector *)(this_00 + 0x2e0),1.0);
      CBaseEntity::TakeDamage(this_00,local_7c);
    }
  }
  CBaseEntity::SetNextThink
            ((CBaseEntity *)this,*(float *)(this + 0x44c) + *(float *)(gpGlobals + 0xc),(char *)0x0)
  ;
  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)