L L4D2node

CAI_Expresser::NoteSpeaking

0x005d2760 · 463 bytes · __thiscall

_ZN13CAI_Expresser12NoteSpeakingEff

Decompiled

undefined (3 params)

/* CAI_Expresser::NoteSpeaking(float, float) */

void __thiscall CAI_Expresser::NoteSpeaking(CAI_Expresser *this,float param_1,float param_2)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  float *pfVar4;
  float *pfVar5;
  CBaseEntity *pCVar6;
  undefined4 uVar7;
  undefined *puVar8;
  float fVar9;
  double dVar10;
  float local_10;
  
  local_10 = param_2 + param_1;
  (**(code **)(**(int **)(this + 4) + 4))(*(int **)(this + 4));
  if (local_10 <= 0.0) {
    dVar10 = 0.0;
    local_10 = 0.0;
    fVar9 = *(float *)(gpGlobals + 0xc) + 3.0;
    *(float *)(this + 0x2c) = fVar9;
  }
  else {
    fVar9 = *(float *)(gpGlobals + 0xc) + local_10;
    dVar10 = (double)local_10;
    *(float *)(this + 0x2c) = fVar9;
  }
  puVar8 = g_pEntityList;
  uVar1 = *(uint *)(this + 0x40);
  pCVar6 = (CBaseEntity *)0x0;
  *(float *)(this + 0x30) = fVar9 - param_2;
  if (((uVar1 != 0xffffffff) &&
      (puVar8 = puVar8 + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
    pCVar6 = *(CBaseEntity **)(puVar8 + 4);
  }
  SpeechMsg(this,pCVar6,"NoteSpeaking( %f, %f ) (stop at %f)\n",dVar10,(double)param_2,(double)fVar9
           );
  cVar3 = (**(code **)(**(int **)(this + 4) + 8))(*(int **)(this + 4));
  if (cVar3 != '\0') {
    uVar1 = *(uint *)(this + 0x40);
    uVar7 = 0;
    if (((uVar1 != 0xffffffff) &&
        (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
      uVar7 = *(undefined4 *)(puVar8 + 4);
    }
    pfVar4 = (float *)GetMySpeechSemaphore((CBaseEntity *)this);
    if (pfVar4 != (float *)0x0) {
      uVar1 = *(uint *)(this + 0x40);
      if (((uVar1 == 0xffffffff) ||
          (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) {
        *pfVar4 = local_10 + *(float *)(gpGlobals + 0xc);
      }
      else {
        piVar2 = *(int **)(puVar8 + 4);
        *pfVar4 = local_10 + *(float *)(gpGlobals + 0xc);
        if (piVar2 != (int *)0x0) {
          pfVar5 = (float *)(**(code **)(*piVar2 + 0xc))(piVar2,uVar7);
          pfVar4[1] = *pfVar5;
          return;
        }
      }
      pfVar4[1] = -NAN;
    }
  }
  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)