L L4D2node

CBaseClientState::CopyEntityBaseline

0x001027d0 · 216 bytes · __thiscall

_ZN16CBaseClientState18CopyEntityBaselineEii

Decompiled

undefined (3 params)

/* CBaseClientState::CopyEntityBaseline(int, int) */

void __thiscall CBaseClientState::CopyEntityBaseline(CBaseClientState *this,int param_1,int param_2)

{
  undefined4 *puVar1;
  PackedEntity *this_00;
  CBaseClientState *pCVar2;
  CBaseClientState *pCVar3;
  
  pCVar2 = this + param_2 * 0x2000 + 0x1c4;
  do {
    while( true ) {
      this_00 = *(PackedEntity **)pCVar2;
      puVar1 = *(undefined4 **)(pCVar2 + param_1 * 0x2000 + param_2 * -0x2000);
      if (puVar1 == (undefined4 *)0x0) break;
      if (this_00 == (PackedEntity *)0x0) {
        this_00 = operator_new(0x34);
                    /* try { // try from 00102891 to 00102895 has its CatchHandler @ 001028b2 */
        PackedEntity::PackedEntity(this_00);
        *(PackedEntity **)pCVar2 = this_00;
        *(undefined4 *)(this_00 + 4) = 0;
        *(undefined4 *)this_00 = 0;
        LOCK();
        *(undefined4 *)(this_00 + 0xc) = 0;
        UNLOCK();
      }
      *(undefined4 *)(this_00 + 8) = puVar1[2];
      *(undefined4 *)(this_00 + 4) = puVar1[1];
      *(undefined4 *)this_00 = *puVar1;
      PackedEntity::AllocAndCopyPadded(this_00,(void *)puVar1[9],puVar1[10] + 7 >> 3);
LAB_00102830:
      pCVar2 = pCVar2 + 4;
      if (pCVar2 == this + param_2 * 0x2000 + 0x21c4) {
        return;
      }
    }
    if (this_00 == (PackedEntity *)0x0) goto LAB_00102830;
    pCVar3 = pCVar2 + 4;
    PackedEntity::~PackedEntity(this_00);
    operator_delete(this_00);
    *(undefined4 *)pCVar2 = 0;
    pCVar2 = pCVar3;
    if (pCVar3 == this + param_2 * 0x2000 + 0x21c4) {
      return;
    }
  } while( true );
}

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)