L L4D2node

CMoveHelperServer::ProcessImpacts

0x006f6450 · 681 bytes · __thiscall

_ZN17CMoveHelperServer14ProcessImpactsEv

Decompiled

undefined (1 param)

/* CMoveHelperServer::ProcessImpacts() */

void __thiscall CMoveHelperServer::ProcessImpacts(CMoveHelperServer *this)

{
  float fVar1;
  int iVar2;
  uint uVar3;
  char cVar4;
  int *piVar5;
  CBaseEntity *pCVar6;
  undefined4 uVar7;
  uint *puVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  CBaseEntity::PhysicsTouchTriggers(*(CBaseEntity **)(this + 4),(Vector *)0x0);
  pCVar6 = *(CBaseEntity **)(this + 4);
  if (((byte)pCVar6[0x1b4] & 4) == 0) {
    if (((byte)pCVar6[0x14d] & 0x10) != 0) {
      CBaseEntity::CalcAbsoluteVelocity(pCVar6);
    }
    local_28 = *(undefined4 *)(pCVar6 + 0x274);
    local_24 = *(undefined4 *)(pCVar6 + 0x278);
    local_20 = *(undefined4 *)(pCVar6 + 0x27c);
    iVar10 = 0;
    iVar11 = 0;
    if (0 < *(int *)(this + 0x14)) {
      do {
        piVar5 = *(int **)(*(int *)(this + 8) + 0x58 + iVar10);
        puVar8 = (uint *)(**(code **)(*piVar5 + 0xc))(piVar5);
        uVar3 = *puVar8;
        if (((uVar3 != 0xffffffff) &&
            (iVar9 = (uVar3 & 0xfff) * 0x10, *(uint *)(gEntList + iVar9 + 8) == uVar3 >> 0xc)) &&
           (piVar5 = *(int **)(gEntList + iVar9 + 4), piVar5 != (int *)0x0)) {
          piVar5 = (int *)(**(code **)(*piVar5 + 0x14))(piVar5);
          iVar9 = (**(code **)(*piVar5 + 8))(piVar5);
          if (((iVar9 != 0) && (piVar5 = *(int **)(iVar9 + 0xc), piVar5 != (int *)0x0)) &&
             ((pCVar6 = (CBaseEntity *)(**(code **)(*piVar5 + 0x18))(piVar5),
              pCVar6 != (CBaseEntity *)0x0 && (*(CBaseEntity **)(this + 4) != pCVar6)))) {
            iVar2 = *(int *)(this + 8);
            piVar5 = *(int **)(iVar9 + 0xc);
            uVar7 = 0;
            if (piVar5 != (int *)0x0) {
              uVar7 = (**(code **)(*piVar5 + 0x18))(piVar5);
            }
            *(undefined4 *)(iVar2 + iVar10 + 0x58) = uVar7;
            CBaseEntity::SetAbsVelocity
                      (*(CBaseEntity **)(this + 4),(Vector *)(*(int *)(this + 8) + iVar10));
            CBaseEntity::PhysicsImpact
                      (pCVar6,*(CBaseEntity **)(this + 4),
                       (CGameTrace *)(*(int *)(this + 8) + iVar10 + 0xc));
          }
        }
        iVar11 = iVar11 + 1;
        iVar10 = iVar10 + 0x60;
      } while (iVar11 < *(int *)(this + 0x14));
    }
    CBaseEntity::SetAbsVelocity(*(CBaseEntity **)(this + 4),(Vector *)&local_28);
    piVar5 = *(int **)(this + 4);
    if ((piVar5 != (int *)0x0) && (cVar4 = (**(code **)(*piVar5 + 0x16c))(piVar5), cVar4 != '\0')) {
      iVar10 = *(int *)(this + 4);
      if (((*(float *)(this + 0x1c) <= -0.01) ||
          (((0.01 <= *(float *)(this + 0x1c) || (*(float *)(this + 0x20) <= -0.01)) ||
           (0.01 <= *(float *)(this + 0x20))))) ||
         ((*(float *)(this + 0x24) <= -0.01 || (0.01 <= *(float *)(this + 0x24))))) {
        VectorNormalize((Vector *)(this + 0x1c));
        *(undefined4 *)(iVar10 + 0x2320) = *(undefined4 *)(this + 0x1c);
        *(undefined4 *)(iVar10 + 0x2324) = *(undefined4 *)(this + 0x20);
        *(undefined4 *)(iVar10 + 9000) = *(undefined4 *)(this + 0x24);
      }
      fVar1 = *(float *)(this + 0x28);
      if (((fVar1 <= -0.01) || (0.01 <= fVar1)) ||
         ((*(float *)(this + 0x2c) <= -0.01 ||
          (((0.01 <= *(float *)(this + 0x2c) || (*(float *)(this + 0x30) <= -0.01)) ||
           (0.01 <= *(float *)(this + 0x30))))))) {
        *(float *)(iVar10 + 0x232c) = fVar1;
        *(undefined4 *)(iVar10 + 0x2330) = *(undefined4 *)(this + 0x2c);
        *(undefined4 *)(iVar10 + 0x2334) = *(undefined4 *)(this + 0x30);
      }
    }
    (**(code **)(*(int *)this + 8))(this);
  }
  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)