L L4D2node

CTerrorPlayer::OnPursuedBy

0x00998630 · 300 bytes · __thiscall

_ZN13CTerrorPlayer11OnPursuedByEP8INextBot

Decompiled

undefined (2 params)

/* CTerrorPlayer::OnPursuedBy(INextBot*) */

void __thiscall CTerrorPlayer::OnPursuedBy(CTerrorPlayer *this,INextBot *param_1)

{
  float fVar1;
  char cVar2;
  CBaseCombatCharacter *this_00;
  int iVar3;
  code *pcVar4;
  char *pcVar5;
  CAI_Concept local_24 [20];
  
  fVar1 = *(float *)(gpGlobals + 0xc);
  if (*(float *)(this + 0x3fa8) <= fVar1 && fVar1 != *(float *)(this + 0x3fa8)) {
    return;
  }
  *(float *)(this + 0x3fa8) = fVar1 + 1.0;
  this_00 = (CBaseCombatCharacter *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
  if (this_00 == (CBaseCombatCharacter *)0x0) {
    return;
  }
  iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this_00);
  if ((iVar3 == 3) && (iVar3 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar3 == 7)) {
    cVar2 = IsRunningAway(this_00,this);
    if (cVar2 == '\0') {
      return;
    }
    pcVar4 = *(code **)(*(int *)this + 0x7b4);
    pcVar5 = "ChasedByWitch";
  }
  else {
    iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this_00);
    if (iVar3 != 3) {
      return;
    }
    iVar3 = (**(code **)(*(int *)this_00 + 0x544))(this_00);
    if (iVar3 != 8) {
      return;
    }
    cVar2 = IsRunningAway(this_00,this);
    if (cVar2 == '\0') {
      return;
    }
    pcVar4 = *(code **)(*(int *)this + 0x7b4);
    pcVar5 = "ChasedByTank";
  }
  CAI_Concept::CAI_Concept(local_24,pcVar5);
  (*pcVar4)(this,local_24,1,0,0,0,0);
  *(float *)(this + 0x3fa8) = *(float *)(this + 0x3fa8) + 9.0;
  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)