L L4D2node

CHLTVDirector::StartFixedCameraShot

0x006d99d0 · 522 bytes · __thiscall

_ZN13CHLTVDirector20StartFixedCameraShotEii

Decompiled

undefined (3 params)

/* CHLTVDirector::StartFixedCameraShot(int, int) */

void __thiscall CHLTVDirector::StartFixedCameraShot(CHLTVDirector *this,int param_1,int param_2)

{
  float fVar1;
  float fVar2;
  CBaseEntity *this_00;
  code *pcVar3;
  int *piVar4;
  longdouble lVar5;
  float fVar6;
  float local_24;
  float local_20;
  
  this_00 = *(CBaseEntity **)(this + param_1 * 4 + 0x48);
  if (((byte)this_00[0x14d] & 8) == 0) {
    local_24 = *(float *)(this_00 + 0x2e4);
    local_20 = *(float *)(this_00 + 0x2e8);
    fVar6 = *(float *)(this_00 + 0x2e0);
  }
  else {
    CBaseEntity::CalcAbsolutePosition(this_00);
    local_24 = *(float *)(this_00 + 0x2e4);
    local_20 = *(float *)(this_00 + 0x2e8);
    fVar6 = *(float *)(this_00 + 0x2e0);
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
  }
  piVar4 = gameeventmanager;
  fVar1 = *(float *)(this_00 + 0x37c);
  fVar2 = *(float *)(this_00 + 0x380);
  *(undefined4 *)(this + 0x20) = 0;
  *(float *)(this + 0x24) = fVar6;
  *(float *)(this + 0x28) = local_24;
  *(float *)(this + 0x2c) = local_20;
  piVar4 = (int *)(**(code **)(*piVar4 + 0x1c))(piVar4,"hltv_fixed",1,0);
  if (piVar4 != (int *)0x0) {
    (**(code **)(*piVar4 + 0x30))(piVar4,&DAT_00c9392f,(int)fVar6);
    (**(code **)(*piVar4 + 0x30))(piVar4,&DAT_00c93934,(int)local_24);
    (**(code **)(*piVar4 + 0x30))(piVar4,&DAT_00c93939,(int)local_20);
    (**(code **)(*piVar4 + 0x30))(piVar4,"theta",(int)fVar1);
    (**(code **)(*piVar4 + 0x30))(piVar4,&DAT_00c93914,(int)fVar2);
    (**(code **)(*piVar4 + 0x30))(piVar4,"target",param_2);
    pcVar3 = *(code **)(*piVar4 + 0x38);
    lVar5 = (longdouble)RandomFloat(0x42480000,0x42dc0000);
    (*pcVar3)(piVar4,&DAT_00cdafee,(float)lVar5);
    (**(code **)(**(int **)(this + 0x14) + 0x2c))(*(int **)(this + 0x14),piVar4);
                    /* WARNING: Could not recover jumptable at 0x006d9b82. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*gameeventmanager + 0x2c))();
    return;
  }
  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)