L L4D2node

CTerrorPlayer::Deafen

0x00998e30 · 297 bytes · __thiscall

_ZN13CTerrorPlayer6DeafenEfff

Decompiled

undefined (4 params)

/* CTerrorPlayer::Deafen(float, float, float) */

void __thiscall CTerrorPlayer::Deafen(CTerrorPlayer *this,float param_1,float param_2,float param_3)

{
  int iVar1;
  undefined4 uVar2;
  longdouble lVar3;
  
  iVar1 = (**(code **)(*(int *)this + 0x648))(this);
  if ((iVar1 != 0) && (iVar1 = (**(code **)(*(int *)this + 0x648))(this), iVar1 != 4)) {
    return;
  }
  if (param_1 < param_3 * *(float *)(ZombieDeafenRadiusOne._28_4_ + 0x2c)) {
    uVar2 = 0x86;
  }
  else if (param_3 * *(float *)(ZombieDeafenRadiusTwo._28_4_ + 0x2c) <= param_1) {
    uVar2 = 0x88;
    if (param_3 * *(float *)(ZombieDeafenRadiusThree._28_4_ + 0x2c) <= param_1) {
      return;
    }
  }
  else {
    uVar2 = 0x87;
  }
  *(undefined4 *)(this + 0x3320) = uVar2;
  lVar3 = (longdouble)CountdownTimer::Now();
  if ((float)lVar3 + param_2 != *(float *)(this + 0x331c)) {
    (**(code **)(*(int *)(this + 0x3314) + 4))(this + 0x3314,this + 0x331c);
    *(float *)(this + 0x331c) = (float)lVar3 + param_2;
  }
  if (param_2 != *(float *)(this + 0x3318)) {
    (**(code **)(*(int *)(this + 0x3314) + 4))(this + 0x3314,this + 0x3318);
    *(float *)(this + 0x3318) = param_2;
  }
  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)