L L4D2node

jockeyme

0x004f09a0 · 412 bytes · __cdecl

_ZL8jockeymeRK8CCommand

Decompiled

undefined (1 param)

/* jockeyme(CCommand const&) */

void jockeyme(CCommand *param_1)

{
  uint uVar1;
  uint uVar2;
  CBaseEdict *pCVar3;
  CBasePlayer *pCVar4;
  CBaseEntity *this;
  int iVar5;
  uint *puVar6;
  undefined *puVar7;
  int iVar8;
  
  pCVar4 = (CBasePlayer *)UTIL_GetCommandClient();
  this = (CBaseEntity *)FindPickerEntityClass(pCVar4,"player");
  if (this == (CBaseEntity *)0x0) {
    return;
  }
  iVar5 = CBaseEntity::GetTeamNumber(this);
  if (iVar5 == 2) {
    puVar6 = (uint *)(**(code **)(*(int *)this + 0xc))(this);
    uVar1 = *puVar6;
    if (((uVar1 == 0xffffffff) ||
        (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar7 + 4);
    }
    uVar2 = *(uint *)(pCVar4 + 0x3ee0);
    if (((uVar2 == 0xffffffff) ||
        (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) {
      iVar8 = 0;
    }
    else {
      iVar8 = *(int *)(puVar7 + 4);
    }
    if (iVar5 != iVar8) {
      if (pCVar4[0x6c] == (CBasePlayer)0x0) {
        pCVar3 = *(CBaseEdict **)(pCVar4 + 0x30);
        if (pCVar3 != (CBaseEdict *)0x0) {
          *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
          iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
          *(undefined2 *)(iVar5 + 2) = 0;
        }
      }
      else {
        pCVar4[0x70] = (CBasePlayer)((byte)pCVar4[0x70] | 1);
      }
      *(uint *)(pCVar4 + 0x3ee0) = uVar1;
    }
    puVar6 = (uint *)(**(code **)(*(int *)pCVar4 + 0xc))(pCVar4);
    uVar1 = *puVar6;
    if (((uVar1 == 0xffffffff) ||
        (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar7 + 4);
    }
    uVar2 = *(uint *)(this + 0x3edc);
    if (((uVar2 == 0xffffffff) ||
        (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) {
      iVar8 = 0;
    }
    else {
      iVar8 = *(int *)(puVar7 + 4);
    }
    if (iVar5 == iVar8) {
      return;
    }
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x3edc) = uVar1;
    return;
  }
  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)