L L4D2node

CTerrorPlayer::GetSurvivorFlowCenter

0x009b3120 · 311 bytes · __thiscall

_ZN13CTerrorPlayer21GetSurvivorFlowCenterEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::GetSurvivorFlowCenter() */

CTerrorPlayer * __thiscall CTerrorPlayer::GetSurvivorFlowCenter(CTerrorPlayer *this)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float *pfVar5;
  float *pfVar6;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int *local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  int *local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  local_24 = 0xc61c3c00;
  local_20 = 2;
  local_1c = 0;
  local_18 = (int *)0x0;
  local_14 = 0;
  local_10 = 0;
  local_38 = 0x4e6e6b28;
  local_34 = 2;
  local_30 = 0;
  local_2c = (int *)0x0;
  local_28 = 0;
  ForEachTerrorPlayer<HighestFlowDistance>((HighestFlowDistance *)&local_24);
  ForEachTerrorPlayer<LowestFlowDistance>((LowestFlowDistance *)&local_38);
  if ((local_18 != (int *)0x0) && (local_2c != (int *)0x0)) {
    pfVar5 = (float *)(**(code **)(*local_2c + 0x288))(local_2c);
    pfVar6 = (float *)(**(code **)(*local_18 + 0x288))(local_18);
    fVar1 = pfVar5[1];
    fVar2 = pfVar5[2];
    fVar3 = pfVar6[1];
    fVar4 = pfVar6[2];
    *(float *)this = (*pfVar5 + *pfVar6) * 0.5;
    *(float *)(this + 4) = (fVar1 + fVar3) * 0.5;
    *(float *)(this + 8) = (fVar2 + fVar4) * 0.5;
    return this;
  }
  local_44 = vec3_origin;
  local_40 = DAT_01053d4c;
  local_3c = DAT_01053d50;
  GetPlayerSpawnPosition(8,&local_44,0,0);
  *(undefined4 *)this = local_44;
  *(undefined4 *)(this + 4) = local_40;
  *(undefined4 *)(this + 8) = local_3c;
  return this;
}

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)