L L4D2node

MessageWriteBool

0x006ca9c0 · 108 bytes · __cdecl

_Z16MessageWriteBoolb

Decompiled

undefined (1 param)

/* MessageWriteBool(bool) */

void MessageWriteBool(bool param_1)

{
  byte *pbVar1;
  int iVar2;
  int *piVar3;
  
  if (g_pMsgBuffer == (int *)0x0) {
    Error("WriteBool called with no active message\n");
  }
  piVar3 = g_pMsgBuffer;
  iVar2 = g_pMsgBuffer[3];
  if (iVar2 < g_pMsgBuffer[2]) {
    if ((char)g_pMsgBuffer[4] == '\0') {
      if (param_1) {
        pbVar1 = (byte *)(*g_pMsgBuffer + (iVar2 >> 3));
        *pbVar1 = *pbVar1 | (byte)(1 << ((byte)iVar2 & 7));
      }
      else {
        pbVar1 = (byte *)(*g_pMsgBuffer + (iVar2 >> 3));
        *pbVar1 = *pbVar1 & ~(byte)(1 << ((byte)iVar2 & 7));
      }
      piVar3[3] = piVar3[3] + 1;
    }
    return;
  }
  *(undefined1 *)(g_pMsgBuffer + 4) = 1;
  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)