L L4D2node

CTerrorPlayer::GetUsePriority

0x00519b10 · 302 bytes · __cdecl

_ZN13CTerrorPlayer14GetUsePriorityEP11CBaseEntity

Decompiled

undefined (1 param)

/* CTerrorPlayer::GetUsePriority(CBaseEntity*) */

undefined4 CTerrorPlayer::GetUsePriority(CBaseEntity *param_1)

{
  uint uVar1;
  char cVar2;
  int iVar3;
  undefined *puVar4;
  
  cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1);
  if ((((cVar2 != '\0') &&
       ((((uVar1 = *(uint *)(param_1 + 0x3e68), uVar1 == 0xffffffff ||
          (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)))) &&
      (((((uVar1 = *(uint *)(param_1 + 0x3e48), uVar1 == 0xffffffff ||
          (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) &&
       (((uVar1 = *(uint *)(param_1 + 0x33c4), uVar1 == 0xffffffff ||
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
        ((*(uint *)(puVar4 + 8) != uVar1 >> 0xc ||
         ((*(int *)(puVar4 + 4) == 0 || (param_1[0x39f1] != (CBaseEntity)0x0)))))))))) &&
     (cVar2 = (**(code **)(*(int *)param_1 + 0x7e8))(param_1), cVar2 != '\0')) {
    return 2;
  }
  cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1);
  if (cVar2 != '\0') {
    iVar3 = CBaseEntity::GetTeamNumber(param_1);
    cVar2 = IsASurvivorTeam(iVar3);
    if (cVar2 != '\0') {
      return 0;
    }
  }
  return 1;
}

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)