L L4D2node

CTongue::GetTonguePullDestination

0x004e29e0 · 319 bytes · __cdecl

_ZNK7CTongue24GetTonguePullDestinationEb

Decompiled

undefined (1 param)

/* CTongue::GetTonguePullDestination(bool) const */

float * CTongue::GetTonguePullDestination(bool param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  uint uVar6;
  CBaseEntity *this;
  float *pfVar7;
  undefined *puVar8;
  undefined3 in_stack_00000005;
  int in_stack_00000008;
  char in_stack_0000000c;
  
  uVar6 = *(uint *)(in_stack_00000008 + 0x44c);
  if ((((uVar6 == 0xffffffff) ||
       (puVar8 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar8 + 8) != uVar6 >> 0xc)) ||
     (this = *(CBaseEntity **)(puVar8 + 4), this == (CBaseEntity *)0x0)) {
    *_param_1 = vec3_origin;
    _param_1[1] = DAT_01053d4c;
    _param_1[2] = DAT_01053d50;
    return _param_1;
  }
  if (*(int *)(in_stack_00000008 + 0x534) == 0) {
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this);
    }
    *_param_1 = *(float *)(this + 0x2e0);
    _param_1[1] = *(float *)(this + 0x2e4);
    _param_1[2] = *(float *)(this + 0x2e8);
    return _param_1;
  }
  pfVar7 = (float *)(in_stack_00000008 + 0x4bc + (*(int *)(in_stack_00000008 + 0x534) * 3 + -3) * 4)
  ;
  fVar1 = *pfVar7;
  fVar2 = pfVar7[1];
  fVar3 = pfVar7[2];
  if (in_stack_0000000c != '\0') {
    *_param_1 = fVar1;
    _param_1[1] = fVar2;
    _param_1[2] = fVar3;
    return _param_1;
  }
  pfVar7 = (float *)(**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
  fVar4 = pfVar7[1];
  fVar5 = pfVar7[2];
  *_param_1 = fVar1 - *pfVar7;
  _param_1[1] = fVar2 - fVar4;
  _param_1[2] = fVar3 - fVar5;
  return _param_1;
}

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)