L L4D2node

InitializeMemberSettings

0x00035630 · 206 bytes · __cdecl

_Z24InitializeMemberSettingsP9KeyValues

Decompiled

undefined (1 param)

/* InitializeMemberSettings(KeyValues*) */

void InitializeMemberSettings(KeyValues *param_1)

{
  uint uVar1;
  uint uVar2;
  byte bVar3;
  ulonglong uVar4;
  int *piVar5;
  uint *puVar6;
  KeyValues *this;
  uint uVar7;
  int iVar8;
  uint uVar9;
  uint uVar10;
  KeyValues *local_20 [4];
  
  piVar5 = (int *)(**(code **)(*g_pPlayerManager + 4))(g_pPlayerManager,0);
  if (piVar5 != (int *)0x0) {
    puVar6 = (uint *)(**(code **)(*piVar5 + 0x14))(piVar5,0);
    uVar7 = *puVar6;
    local_20[0] = (KeyValues *)0x0;
    uVar1 = puVar6[3];
    uVar2 = puVar6[2];
    uVar4 = (**(code **)*piVar5)(piVar5);
    this = (KeyValues *)SessionMembersFindPlayer(param_1,uVar4,local_20);
    if ((this != (KeyValues *)0x0) && (local_20[0] != (KeyValues *)0x0)) {
      if (uVar7 < 0xb) {
        iVar8 = 0;
      }
      else {
        uVar9 = 0x40;
        if (uVar7 < 0x40) {
          uVar9 = uVar7;
        }
        uVar7 = 0;
        iVar8 = 0;
        do {
          bVar3 = (byte)uVar7 & 0x1f;
          uVar10 = uVar2 >> bVar3 | uVar1 << 0x20 - bVar3;
          if ((uVar7 & 0x20) != 0) {
            uVar10 = uVar1 >> ((byte)uVar7 & 0x1f);
          }
          uVar7 = uVar7 + 1;
          iVar8 = iVar8 + (uVar10 & 1);
        } while ((int)uVar7 < (int)uVar9);
      }
      KeyValues::SetInt(this,"game/sk_versus",iVar8);
    }
  }
  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)