L L4D2node

SavedEntity::SavedEntity

0x008684a0 · 438 bytes · __thiscall

_ZN11SavedEntityC1EP11CBaseEntity

Decompiled

undefined (2 params)

/* SavedEntity::SavedEntity(CBaseEntity*) */

void __thiscall SavedEntity::SavedEntity(SavedEntity *this,CBaseEntity *param_1)

{
  KeyValues *this_00;
  char *pcVar1;
  uint in_stack_ffffffc8;
  
  *(undefined ***)this = &PTR__SavedEntity_00cda8a0;
  this_00 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffc8);
                    /* try { // try from 008684de to 008684e2 has its CatchHandler @ 0086865d */
  KeyValues::KeyValues(this_00,"item",(IKeyValuesSystem *)0x0,false);
  *(KeyValues **)(this + 4) = this_00;
  pcVar1 = "";
  if (*(char **)(param_1 + 0x7c) != (char *)0x0) {
    pcVar1 = *(char **)(param_1 + 0x7c);
  }
  KeyValues::SetString(this_00,"classname",pcVar1);
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  pcVar1 = (char *)UTIL_VarArgs("%f %f %f",(double)*(float *)(param_1 + 0x2e0),
                                (double)*(float *)(param_1 + 0x2e4),
                                (double)*(float *)(param_1 + 0x2e8));
  KeyValues::SetString(*(KeyValues **)(this + 4),"pos",pcVar1);
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  pcVar1 = (char *)UTIL_VarArgs("%f %f %f",(double)*(float *)(param_1 + 0x37c),
                                (double)*(float *)(param_1 + 0x380),
                                (double)*(float *)(param_1 + 900));
  KeyValues::SetString(*(KeyValues **)(this + 4),"angles",pcVar1);
  if (((byte)param_1[0x14d] & 0x10) != 0) {
    CBaseEntity::CalcAbsoluteVelocity(param_1);
  }
  pcVar1 = (char *)UTIL_VarArgs("%f %f %f",(double)*(float *)(param_1 + 0x274),
                                (double)*(float *)(param_1 + 0x278),
                                (double)*(float *)(param_1 + 0x27c));
  KeyValues::SetString(*(KeyValues **)(this + 4),"vel",pcVar1);
  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)