L L4D2node

CFuncMoveLinear::InputTeleportToTarget

0x006c1200 · 341 bytes · __thiscall

_ZN15CFuncMoveLinear21InputTeleportToTargetER11inputdata_t

Decompiled

undefined (2 params)

/* CFuncMoveLinear::InputTeleportToTarget(inputdata_t&) */

void __thiscall CFuncMoveLinear::InputTeleportToTarget(CFuncMoveLinear *this,inputdata_t *param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  char *pcVar5;
  CBaseEntity *this_00;
  
  if (*(int *)(param_1 + 0x18) == 2) {
    pcVar5 = "";
    if (*(char **)(param_1 + 8) != (char *)0x0) {
      pcVar5 = *(char **)(param_1 + 8);
    }
  }
  else {
    pcVar5 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
  }
  this_00 = (CBaseEntity *)
            CGlobalEntityList::FindEntityByName
                      ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar5,(CBaseEntity *)0x0,
                       (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
  if (this_00 != (CBaseEntity *)0x0) {
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    UTIL_SetOrigin((CBaseEntity *)this,(Vector *)(this_00 + 0x2e0),false);
    fVar1 = *(float *)(this + 0x4d8);
    *(undefined4 *)(this + 0x4d4) = 0;
    fVar2 = *(float *)(this + 0x39c);
    fVar3 = *(float *)(this + 0x3a0);
    fVar4 = *(float *)(this + 0x3a4);
    *(float *)(this + 0x454) = fVar2;
    *(float *)(this + 0x458) = fVar3;
    *(float *)(this + 0x45c) = fVar4;
    *(float *)(this + 0x498) = fVar2;
    *(float *)(this + 0x460) = *(float *)(this + 0x4b8) * fVar1 + fVar2;
    *(float *)(this + 0x464) = *(float *)(this + 0x4bc) * fVar1 + fVar3;
    *(float *)(this + 0x468) = *(float *)(this + 0x4c0) * fVar1 + fVar4;
    *(float *)(this + 0x49c) = fVar3;
    *(float *)(this + 0x4a0) = fVar4;
  }
  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)