L L4D2node

CGunTarget::Wait

0x006d8210 · 241 bytes · __thiscall

_ZN10CGunTarget4WaitEv

Decompiled

undefined (1 param)

/* CGunTarget::Wait() */

void __thiscall CGunTarget::Wait(CGunTarget *this)

{
  float fVar1;
  uint uVar2;
  int *piVar3;
  int iVar4;
  undefined *puVar5;
  longdouble lVar6;
  undefined4 local_20 [3];
  undefined4 local_14;
  undefined4 local_10;
  
  uVar2 = *(uint *)(this + 0x4bc);
  if ((((uVar2 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
     (piVar3 = *(int **)(puVar5 + 4), piVar3 != (int *)0x0)) {
    local_20[0] = 0;
    local_14 = 0xffffffff;
    local_10 = 0;
    (**(code **)(*piVar3 + 0xb4))(piVar3,"InPass",this,this,local_20,0);
    lVar6 = (longdouble)(**(code **)(*piVar3 + 0x150))(piVar3);
    fVar1 = (float)lVar6;
    *(float *)(this + 0x448) = fVar1;
    iVar4 = piVar3[0x3e];
    *(code **)(this + 0x14) = Next;
    *(undefined4 *)(this + 0x18) = 0;
    *(int *)(this + 0xf8) = iVar4;
    if (fVar1 != 0.0) {
      CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,fVar1);
      return;
    }
    Next(this);
    return;
  }
  Stop(this);
  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)