L L4D2node

CEnvRockLauncher::LaunchAtTarget

0x004df8a0 · 515 bytes · __thiscall

_ZN16CEnvRockLauncher14LaunchAtTargetEP11CBaseEntity

Decompiled

undefined (2 params)

/* CEnvRockLauncher::LaunchAtTarget(CBaseEntity*) */

void __thiscall CEnvRockLauncher::LaunchAtTarget(CEnvRockLauncher *this,CBaseEntity *param_1)

{
  CTankRock *this_00;
  int iVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float local_4c;
  float local_48;
  float local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  float local_34;
  float local_30;
  float local_2c;
  undefined4 local_28;
  float local_24;
  undefined4 local_20;
  
  if (((byte)this[0x14d] & 8) == 0) {
    local_4c = *(float *)(this + 0x2e0);
    local_48 = *(float *)(this + 0x2e4);
    local_44 = *(float *)(this + 0x2e8);
  }
  else {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    local_4c = *(float *)(this + 0x2e0);
    local_48 = *(float *)(this + 0x2e4);
    local_44 = *(float *)(this + 0x2e8);
    if ((*(uint *)(this + 0x14c) & 0x800) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
  }
  local_40 = *(undefined4 *)(this + 0x37c);
  local_3c = *(undefined4 *)(this + 0x380);
  local_38 = *(undefined4 *)(this + 900);
  this_00 = (CTankRock *)
            CTankRock::Create((Vector *)&local_4c,(QAngle *)&local_40,(Vector *)&vec3_origin,
                              (CBaseCombatCharacter *)0x0);
  *(undefined4 *)(this_00 + 0x1a8c) = *(undefined4 *)(this + 0x444);
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  fVar4 = *(float *)(param_1 + 0x2e0) - local_4c;
  fVar3 = *(float *)(param_1 + 0x2e4) - local_48;
  fVar5 = *(float *)(param_1 + 0x2e8) - local_44;
  fVar2 = fVar3 * fVar3 + fVar4 * fVar4;
  local_2c = SQRT(fVar5 * fVar5 + fVar2) / *(float *)(ZombieTankThrowForce._28_4_ + 0x2c);
  fVar2 = 1.0 / SQRT(fVar2);
  local_2c = (*(float *)(sv_gravity._28_4_ + 0x2c) * 0.5 * *(float *)(this_00 + 0x2c0) * local_2c *
              local_2c + fVar5) / local_2c;
  local_30 = *(float *)(ZombieTankThrowForce._28_4_ + 0x2c) - local_2c;
  local_34 = fVar4 * fVar2 * local_30;
  local_30 = fVar3 * fVar2 * local_30;
  iVar1 = (**(code **)(*random_valve + 8))(random_valve,0xffffff88,0x78);
  local_24 = (float)iVar1;
  local_28 = 0x42700000;
  local_20 = 0;
  CTankRock::OnRelease
            (this_00,(Vector *)&local_4c,(QAngle *)&local_40,(Vector *)&local_34,(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)