L L4D2node

ServerDTI_AddEntityEncodeEvent

0x0014c0a0 · 66 bytes · __cdecl

_Z30ServerDTI_AddEntityEncodeEventP9SendTablef

Decompiled

undefined (2 params)

/* ServerDTI_AddEntityEncodeEvent(SendTable*, float) */

void ServerDTI_AddEntityEncodeEvent(SendTable *param_1,float param_2)

{
  short *psVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if ((*(int *)(param_1 + 0xc) != 0) &&
     (iVar2 = *(int *)(*(int *)(param_1 + 0xc) + 0x90), iVar2 != 0)) {
    iVar4 = 0;
    if (-1 < (int)(param_2 * 0.005)) {
      iVar4 = (int)(param_2 * 0.005);
    }
    iVar3 = 0x27;
    if (iVar4 < 0x28) {
      iVar3 = iVar4;
    }
    psVar1 = (short *)(iVar2 + 0x44 + iVar3 * 2);
    *psVar1 = *psVar1 + 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)