L L4D2node

CPointPlayerMoveConstraint::ConstraintThink

0x007dbad0 · 442 bytes · __thiscall

_ZN26CPointPlayerMoveConstraint15ConstraintThinkEv

Decompiled

undefined (1 param)

/* CPointPlayerMoveConstraint::ConstraintThink() */

void __thiscall CPointPlayerMoveConstraint::ConstraintThink(CPointPlayerMoveConstraint *this)

{
  int iVar1;
  uint uVar2;
  CBasePlayer *this_00;
  char cVar3;
  int iVar4;
  undefined *puVar5;
  int iVar6;
  int iVar7;
  float fVar8;
  int local_20;
  
  iVar7 = *(int *)(this + 0x45c);
  local_20 = iVar7 + -1;
  if (-1 < local_20) {
    iVar7 = iVar7 * 4;
LAB_007dbb19:
    do {
      iVar1 = iVar7 + -4;
      uVar2 = *(uint *)(*(int *)(this + 0x450) + -4 + iVar7);
      if ((((uVar2 != 0xffffffff) &&
           (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
         (this_00 = *(CBasePlayer **)(puVar5 + 4), this_00 != (CBasePlayer *)0x0)) {
        cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
        if (cVar3 != '\0') {
          if (((byte)this[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
          }
          if (((byte)this_00[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this_00);
          }
          fVar8 = (*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) *
                  (*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) +
                  (*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) *
                  (*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) +
                  (*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) *
                  (*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0));
          if (*(float *)(this + 0x44c) <= fVar8 && fVar8 != *(float *)(this + 0x44c)) {
            CBasePlayer::DeactivateMovementConstraint(this_00);
            iVar4 = *(int *)(this + 0x45c);
            iVar6 = (iVar4 - local_20) + -1;
            if (0 < iVar6) {
              _V_memmove((void *)(*(int *)(this + 0x450) + iVar1),
                         (void *)(*(int *)(this + 0x450) + iVar7),iVar6 * 4);
              iVar4 = *(int *)(this + 0x45c);
            }
            *(int *)(this + 0x45c) = iVar4 + -1;
            COutputEvent::FireOutput
                      ((COutputEvent *)(this + 0x464),(CBaseEntity *)this,(CBaseEntity *)this_00,0.0
                      );
            local_20 = local_20 + -1;
            iVar7 = iVar1;
            if (local_20 == -1) break;
            goto LAB_007dbb19;
          }
        }
      }
      local_20 = local_20 + -1;
      iVar7 = iVar1;
    } while (local_20 != -1);
    iVar7 = *(int *)(this + 0x45c);
  }
  if (iVar7 != 0) {
    CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
  }
  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)