L L4D2node

CPathKeyFrame::InsertNewKey

0x006f7f20 · 368 bytes · __cdecl

_ZN13CPathKeyFrame12InsertNewKeyE6Vector6QAngle

Decompiled

undefined (2 params)

/* CPathKeyFrame::InsertNewKey(Vector, QAngle) */

CPathKeyFrame *
CPathKeyFrame::InsertNewKey
          (CPathKeyFrame *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
          undefined4 param_5,undefined4 param_6,undefined4 param_7)

{
  uint uVar1;
  int iVar2;
  CPathKeyFrame *this;
  
  iVar2 = CreateEntityByName("keyframe_track",-1,true);
  if (iVar2 != 0) {
    this = (CPathKeyFrame *)__dynamic_cast(iVar2,&CBaseEntity::typeinfo,&typeinfo,0);
    if (this != (CPathKeyFrame *)0x0) goto LAB_006f7f79;
  }
  this = (CPathKeyFrame *)0x0;
  Warning("classname %s used to create wrong class type\n","keyframe_track");
LAB_006f7f79:
  *(undefined4 *)(this + 0x44c) = param_5;
  *(undefined4 *)(this + 0x450) = param_6;
  *(undefined4 *)(this + 0x454) = param_7;
  AngleQuaternion((QAngle *)(this + 0x44c),(Quaternion *)(this + 0x458));
  *(undefined4 *)(this + 0x440) = param_2;
  *(undefined4 *)(this + 0x444) = param_3;
  *(undefined4 *)(this + 0x448) = param_4;
  *(undefined4 *)(this + 0x478) = *(undefined4 *)(param_1 + 0x478);
  uVar1 = *(uint *)(param_1 + 0x14c);
  *(uint *)(this + 0x14c) = uVar1;
  if ((uVar1 & 0x20080) != 0) {
    CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
  }
  if (*(int *)(param_1 + 0x84) != 0) {
    CBaseEntity::SetParent(this,*(undefined4 *)(param_1 + 0x84),0,0xffffffff);
  }
  *(undefined4 *)(this + 0x470) = *(undefined4 *)(param_1 + 0x470);
  *(CPathKeyFrame **)(*(int *)(param_1 + 0x470) + 0x474) = this;
  *(CPathKeyFrame **)(param_1 + 0x470) = this;
  *(CPathKeyFrame **)(this + 0x474) = param_1;
  CalculateFrameDuration(param_1);
  CalculateFrameDuration(this);
  return this;
}

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)