L L4D2node

CFindEntityCache::RotateToFront

0x009f4830 · 68 bytes · __thiscall

_ZN16CFindEntityCache13RotateToFrontEi

Decompiled

undefined (2 params)

/* CFindEntityCache::RotateToFront(int) */

void __thiscall CFindEntityCache::RotateToFront(CFindEntityCache *this,int param_1)

{
  undefined2 uVar1;
  undefined4 uVar2;
  int iVar3;
  CFindEntityCache *pCVar4;
  
  if (0 < param_1) {
    uVar2 = *(undefined4 *)(this + param_1 * 4);
    uVar1 = *(undefined2 *)(this + param_1 * 2 + 0x20);
    iVar3 = param_1 + -1;
    pCVar4 = this + iVar3 * 4;
    while( true ) {
      *(undefined4 *)(pCVar4 + 4) = *(undefined4 *)pCVar4;
      *(undefined2 *)(this + iVar3 * 2 + 0x22) = *(undefined2 *)(this + iVar3 * 2 + 0x20);
      if (iVar3 == 0) break;
      iVar3 = iVar3 + -1;
      pCVar4 = pCVar4 + -4;
    }
    *(undefined4 *)this = uVar2;
    *(undefined2 *)(this + 0x20) = uVar1;
  }
  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)