L L4D2node

variant_t::SetOther

0x0063de60 · 174 bytes · __thiscall

_ZN9variant_t8SetOtherEPv

Decompiled

undefined (2 params)

/* variant_t::SetOther(void*) */

void __thiscall variant_t::SetOther(variant_t *this,void *param_1)

{
  uint uVar1;
  undefined *puVar2;
  
  switch(*(undefined4 *)(this + 0x10)) {
  case 1:
    *(undefined4 *)param_1 = *(undefined4 *)this;
    break;
  case 2:
  case 5:
  case 9:
    *(undefined4 *)param_1 = *(undefined4 *)this;
    return;
  case 3:
  case 0xf:
    *(undefined4 *)param_1 = *(undefined4 *)this;
    *(undefined4 *)((int)param_1 + 4) = *(undefined4 *)(this + 4);
    *(undefined4 *)((int)param_1 + 8) = *(undefined4 *)(this + 8);
    break;
  case 6:
    *(variant_t *)param_1 = *this;
    break;
  case 7:
    *(short *)param_1 = (short)*(undefined4 *)this;
    break;
  case 8:
    *(char *)param_1 = (char)*(undefined4 *)this;
    break;
  case 0xc:
    uVar1 = *(uint *)(this + 0xc);
    if (((uVar1 == 0xffffffff) ||
        (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar2 + 8) != uVar1 >> 0xc)) {
      *(undefined4 *)param_1 = 0;
    }
    else {
      *(undefined4 *)param_1 = *(undefined4 *)(puVar2 + 4);
    }
    break;
  case 0xd:
    *(undefined4 *)param_1 = *(undefined4 *)(this + 0xc);
  }
  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)