L L4D2node

CPointCommentaryNode::TeleportTo

0x00649b40 · 974 bytes · __thiscall

_ZN20CPointCommentaryNode10TeleportToEP11CBasePlayer

Decompiled

undefined (2 params)

/* CPointCommentaryNode::TeleportTo(CBasePlayer*) */

void __thiscall CPointCommentaryNode::TeleportTo(CPointCommentaryNode *this,CBasePlayer *param_1)

{
  float *pfVar1;
  float *pfVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float local_e8;
  float local_e4;
  float local_e0;
  CTraceFilterSimple local_dc [16];
  float local_cc;
  float local_c8;
  float local_c4;
  undefined4 local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  float local_ac;
  float local_a8;
  float local_a4;
  float local_9c;
  float local_98;
  float local_94;
  undefined4 local_8c;
  undefined1 local_88;
  undefined1 local_87;
  Vector local_70 [12];
  Vector local_64 [84];
  
  fVar4 = *(float *)(this + 0x1450);
  fVar5 = *(float *)(this + 0x1454);
  fVar3 = *(float *)(this + 0x144c);
  if (((vec3_origin == *(float *)(this + 0x144c)) && (fVar3 = vec3_origin, DAT_01053d4c == fVar4))
     && (fVar4 = DAT_01053d4c, fVar5 == DAT_01053d50)) {
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    fVar5 = *(float *)(this + 0x2e8);
    fVar3 = *(float *)(this + 0x2e0);
    fVar4 = *(float *)(this + 0x2e4);
  }
  pfVar1 = (float *)(**(code **)(*(int *)(param_1 + 0x194) + 8))(param_1 + 0x194);
  pfVar2 = (float *)(**(code **)(*(int *)(param_1 + 0x194) + 4))(param_1 + 0x194);
  local_87 = 1;
  local_bc = 0;
  local_b8 = 0;
  local_b4 = 0xc3fa0000;
  local_8c = 0;
  local_9c = (*pfVar1 - *pfVar2) * 0.5;
  local_98 = (pfVar1[1] - pfVar2[1]) * 0.5;
  local_94 = (pfVar1[2] - pfVar2[2]) * 0.5;
  local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
  local_ac = (*pfVar1 + *pfVar2) * 0.5;
  local_cc = fVar3 + local_ac;
  local_a8 = (pfVar1[1] + pfVar2[1]) * 0.5;
  local_c8 = fVar4 + local_a8;
  local_a4 = (pfVar1[2] + pfVar2[2]) * 0.5;
  local_ac = -local_ac;
  local_a8 = -local_a8;
  local_c4 = fVar5 + local_a4;
  local_a4 = -local_a4;
  CTraceFilterSimple::CTraceFilterSimple
            (local_dc,(IHandleEntity *)param_1,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
  (**(code **)(*enginetrace + 0x14))(enginetrace,(Vector *)&local_cc,0x200400b,local_dc,local_70);
  if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
    DebugDrawLine(local_70,local_64,0xff,0xff,0,true,-1.0);
  }
  (**(code **)(*(int *)param_1 + 0x1dc))(param_1,local_64,0,&vec3_origin);
  (**(code **)(*(int *)param_1 + 0x234))((Vector *)&local_cc,param_1);
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  local_e8 = *(float *)(this + 0x2e0) - local_cc;
  local_e4 = *(float *)(this + 0x2e4) - local_c8;
  local_e0 = *(float *)(this + 0x2e8) - local_c4;
  VectorNormalize((Vector *)&local_e8);
  local_cc = 0.0;
  local_c8 = 0.0;
  local_c4 = 1.0;
  VectorAngles((Vector *)&local_e8,(Vector *)&local_cc,(QAngle *)local_dc);
  CBasePlayer::SnapEyeAngles(param_1,(QAngle *)local_dc);
  return;
}

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)