L L4D2node

CMomentaryRotButton::ReturnMoveDone

0x00638630 · 409 bytes · __thiscall

_ZN19CMomentaryRotButton14ReturnMoveDoneEv

Decompiled

undefined (1 param)

/* CMomentaryRotButton::ReturnMoveDone() */

void __thiscall CMomentaryRotButton::ReturnMoveDone(CMomentaryRotButton *this)

{
  longdouble lVar1;
  undefined1 local_24 [12];
  float local_18;
  float local_14;
  float local_10;
  
  lVar1 = (longdouble)GetPos(this,(QAngle *)(this + 0x3a8));
  if (0.0 < (float)lVar1) {
    local_10 = -*(float *)(this + 0x634);
    local_18 = *(float *)(this + 0x46c) * local_10;
    local_14 = *(float *)(this + 0x470) * local_10;
    local_10 = local_10 * *(float *)(this + 0x474);
    CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&local_18);
    CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,0.1);
    CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)UpdateThink);
    CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.01,(char *)0x0);
    return;
  }
  CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&vec3_angle);
  CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)(this + 0x60c));
  if (this[0x62c] != (CMomentaryRotButton)0x0) {
    UpdateTarget((float)this,(CBaseEntity *)0x0);
  }
  CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,-1.0);
  *(undefined4 *)(this + 0x14) = 0;
  *(undefined4 *)(this + 0x18) = 0;
  CBaseEntity::SetNextThink((CBaseEntity *)this,-1.0,(char *)0x0);
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(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)