L L4D2node

CTerrorPlayer::GetTongueDestination

0x004f22b0 · 226 bytes · __thiscall

_ZNK13CTerrorPlayer20GetTongueDestinationEb

Decompiled

undefined (2 params)

/* CTerrorPlayer::GetTongueDestination(bool) const */

CTerrorPlayer * __thiscall CTerrorPlayer::GetTongueDestination(CTerrorPlayer *this,bool param_1)

{
  uint uVar1;
  int iVar2;
  undefined *puVar3;
  undefined3 in_stack_00000009;
  
  uVar1 = *(uint *)(_param_1 + 0x33c4);
  if (((((uVar1 != 0xffffffff) &&
        (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
      ((*(int *)(puVar3 + 4) != 0 &&
       (uVar1 = *(uint *)(*(int *)(puVar3 + 4) + 0x30bc), uVar1 != 0xffffffff)))) &&
     ((puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc &&
      ((*(uint *)(puVar3 + 8) == uVar1 >> 0xc && (*(int *)(puVar3 + 4) != 0)))))) {
    iVar2 = __dynamic_cast(*(int *)(puVar3 + 4),&CBaseAbility::typeinfo,&CTongue::typeinfo,0);
    if (iVar2 != 0) {
      CTongue::GetTonguePullDestination(SUB41(this,0));
      return this;
    }
  }
  *(undefined4 *)this = vec3_origin;
  *(undefined4 *)(this + 4) = DAT_01053d4c;
  *(undefined4 *)(this + 8) = DAT_01053d50;
  return this;
}

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)