L L4D2node

CTerrorPlayer::WantsLagCompensationOnEntity

0x009d94f0 · 230 bytes · __thiscall

_ZNK13CTerrorPlayer28WantsLagCompensationOnEntityEPK11CBaseEntityPK8CUserCmdPK7CBitVecILi2048EE

Decompiled

undefined (4 params)

/* CTerrorPlayer::WantsLagCompensationOnEntity(CBaseEntity const*, CUserCmd const*, CBitVec<2048>
   const*) const */

undefined4 __thiscall
CTerrorPlayer::WantsLagCompensationOnEntity
          (CTerrorPlayer *this,CBaseEntity *param_1,CUserCmd *param_2,CBitVec *param_3)

{
  uint uVar1;
  char cVar2;
  undefined *puVar3;
  undefined4 uVar4;
  
  if ((((*(uint *)(param_2 + 0x24) & 1) == 0) && ((*(uint *)(param_2 + 0x24) & 0x800) == 0)) &&
     (5 < *(int *)(param_2 + 4) - *(int *)(this + 0x298c))) {
    return 0;
  }
  if ((param_1 != (CBaseEntity *)0x0) &&
     (cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar2 != '\0')) {
    uVar1 = *(uint *)(param_1 + 0x3edc);
    if (((uVar1 != 0xffffffff) &&
        ((puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc &&
         (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)))) && (*(int *)(puVar3 + 4) != 0)) {
      return 0;
    }
    uVar1 = *(uint *)(param_1 + 0x2a4c);
    if ((((uVar1 != 0xffffffff) &&
         (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar3 + 4) != 0)) {
      return 0;
    }
  }
  uVar4 = CBasePlayer::WantsLagCompensationOnEntity((CBasePlayer *)this,param_1,param_2,param_3);
  return uVar4;
}

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)