L L4D2node

CBasePlayer::DeactivateMovementConstraint

0x007b7800 · 357 bytes · __thiscall

_ZN11CBasePlayer28DeactivateMovementConstraintEv

Decompiled

undefined (1 param)

/* CBasePlayer::DeactivateMovementConstraint() */

void __thiscall CBasePlayer::DeactivateMovementConstraint(CBasePlayer *this)

{
  uint uVar1;
  CBaseEdict *pCVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  int iVar6;
  undefined *puVar7;
  
  uVar1 = *(uint *)(this + 0x208c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)) {
    if (this[0x6c] == (CBasePlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x208c) = 0xffffffff;
  }
  if (*(float *)(this + 0x209c) != 0.0) {
    if (this[0x6c] == (CBasePlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x209c) = 0;
  }
  fVar5 = DAT_01053d50;
  fVar4 = DAT_01053d4c;
  fVar3 = vec3_origin;
  if (((vec3_origin == *(float *)(this + 0x2090)) && (DAT_01053d4c == *(float *)(this + 0x2094))) &&
     (DAT_01053d50 == *(float *)(this + 0x2098))) {
    return;
  }
  if (this[0x6c] == (CBasePlayer)0x0) {
    pCVar2 = *(CBaseEdict **)(this + 0x30);
    if (pCVar2 != (CBaseEdict *)0x0) {
      *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
      iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
      *(undefined2 *)(iVar6 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
  }
  *(float *)(this + 0x2090) = fVar3;
  *(float *)(this + 0x2094) = fVar4;
  *(float *)(this + 0x2098) = fVar5;
  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)