L L4D2node

PlayerReporter::CreateAwardTemplatesForPlayer

0x008fe9d0 · 193 bytes · __thiscall

_ZN14PlayerReporter29CreateAwardTemplatesForPlayerEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* PlayerReporter::CreateAwardTemplatesForPlayer(CTerrorPlayer*) */

void __thiscall
PlayerReporter::CreateAwardTemplatesForPlayer(PlayerReporter *this,CTerrorPlayer *param_1)

{
  char cVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
  if ((iVar2 != 3) || (cVar1 = CTerrorGameRules::HasPlayerControlledZombies(), cVar1 != '\0')) {
    iVar2 = CreateOrFindCurrentReport(this,param_1);
    iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
    if ((iVar3 != *(int *)(iVar2 + 0x380)) ||
       (iVar3 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30)),
       *(int *)(**(int **)(iVar2 + 0x364) + 0xc) != iVar3)) {
      iVar3 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
      cVar1 = CAwardPool::CreateTemplatesForPlayer
                        (TheAwardPool,iVar3,(CUtlLinkedList *)(iVar2 + 0x364));
      if (cVar1 != '\0') {
        uVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
        *(undefined4 *)(iVar2 + 0x380) = uVar4;
        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)