L L4D2node

UTIL_PointAtNamedEntity

0x00b2e830 · 241 bytes · __cdecl

_Z23UTIL_PointAtNamedEntityP11CBaseEntity8string_t

Decompiled

undefined (2 params)

/* UTIL_PointAtNamedEntity(CBaseEntity*, string_t) */

void UTIL_PointAtNamedEntity(CBaseEntity *param_1,char *param_2)

{
  char cVar1;
  CBaseEntity *pCVar2;
  undefined4 uVar3;
  undefined1 *puVar4;
  
  if (param_2 == (char *)0x0) {
    param_2 = "";
    pCVar2 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByName
                       ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"",(CBaseEntity *)0x0,
                        (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
    cVar1 = UTIL_PointAtEntity(param_1,pCVar2);
  }
  else {
    pCVar2 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByName
                       ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,param_2,(CBaseEntity *)0x0,
                        (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
    cVar1 = UTIL_PointAtEntity(param_1,pCVar2);
  }
  if (cVar1 == '\0') {
    uVar3 = CBaseEntity::GetDebugName(param_1);
    puVar4 = &DAT_00d539c2;
    if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
      puVar4 = *(undefined1 **)(param_1 + 0x7c);
    }
    DevMsg(1,"%s (%s) was unable to point at an entity named: %s\n",puVar4,uVar3,param_2);
  }
  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)