L L4D2node

CSurvivorRescue::EyePosition

0x00968790 · 464 bytes · __cdecl

_ZN15CSurvivorRescue11EyePositionEv

Decompiled

undefined (0 params)

/* CSurvivorRescue::EyePosition() */

float * CSurvivorRescue::EyePosition(void)

{
  float fVar1;
  float fVar2;
  float *in_stack_00000004;
  CBaseEntity *in_stack_00000008;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  fVar2 = *(float *)(in_stack_00000008 + 0x1938);
  if ((((fVar2 <= -0.01) || (0.01 <= fVar2)) || (*(float *)(in_stack_00000008 + 0x193c) <= -0.01))
     || (((0.01 <= *(float *)(in_stack_00000008 + 0x193c) ||
          (*(float *)(in_stack_00000008 + 0x1940) <= -0.01)) ||
         (0.01 <= *(float *)(in_stack_00000008 + 0x1940))))) {
    if (((byte)in_stack_00000008[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(in_stack_00000008);
      fVar2 = *(float *)(in_stack_00000008 + 0x1938);
    }
    if (1.0 <= (*(float *)(in_stack_00000008 + 0x193c) - *(float *)(in_stack_00000008 + 0x2e4)) *
               (*(float *)(in_stack_00000008 + 0x193c) - *(float *)(in_stack_00000008 + 0x2e4)) +
               (*(float *)(in_stack_00000008 + 0x1940) - *(float *)(in_stack_00000008 + 0x2e8)) *
               (*(float *)(in_stack_00000008 + 0x1940) - *(float *)(in_stack_00000008 + 0x2e8)) +
               (fVar2 - *(float *)(in_stack_00000008 + 0x2e0)) *
               (fVar2 - *(float *)(in_stack_00000008 + 0x2e0))) {
      *in_stack_00000004 = *(float *)(in_stack_00000008 + 0x1938);
      in_stack_00000004[1] = *(float *)(in_stack_00000008 + 0x193c);
      in_stack_00000004[2] = *(float *)(in_stack_00000008 + 0x1940);
      return in_stack_00000004;
    }
  }
  if (((byte)in_stack_00000008[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(in_stack_00000008);
  }
  local_24 = *(undefined4 *)(in_stack_00000008 + 0x37c);
  local_20 = *(undefined4 *)(in_stack_00000008 + 0x380);
  local_1c = *(undefined4 *)(in_stack_00000008 + 900);
  AngleVectors((QAngle *)&local_24,(Vector *)&local_18);
  if (((byte)in_stack_00000008[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(in_stack_00000008);
  }
  fVar2 = *(float *)(in_stack_00000008 + 0x2e8);
  fVar1 = *(float *)(in_stack_00000008 + 0x2e0);
  in_stack_00000004[1] = local_14 * 64.0 + *(float *)(in_stack_00000008 + 0x2e4);
  *in_stack_00000004 = local_18 * 64.0 + fVar1;
  in_stack_00000004[2] = fVar2 + 62.0 + local_10 * 64.0;
  return in_stack_00000004;
}

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)