L L4D2node

CTerrorGameMovement::PlayerRoughLandingEffects

0x004f9410 · 611 bytes · __thiscall

_ZN19CTerrorGameMovement25PlayerRoughLandingEffectsEf

Decompiled

undefined (2 params)

/* CTerrorGameMovement::PlayerRoughLandingEffects(float) */

void __thiscall
CTerrorGameMovement::PlayerRoughLandingEffects(CTerrorGameMovement *this,float param_1)

{
  CBaseEntity *pCVar1;
  char cVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  bool bVar6;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  cVar2 = (**(code **)(**(int **)(this + 4) + 0x440))(*(int **)(this + 4));
  if (cVar2 != '\0') {
    CGameMovement::PlayerRoughLandingEffects((CGameMovement *)this,param_1);
    if (0.5 <= param_1) {
      pCVar1 = *(CBaseEntity **)(this + 4);
      if (((byte)pCVar1[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar1);
      }
      local_28 = *(undefined4 *)(pCVar1 + 0x2e0);
      local_24 = *(undefined4 *)(pCVar1 + 0x2e4);
      local_20 = *(undefined4 *)(pCVar1 + 0x2e8);
      uVar3 = (**(code **)*enginetrace)(enginetrace,&local_28,0x20,0);
      bVar6 = true;
      uVar3 = uVar3 >> 5 & 1;
      if (uVar3 == 0) {
        uVar5 = (**(code **)*enginetrace)(enginetrace,(Vector *)(pCVar1 + 0x2e0),0x20,0);
        bVar6 = (bool)((byte)(uVar5 >> 5) & 1);
      }
      CBaseCombatCharacter::PlayFootstepSound
                (*(CBaseCombatCharacter **)(this + 4),(Vector *)(pCVar1 + 0x2e0),true,bVar6,
                 SUB41(uVar3,0),true);
    }
    if (0.0 < param_1) {
      iVar4 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(this + 4));
      cVar2 = IsASurvivorTeam(iVar4);
      if (cVar2 == '\0') {
        CBaseEntity::EmitSound(*(CBaseEntity **)(this + 4),"PlayerZombie.JumpLand",0.0,(float *)0x0)
        ;
      }
      else if (0.85 < param_1) {
        CBaseEntity::EmitSound(*(CBaseEntity **)(this + 4),"Player.JumpLand",0.0,(float *)0x0);
      }
      if (0.25 < param_1) {
        pCVar1 = *(CBaseEntity **)(this + 0x810);
        iVar4 = CBaseEntity::GetTeamNumber(pCVar1);
        if (((iVar4 == 3) && (iVar4 = (**(code **)(*(int *)pCVar1 + 0x544))(pCVar1), iVar4 == 3)) &&
           (cVar2 = CTerrorPlayer::IsLunging(*(CTerrorPlayer **)(this + 0x810)), cVar2 != '\0')) {
          iVar4 = *(int *)(this + 8);
          *(undefined4 *)(iVar4 + 0x40) = 0;
          *(undefined4 *)(iVar4 + 0x44) = 0;
          *(undefined4 *)(iVar4 + 0x48) = 0;
          (**(code **)(**(int **)(this + 0x810) + 0x7fc))(*(int **)(this + 0x810),8,1);
          return;
        }
      }
      (**(code **)(**(int **)(this + 0x810) + 0x7fc))(*(int **)(this + 0x810),8,0);
      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)