L L4D2node

DescribeSubject

0x0093b330 · 253 bytes · __cdecl

_Z15DescribeSubjectP11CBaseEntity

Decompiled

undefined (1 param)

/* DescribeSubject(CBaseEntity*) */

char * DescribeSubject(CBaseEntity *param_1)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  int *piVar4;
  CBaseEntity *pCVar5;
  
  if (param_1 != (CBaseEntity *)0x0) {
    iVar2 = CBaseEntity::GetTeamNumber(param_1);
    if (iVar2 == 3) {
      cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
      if (cVar1 != '\0') {
        cVar1 = (**(code **)(*(int *)param_1 + 0x16c))();
        pCVar5 = (CBaseEntity *)0x0;
        if (cVar1 != '\0') {
          pCVar5 = param_1;
        }
        (**(code **)(*(int *)pCVar5 + 0x544))(pCVar5);
LAB_0093b3bc:
        pcVar3 = (char *)ZombieClassName();
        return pcVar3;
      }
      iVar2 = (**(code **)(*(int *)param_1 + 0x14c))(param_1);
      if (iVar2 != 0) {
        piVar4 = (int *)(**(code **)(*(int *)param_1 + 0x14c))(param_1);
        (**(code **)(*piVar4 + 0x544))(piVar4);
        goto LAB_0093b3bc;
      }
    }
    else {
      iVar2 = CBaseEntity::GetTeamNumber(param_1);
      cVar1 = IsASurvivorTeam(iVar2);
      if ((cVar1 != '\0') &&
         (cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar1 != '\0')) {
        (**(code **)(*(int *)param_1 + 0x16c))(param_1);
        pcVar3 = (char *)SurvivorCharacterName();
        return pcVar3;
      }
    }
    if ((*(char **)(param_1 + 0x7c) == "pipe_bomb_projectile") ||
       (cVar1 = CBaseEntity::ClassMatchesComplex(param_1,"pipe_bomb_projectile"), cVar1 != '\0')) {
      return "PIPE_BOMB";
    }
  }
  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)