L L4D2node

CPhysExplosion::FindEntity

0x0079f0f0 · 330 bytes · __thiscall

_ZN14CPhysExplosion10FindEntityEP11CBaseEntityS1_S1_

Decompiled

undefined (4 params)

/* CPhysExplosion::FindEntity(CBaseEntity*, CBaseEntity*, CBaseEntity*) */

void __thiscall
CPhysExplosion::FindEntity
          (CPhysExplosion *this,CBaseEntity *param_1,CBaseEntity *param_2,CBaseEntity *param_3)

{
  int iVar1;
  char *pcVar2;
  float fVar3;
  
  if (*(char **)(this + 0x448) == (char *)0x0) {
    fVar3 = *(float *)(this + 0x444);
    if (fVar3 <= 0.0) {
      fVar3 = *(float *)(this + 0x440) * 2.5;
    }
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    CGlobalEntityList::FindEntityInSphere
              ((CGlobalEntityList *)gEntList,param_1,(Vector *)(this + 0x2e0),fVar3);
    return;
  }
  iVar1 = CGlobalEntityList::FindEntityByName
                    ((CGlobalEntityList *)gEntList,param_1,*(char **)(this + 0x448),
                     (CBaseEntity *)0x0,param_2,param_3,(IEntityFindFilter *)0x0);
  if (iVar1 != 0) {
    return;
  }
  fVar3 = *(float *)(this + 0x444);
  if (fVar3 <= 0.0) {
    fVar3 = *(float *)(this + 0x440) * 2.5;
  }
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  pcVar2 = "";
  if (*(char **)(this + 0x448) != (char *)0x0) {
    pcVar2 = *(char **)(this + 0x448);
  }
  CGlobalEntityList::FindEntityByClassnameWithin
            ((CGlobalEntityList *)gEntList,param_1,pcVar2,(Vector *)(this + 0x2e0),fVar3);
  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)