L L4D2node

foundry_update_entity

0x006aa730 · 235 bytes · __cdecl

_ZL21foundry_update_entityRK8CCommand

Decompiled

undefined (1 param)

/* foundry_update_entity(CCommand const&) */

void foundry_update_entity(CCommand *param_1)

{
  CBaseEntity *this;
  code *pcVar1;
  int iVar2;
  int local_30 [8];
  
  iVar2 = CheckInFoundryMode();
  if (iVar2 != 0) {
    local_30[0] = 0;
    local_30[1] = 0;
    local_30[2] = 0;
    local_30[3] = 0;
    local_30[4] = 0;
                    /* try { // try from 006aa776 to 006aa7f2 has its CatchHandler @ 006aa82b */
    GetCrosshairOrNamedEntities(param_1,(CUtlVector *)local_30);
    iVar2 = 0;
    if (0 < local_30[3]) {
      do {
        this = *(CBaseEntity **)(local_30[0] + iVar2 * 4);
        pcVar1 = *(code **)(*serverfoundry + 0x10);
        if ((((byte)this[0x14d] & 8) != 0) &&
           (CBaseEntity::CalcAbsolutePosition(this), ((byte)this[0x14d] & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition(this);
        }
        (*pcVar1)(serverfoundry,*(undefined4 *)(this + 0x88),this + 0x2e0,this + 0x37c);
        iVar2 = iVar2 + 1;
      } while (iVar2 < local_30[3]);
    }
    local_30[3] = 0;
    CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)local_30);
    local_30[4] = local_30[0];
    CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)local_30);
  }
  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)