L L4D2node

MessageWriteEHandle

0x006ca950 · 94 bytes · __cdecl

_Z19MessageWriteEHandleP11CBaseEntity

Decompiled

undefined (1 param)

/* MessageWriteEHandle(CBaseEntity*) */

void MessageWriteEHandle(CBaseEntity *param_1)

{
  uint *puVar1;
  uint uVar2;
  
  if (g_pMsgBuffer == (bf_write *)0x0) {
    Error("WriteEHandle called with no active message\n");
  }
  if (param_1 == (CBaseEntity *)0x0) {
    uVar2 = 0x1fffff;
  }
  else {
    puVar1 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
    uVar2 = *puVar1 >> 1 & 0x1ff800 | *puVar1 & 0xfff;
  }
  bf_write::WriteLong(g_pMsgBuffer,uVar2);
  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)