L L4D2node

CCSGameMovement::FinishUnDuck

0x0042edf0 · 708 bytes · __thiscall

_ZN15CCSGameMovement12FinishUnDuckEv

Decompiled

undefined (1 param)

/* CCSGameMovement::FinishUnDuck() */

void __thiscall CCSGameMovement::FinishUnDuck(CCSGameMovement *this)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  code *pcVar7;
  int iVar8;
  int iVar9;
  undefined4 uVar10;
  CBaseEntity *this_00;
  int *piVar11;
  float local_18;
  float local_14;
  float local_10;
  
  iVar8 = *(int *)(this + 8);
  local_10 = *(float *)(iVar8 + 0x9c);
  local_14 = *(float *)(iVar8 + 0xa0);
  local_18 = *(float *)(iVar8 + 0xa4);
  iVar8 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(this + 4));
  if (iVar8 == 0) {
    iVar8 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    iVar9 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    fVar1 = *(float *)(iVar9 + 0x18);
    fVar2 = *(float *)(iVar9 + 0x1c);
    fVar3 = *(float *)(iVar9 + 0x20);
    fVar4 = *(float *)(iVar8 + 0xc);
    fVar5 = *(float *)(iVar8 + 0x10);
    fVar6 = *(float *)(iVar8 + 0x14);
    iVar8 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    iVar9 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    local_10 = ((fVar1 - fVar4) - (*(float *)(iVar9 + 0x30) - *(float *)(iVar8 + 0x24))) * -0.5 +
               local_10;
    local_14 = ((fVar2 - fVar5) - (*(float *)(iVar9 + 0x34) - *(float *)(iVar8 + 0x28))) * -0.5 +
               local_14;
    local_18 = ((fVar3 - fVar6) - (*(float *)(iVar9 + 0x38) - *(float *)(iVar8 + 0x2c))) * -0.5 +
               local_18;
  }
  else {
    iVar8 = (**(code **)(*g_pGameRules + 0x7c))();
    iVar9 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    local_10 = (local_10 + *(float *)(iVar9 + 0x24)) - *(float *)(iVar8 + 0xc);
    local_14 = (local_14 + *(float *)(iVar9 + 0x28)) - *(float *)(iVar8 + 0x10);
    local_18 = (local_18 + *(float *)(iVar9 + 0x2c)) - *(float *)(iVar8 + 0x14);
  }
  this_00 = *(CBaseEntity **)(this + 4);
  if (this_00[0x1a90] != (CBaseEntity)0x0) {
    (**(code **)(*(int *)(this_00 + 0x1a40) + 4))(this_00 + 0x1a40,this_00 + 0x1a90);
    this_00[0x1a90] = (CBaseEntity)0x0;
    this_00 = *(CBaseEntity **)(this + 4);
  }
  CBaseEntity::RemoveFlag(this_00,2);
  piVar11 = *(int **)(this + 4);
  if (*(char *)((int)piVar11 + 0x1a91) != '\0') {
    (**(code **)(piVar11[0x690] + 4))(piVar11 + 0x690,(int)piVar11 + 0x1a91);
    *(undefined1 *)((int)piVar11 + 0x1a91) = 0;
    piVar11 = *(int **)(this + 4);
  }
  if (*(char *)((int)piVar11 + 0x1a92) != '\0') {
    (**(code **)(piVar11[0x690] + 4))(piVar11 + 0x690,(int)piVar11 + 0x1a92);
    *(undefined1 *)((int)piVar11 + 0x1a92) = 0;
    piVar11 = *(int **)(this + 4);
  }
  pcVar7 = *(code **)(*piVar11 + 0x254);
  uVar10 = (**(code **)(*(int *)this + 0x24))(this,0);
  (*pcVar7)(*(undefined4 *)(this + 4),uVar10);
  iVar8 = *(int *)(this + 4);
  if (*(int *)(iVar8 + 0x1a94) != 0) {
    (**(code **)(*(int *)(iVar8 + 0x1a40) + 4))(iVar8 + 0x1a40,iVar8 + 0x1a94);
    *(undefined4 *)(iVar8 + 0x1a94) = 0;
  }
  iVar8 = *(int *)(this + 8);
  *(float *)(iVar8 + 0x9c) = local_10;
  *(float *)(iVar8 + 0xa0) = local_14;
  *(float *)(iVar8 + 0xa4) = local_18;
  (**(code **)(*(int *)this + 0xcc))(this,0);
  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)