L L4D2node

CMoveableCamera::Move

0x00a06890 · 527 bytes · __thiscall

_ZN15CMoveableCamera4MoveEv

Decompiled

undefined (1 param)

/* CMoveableCamera::Move() */

void __thiscall CMoveableCamera::Move(CMoveableCamera *this)

{
  float fVar1;
  float fVar2;
  float fVar3;
  uint uVar4;
  int iVar5;
  undefined *puVar6;
  longdouble lVar7;
  float fVar8;
  float fVar9;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  local_28 = *(float *)(this + 0x464);
  (**(code **)(*(int *)this + 0x32c))((Vector *)&local_34,this,(Vector *)&local_28);
  fVar8 = (*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x45c)) / *(float *)(this + 0x460);
  if (1.0 <= fVar8) {
    UTIL_SetOrigin((CBaseEntity *)this,(Vector *)&local_34,false);
    uVar4 = *(uint *)(this + 0x464);
    iVar5 = 0;
    if (((uVar4 != 0xffffffff) &&
        (puVar6 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar6 + 8) == uVar4 >> 0xc)) {
      iVar5 = *(int *)(puVar6 + 4);
    }
    CBaseEntity::SetAbsAngles((CBaseEntity *)this,(QAngle *)(iVar5 + 0x3a8));
    CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
    if (this[0x441] != (CMoveableCamera)0x0) {
      (**(code **)(*(int *)this + 0x328))(this);
    }
    this[0x442] = (CMoveableCamera)0x0;
    return;
  }
  lVar7 = (longdouble)(**(code **)(*(int *)this + 0x330))(this,fVar8);
  fVar8 = *(float *)(this + 0x444);
  fVar1 = *(float *)(this + 0x448);
  fVar3 = (float)lVar7;
  fVar2 = *(float *)(this + 0x44c);
  fVar9 = 1.0 / *(float *)(gpGlobals + 0x10);
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  local_24 = ((fVar1 - *(float *)(this + 0x2e4)) + (local_30 - fVar1) * fVar3) * fVar9;
  local_20 = ((fVar2 - *(float *)(this + 0x2e8)) + (local_2c - fVar2) * fVar3) * fVar9;
  local_28 = ((fVar8 - *(float *)(this + 0x2e0)) + (local_34 - fVar8) * fVar3) * fVar9;
  CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_28);
  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)