L L4D2node

CBaseEntity::TeamID

0x00609710 · 71 bytes · __thiscall

_ZNK11CBaseEntity6TeamIDEv

Decompiled

undefined (1 param)

/* CBaseEntity::TeamID() const */

undefined1 * __thiscall CBaseEntity::TeamID(CBaseEntity *this)

{
  int iVar1;
  int *piVar2;
  undefined1 *puVar3;
  
  iVar1 = GetGlobalTeam(*(int *)(this + 0x24c));
  if (iVar1 != 0) {
    piVar2 = (int *)GetGlobalTeam(*(int *)(this + 0x24c));
                    /* WARNING: Could not recover jumptable at 0x0060974a. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    puVar3 = (undefined1 *)(**(code **)(*piVar2 + 0x32c))();
    return puVar3;
  }
  return &DAT_00d539c2;
}

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)