L L4D2node

CTerrorGameMovement::DoJump

0x004fbcb0 · 861 bytes · __thiscall

_ZN19CTerrorGameMovement6DoJumpEP6Vector

Decompiled

undefined (2 params)

/* CTerrorGameMovement::DoJump(Vector*) */

void __thiscall CTerrorGameMovement::DoJump(CTerrorGameMovement *this,Vector *param_1)

{
  float fVar1;
  float fVar2;
  CBaseEdict *pCVar3;
  CBaseEntity *this_00;
  code *pcVar4;
  char cVar5;
  int iVar6;
  int iVar7;
  int *piVar8;
  undefined4 uVar9;
  float fVar10;
  double dVar11;
  double local_2c;
  
  (**(code **)(*(int *)this + 0x100))(this,0);
  (**(code **)(**(int **)(this + 0x7e0) + 0x7fc))(*(int **)(this + 0x7e0),7,0);
  if (*(int *)(*(int *)(this + 4) + 0x217c) == 0) {
    local_2c = 1.0;
  }
  else {
    local_2c = (double)*(float *)(*(int *)(*(int *)(this + 4) + 0x217c) + 0x48);
  }
  iVar7 = *(int *)(this + 0x7e0);
  if (*(char *)(iVar7 + 0x2898) != '\x01') {
    if (*(char *)(iVar7 + 0x6c) == '\0') {
      pCVar3 = *(CBaseEdict **)(iVar7 + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
    }
    *(undefined1 *)(iVar7 + 0x2898) = 1;
  }
  fVar1 = *(float *)(*(int *)(this + 8) + 0xa4);
  cVar5 = CCSGameMovement::HandleFastDuck((CCSGameMovement *)this,true);
  iVar7 = *(int *)(this + 8);
  if (cVar5 == '\0') {
    dVar11 = 301.99337741082996;
  }
  else {
    dVar11 = SQRT((57.0 - (double)(*(float *)(iVar7 + 0xa4) - fVar1)) * 1600.0);
  }
  fVar1 = *(float *)(iVar7 + 0x48);
  *(float *)(iVar7 + 0x48) = (float)(dVar11 * local_2c);
  iVar7 = *(int *)(this + 0x810);
  if (iVar7 != 0) {
    if (param_1 != (Vector *)0x0) {
      *(undefined4 *)(*(int *)(this + 8) + 0x40) = *(undefined4 *)param_1;
      *(undefined4 *)(*(int *)(this + 8) + 0x44) = *(undefined4 *)(param_1 + 4);
      fVar2 = *(float *)(param_1 + 8);
      iVar7 = *(int *)(this + 8);
      cVar5 = (**(code **)(**(int **)(this + 0x810) + 0x778))(*(int **)(this + 0x810));
      if (cVar5 == '\0') {
        fVar10 = *(float *)(ZombiePlayerLungeUp._28_4_ + 0x2c);
      }
      else {
        fVar10 = *(float *)(ZombieLungeUp._28_4_ + 0x2c);
      }
      *(float *)(iVar7 + 0x48) = fVar10 + fVar2;
      iVar7 = *(int *)(this + 0x810);
    }
    if (0.0 < *(float *)(&DAT_00002848 + iVar7)) {
      *(float *)(*(int *)(this + 8) + 0x48) =
           (100.0 - *(float *)(&DAT_00002848 + iVar7) * 0.019) * 0.01 *
           *(float *)(*(int *)(this + 8) + 0x48);
    }
    if ((param_1 != (Vector *)0x0) ||
       ((iVar7 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(this + 4)), iVar7 == 3 &&
        (cVar5 = (**(code **)(**(int **)(this + 4) + 0x778))(*(int **)(this + 4)), cVar5 == '\0'))))
    {
      this_00 = *(CBaseEntity **)(this + 0x810);
      iVar7 = CBaseEntity::GetTeamNumber(this_00);
      if (((iVar7 != 3) || (iVar7 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar7 != 5)) &&
         (iVar7 = *(int *)(this + 0x810), *(float *)(&DAT_00002848 + iVar7) != 1315.7894)) {
        if (*(char *)(iVar7 + 0x6c) == '\0') {
          pCVar3 = *(CBaseEdict **)(iVar7 + 0x30);
          if (pCVar3 != (CBaseEdict *)0x0) {
            *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
            iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
            *(undefined2 *)(iVar6 + 2) = 0;
          }
        }
        else {
          *(byte *)(iVar7 + 0x70) = *(byte *)(iVar7 + 0x70) | 1;
        }
        *(undefined4 *)(&DAT_00002848 + iVar7) = 0x44a47943;
      }
    }
  }
  CGameMovement::FinishGravity((CGameMovement *)this);
  iVar7 = *(int *)(this + 8);
  *(float *)(iVar7 + 0x70) = (*(float *)(iVar7 + 0x48) + *(float *)(iVar7 + 0x70)) - fVar1;
  *(float *)(*(int *)(this + 8) + 100) = *(float *)(*(int *)(this + 8) + 100) + 0.1;
  piVar8 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"player_jump",0,0);
  if (piVar8 != (int *)0x0) {
    pcVar4 = *(code **)(*piVar8 + 0x30);
    uVar9 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(*(int *)(this + 4) + 0x30));
    (*pcVar4)(piVar8,"userid",uVar9);
    (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar8,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)