L L4D2node

CRagdollProp::Teleport

0x0079b230 · 580 bytes · __thiscall

_ZN12CRagdollProp8TeleportEPK6VectorPK6QAngleS2_

Decompiled

undefined (4 params)

/* CRagdollProp::Teleport(Vector const*, QAngle const*, Vector const*) */

void __thiscall
CRagdollProp::Teleport(CRagdollProp *this,Vector *param_1,QAngle *param_2,Vector *param_3)

{
  int *piVar1;
  CRagdollProp *pCVar2;
  int iVar3;
  undefined4 local_184;
  undefined4 local_180;
  undefined4 local_17c;
  QAngle local_178 [12];
  matrix3x4_t local_16c [48];
  matrix3x4_t local_13c [48];
  matrix3x4_t local_10c [48];
  matrix3x4_t local_dc [48];
  matrix3x4_t local_ac [12];
  undefined4 local_a0;
  undefined4 local_90;
  undefined4 local_80;
  matrix3x4_t local_7c [48];
  matrix3x4_t local_4c [60];
  
  if (*(int *)(this + 0x1410) == 0) {
    if (Teleport(Vector_const*,QAngle_const*,Vector_const*)::__executeCount < 1) {
      Teleport(Vector_const*,QAngle_const*,Vector_const*)::__executeCount =
           Teleport(Vector_const*,QAngle_const*,Vector_const*)::__executeCount + 1;
      Warning("CRagdollProp::Teleport( ) for ragdoll without root object\n");
    }
  }
  else {
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    MatrixInvert((matrix3x4_t *)(this + 0x28c),local_16c);
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    MatrixCopy((matrix3x4_t *)(this + 0x28c),local_13c);
    if (param_2 != (QAngle *)0x0) {
      AngleMatrix(param_2,local_13c);
    }
    if (param_1 != (Vector *)0x0) {
      MatrixSetColumn(param_1,3,local_13c);
    }
    ConcatTransforms(local_13c,local_16c,local_10c);
    CBaseEntity::VPhysicsSwapObject((CBaseEntity *)this,*(IPhysicsObject **)(this + 0x1410));
    (**(code **)(**(int **)(this + 0x1410) + 200))(*(int **)(this + 0x1410),local_dc);
    ConcatTransforms(local_10c,local_dc,local_ac);
    iVar3 = 1;
    MatrixAngles(local_ac,(float *)local_178);
    pCVar2 = this + 0x1464;
    local_184 = local_a0;
    local_180 = local_90;
    local_17c = local_80;
    CBaseAnimating::Teleport((CBaseAnimating *)this,(Vector *)&local_184,local_178,param_3);
    if (1 < *(int *)(this + 0x13f8)) {
      do {
        piVar1 = *(int **)pCVar2;
        if (piVar1 != (int *)0x0) {
          (**(code **)(*piVar1 + 200))(piVar1,local_7c);
          ConcatTransforms(local_10c,local_7c,local_4c);
          (**(code **)(**(int **)pCVar2 + 0xc0))(*(int **)pCVar2,local_4c,1);
          UpdateNetworkDataFromVPhysics(this,*(IPhysicsObject **)pCVar2,iVar3);
        }
        iVar3 = iVar3 + 1;
        pCVar2 = pCVar2 + 0x54;
      } while (iVar3 < *(int *)(this + 0x13f8));
    }
    UpdateNetworkDataFromVPhysics(this,*(IPhysicsObject **)(this + 0x1410),0);
  }
  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)