L L4D2node

CTerrorPlayer::OnStartBeingCarried

0x009beb20 · 791 bytes · __thiscall

_ZN13CTerrorPlayer19OnStartBeingCarriedEPS_

Decompiled

undefined (2 params)

/* CTerrorPlayer::OnStartBeingCarried(CTerrorPlayer*) */

void __thiscall CTerrorPlayer::OnStartBeingCarried(CTerrorPlayer *this,CTerrorPlayer *param_1)

{
  uint uVar1;
  uint uVar2;
  CBaseEdict *this_00;
  uint *puVar3;
  int iVar4;
  int *piVar5;
  int *piVar6;
  undefined *puVar7;
  int iVar8;
  longdouble lVar9;
  
  StopRevivingSomeone(this,false);
  StopBeingRevived(this,false);
  StopUseActions(this);
  StopBeingDragged(this);
  CancelStagger(this);
  CancelTug(this);
  uVar1 = *(uint *)(this + 0x33c4);
  if ((((uVar1 != 0xffffffff) &&
       (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) &&
     (*(CTerrorPlayer **)(puVar7 + 4) != (CTerrorPlayer *)0x0)) {
    ReleaseTongueVictim(*(CTerrorPlayer **)(puVar7 + 4),false);
  }
  uVar1 = *(uint *)(this + 0x3e68);
  if (((uVar1 != 0xffffffff) &&
      (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar7 + 8) == uVar1 >> 0xc &&
      (*(CTerrorPlayer **)(puVar7 + 4) != (CTerrorPlayer *)0x0)))) {
    OnPounceEnded(*(CTerrorPlayer **)(puVar7 + 4));
  }
  uVar1 = *(uint *)(this + 0x3ee0);
  if (((uVar1 != 0xffffffff) &&
      (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar7 + 8) == uVar1 >> 0xc &&
      (*(CTerrorPlayer **)(puVar7 + 4) != (CTerrorPlayer *)0x0)))) {
    OnRideEnded(*(CTerrorPlayer **)(puVar7 + 4),(CTerrorPlayer *)0x0);
  }
  *(undefined4 *)(param_1 + 0x3f00) = 0x3e4ccccd;
  lVar9 = (longdouble)CountdownTimer::Now();
  if ((float)lVar9 + 0.2 != *(float *)(param_1 + 0x3efc)) {
    (**(code **)(*(int *)(param_1 + 0x3ef4) + 4))(param_1 + 0x3ef4,param_1 + 0x3efc);
    *(float *)(param_1 + 0x3efc) = (float)lVar9 + 0.2;
  }
  if (*(float *)(param_1 + 0x3ef8) != 0.2) {
    (**(code **)(*(int *)(param_1 + 0x3ef4) + 4))(param_1 + 0x3ef4,param_1 + 0x3ef8);
    *(undefined4 *)(param_1 + 0x3ef8) = 0x3e4ccccd;
  }
  puVar3 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
  uVar1 = *puVar3;
  if (((uVar1 == 0xffffffff) ||
      (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
    iVar8 = 0;
  }
  else {
    iVar8 = *(int *)(puVar7 + 4);
  }
  uVar2 = *(uint *)(this + 0x2a4c);
  if (((uVar2 == 0xffffffff) ||
      (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(puVar7 + 4);
  }
  if (iVar8 != iVar4) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar8 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar8 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x2a4c) = uVar1;
  }
  piVar5 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
  if (piVar5 != (int *)0x0) {
    (**(code **)(*piVar5 + 0x6a0))(piVar5);
    (**(code **)(*piVar5 + 0x428))(piVar5,0);
    piVar6 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
    if ((piVar6 != (int *)0x0) && (piVar5 != piVar6)) {
      (**(code **)(*piVar6 + 0x428))(piVar6,0);
    }
  }
  (**(code **)(*(int *)this + 0x7fc))(this,0x4f,0);
  CBasePlayer::RumbleEffect((CBasePlayer *)this,'&','\0','\x04');
  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)