L L4D2node

set_file_type

0x000eb6b0 · 105 bytes · __cdecl

_Z13set_file_typeR6TState

Decompiled

undefined (1 param)

/* set_file_type(TState&) */

void set_file_type(TState *param_1)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  
  uVar2 = 0;
  iVar1 = 0;
  do {
    iVar1 = iVar1 + 1;
    uVar2 = uVar2 + *(ushort *)(param_1 + iVar1 * 4 + 0x10);
  } while (iVar1 != 7);
  uVar3 = 0;
  iVar1 = 7;
  do {
    iVar1 = iVar1 + 1;
    uVar3 = uVar3 + *(ushort *)(param_1 + iVar1 * 4 + 0x10);
  } while (iVar1 != 0x80);
  iVar1 = 0x80;
  do {
    iVar1 = iVar1 + 1;
    uVar2 = uVar2 + *(ushort *)(param_1 + iVar1 * 4 + 0x10);
  } while (iVar1 != 0x100);
  **(ushort **)(param_1 + 0x1af50) = (ushort)(uVar2 <= uVar3 >> 2);
  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)