L L4D2node

CTestTraceline::Spin

0x00af2ec0 · 307 bytes · __thiscall

_ZN14CTestTraceline4SpinEv

Decompiled

undefined (1 param)

/* CTestTraceline::Spin() */

void __thiscall CTestTraceline::Spin(CTestTraceline *this)

{
  float __x;
  int iVar1;
  float fVar2;
  float local_18;
  float local_14;
  undefined4 local_10;
  
  if (Spin()::traceline_spin == '\0') {
    iVar1 = __cxa_guard_acquire(&Spin()::traceline_spin);
    if (iVar1 != 0) {
                    /* try { // try from 00af2fc3 to 00af2fc7 has its CatchHandler @ 00af2ff5 */
      ConVar::ConVar((ConVar *)Spin()::traceline_spin,"traceline_spin","1",0);
      __cxa_guard_release(&Spin()::traceline_spin);
      __cxa_atexit(ConVar::~ConVar,Spin()::traceline_spin,&__dso_handle);
    }
  }
  if (*(int *)(Spin()::traceline_spin._28_4_ + 0x30) != 0) {
    __x = *(float *)(gpGlobals + 0xc);
    fVar2 = sinf(__x);
    local_10 = *(undefined4 *)(this + 0x3b0);
    local_14 = __x * 10.0;
    local_18 = (fVar2 * fVar2 * fVar2 + 1.0 + 1.0) * 90.0;
    CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)&local_18);
  }
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
  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)