L L4D2node

CTerrorGun::ShouldUnzoom

0x005666e0 · 240 bytes · __thiscall

_ZNK10CTerrorGun12ShouldUnzoomEv

Decompiled

undefined (1 param)

/* CTerrorGun::ShouldUnzoom() const */

CTerrorGun __thiscall CTerrorGun::ShouldUnzoom(CTerrorGun *this)

{
  uint uVar1;
  char cVar2;
  CTerrorGun CVar3;
  CBaseEntity *this_00;
  int iVar4;
  undefined *puVar5;
  
  this_00 = (CBaseEntity *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
  CVar3 = (CTerrorGun)0x0;
  if (this_00 != (CBaseEntity *)0x0) {
    iVar4 = CBaseEntity::GetGroundEntity(this_00);
    if ((((iVar4 == 0) ||
         ((((uVar1 = *(uint *)(this_00 + 0x33c4), uVar1 != 0xffffffff &&
            (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)))) ||
        (((((uVar1 = *(uint *)(this_00 + 0x3e68), uVar1 != 0xffffffff &&
            (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) ||
         (((uVar1 = *(uint *)(this_00 + 0x3ee0), uVar1 != 0xffffffff &&
           (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc && (*(int *)(puVar5 + 4) != 0)))))))) ||
       (cVar2 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00), cVar2 != '\0')) {
      return (CTerrorGun)0x1;
    }
    CVar3 = this[0x1459];
  }
  return CVar3;
}

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)