L L4D2node

CTerrorPlayer::OnPouncedUpon

0x009bf4d0 · 1045 bytes · __thiscall

_ZN13CTerrorPlayer13OnPouncedUponEPS_

Decompiled

undefined (2 params)

/* CTerrorPlayer::OnPouncedUpon(CTerrorPlayer*) */

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

{
  uint uVar1;
  CBaseEdict *this_00;
  int iVar2;
  int *piVar3;
  int *piVar4;
  char *pcVar5;
  undefined *puVar6;
  int iVar7;
  longdouble lVar8;
  CAI_Concept local_4c [8];
  undefined4 local_44;
  undefined4 local_40;
  uint local_3c [11];
  
  if (*(uint *)(this + 0x2ba0) < 4) {
    *(int *)(this + *(uint *)(this + 0x2ba0) * 0x34 + 0x2f88) =
         *(int *)(this + *(uint *)(this + 0x2ba0) * 0x34 + 0x2f88) + 1;
  }
  CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_3c,param_1);
  if (((local_3c[0] == 0xffffffff) ||
      (puVar6 = g_pEntityList + (local_3c[0] & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar6 + 8) != local_3c[0] >> 0xc)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar6 + 4);
  }
  uVar1 = *(uint *)(this + 0x3e68);
  if (((uVar1 == 0xffffffff) ||
      (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)(puVar6 + 4);
  }
  if (iVar7 != iVar2) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x3e68) = local_3c[0];
  }
  lVar8 = (longdouble)IntervalTimer::Now();
  if ((float)lVar8 != *(float *)(this + 0x3ea0)) {
    (**(code **)(*(int *)(this + 0x3e9c) + 4))(this + 0x3e9c,this + 0x3ea0);
    *(float *)(this + 0x3ea0) = (float)lVar8;
  }
  piVar3 = (int *)CCSPlayer::GetActiveCSWeapon((CCSPlayer *)this);
  if (piVar3 != (int *)0x0) {
    (**(code **)(*piVar3 + 0x6a0))(piVar3);
    (**(code **)(*piVar3 + 0x428))(piVar3,0);
    piVar4 = (int *)CCSPlayer::GetActiveCSWeapon((CCSPlayer *)this);
    if ((piVar3 != piVar4) && (piVar4 != (int *)0x0)) {
      (**(code **)(*piVar4 + 0x428))(piVar4,0);
    }
  }
  uVar1 = *(uint *)(this + 0x3ee0);
  if ((((uVar1 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
     (*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)) {
    OnRideEnded(*(CTerrorPlayer **)(puVar6 + 4),(CTerrorPlayer *)0x0);
  }
  uVar1 = *(uint *)(this + 0x33c4);
  if (((uVar1 != 0xffffffff) &&
      (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar6 + 8) == uVar1 >> 0xc &&
      (*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)))) {
    ReleaseTongueVictim(*(CTerrorPlayer **)(puVar6 + 4),false);
  }
  uVar1 = *(uint *)(this + 0x2a4c);
  if (((uVar1 != 0xffffffff) &&
      (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar6 + 8) == uVar1 >> 0xc &&
      (*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)))) {
    OnCarryEnded(*(CTerrorPlayer **)(puVar6 + 4),true,false,false);
  }
  uVar1 = *(uint *)(this + 0x3e48);
  if ((((uVar1 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
     (*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)) {
    OnPummelEnded(*(CTerrorPlayer **)(puVar6 + 4),true,(CTerrorPlayer *)0x0);
  }
  StopRevivingSomeone(this,false);
  StopBeingRevived(this,false);
  StopUseActions(this);
  StopBeingDragged(this);
  (**(code **)(*(int *)(this + 0x3ab4) + 0xb4))(this + 0x3ab4);
  CancelStagger(this);
  CancelTug(this);
  (**(code **)(*(int *)param_1 + 0x7fc))(param_1,0x52,0);
  (**(code **)(*(int *)this + 0x7fc))(this,0x56,0);
  pcVar5 = (char *)SurvivorCharacterName(*(undefined4 *)(this + 0x2ba0));
  AI_CriteriaSet::AI_CriteriaSet((AI_CriteriaSet *)local_3c,"subject",pcVar5);
  local_44 = 0;
  local_40 = 0xffffffff;
                    /* try { // try from 009bf76c to 009bf7c0 has its CatchHandler @ 009bf909 */
  CAI_Concept::CAI_Concept(local_4c,"SurvivorWasPounced");
  CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,local_4c,
                      (AI_CriteriaSet *)local_3c,0.0,(CFollowupTargetSpec_t *)&local_44,
                      (CBaseEntity *)this);
  ElectHeroicSurvivorBot(this);
  CBasePlayer::RumbleEffect((CBasePlayer *)this,'-','\0','\x04');
  AI_CriteriaSet::~AI_CriteriaSet((AI_CriteriaSet *)local_3c);
  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)