L L4D2node

CFuncRotating::RotateMove

0x006334b0 · 319 bytes · __thiscall

_ZN13CFuncRotating10RotateMoveEv

Decompiled

undefined (1 param)

/* CFuncRotating::RotateMove() */

void __thiscall CFuncRotating::RotateMove(CFuncRotating *this)

{
  float fVar1;
  float *pfVar2;
  int iVar3;
  float fVar4;
  float local_18;
  float local_14;
  float local_10;
  
  CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,10.0);
  if (this[0x478] != (CFuncRotating)0x0) {
    CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,*(float *)(gpGlobals + 0x1c));
    if (*(float *)(this + 0x440) == 0.0) {
      if (*(float *)(this + 0x444) == 0.0) {
        pfVar2 = &local_10;
        iVar3 = 8;
      }
      else {
        pfVar2 = &local_14;
        iVar3 = 4;
      }
    }
    else {
      pfVar2 = &local_18;
      iVar3 = 0;
    }
    fVar4 = (float)((int)((*(float *)(this + iVar3 + 0x3a8) - *(float *)(this + iVar3 + 0x46c)) *
                         182.04445) & 0xffff) * 0.005493164;
    if (180.0 < fVar4) {
      fVar4 = fVar4 - 360.0;
    }
    fVar1 = *(float *)(gpGlobals + 0x1c);
    local_10 = *(float *)(this + 0x288) * fVar1;
    local_18 = *(float *)(this + 0x280) * fVar1;
    local_14 = *(float *)(this + 0x284) * fVar1;
    if (ABS(fVar4) < ABS(*pfVar2)) {
      SetTargetSpeed(this,0.0);
      CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)(this + 0x46c));
      this[0x478] = (CFuncRotating)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)