L L4D2node

CParticleSystemQuery::GetLocalPlayerPos

0x00471b30 · 100 bytes · __thiscall

_ZN20CParticleSystemQuery17GetLocalPlayerPosEv

Decompiled

undefined (1 param)

/* CParticleSystemQuery::GetLocalPlayerPos() */

CParticleSystemQuery * __thiscall
CParticleSystemQuery::GetLocalPlayerPos(CParticleSystemQuery *this)

{
  undefined4 uVar1;
  int *piVar2;
  undefined4 *puVar3;
  
  if (*(int *)(gpGlobals + 0x14) < 2) {
    piVar2 = (int *)UTIL_GetLocalPlayer();
    if (piVar2 != (int *)0x0) {
      puVar3 = (undefined4 *)(**(code **)(*piVar2 + 0x288))(piVar2);
      *(undefined4 *)this = *puVar3;
      uVar1 = puVar3[2];
      *(undefined4 *)(this + 4) = puVar3[1];
      *(undefined4 *)(this + 8) = uVar1;
      return this;
    }
  }
  *(undefined4 *)this = vec3_origin;
  *(undefined4 *)(this + 4) = DAT_01053d4c;
  *(undefined4 *)(this + 8) = DAT_01053d50;
  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)