L L4D2node

CSharpshooterAwardTemplate::CheckAndAwardSharpshooter

0x0085e4a0 · 148 bytes · __thiscall

_ZN26CSharpshooterAwardTemplate25CheckAndAwardSharpshooterEv

Decompiled

undefined (1 param)

/* CSharpshooterAwardTemplate::CheckAndAwardSharpshooter() */

void __thiscall
CSharpshooterAwardTemplate::CheckAndAwardSharpshooter(CSharpshooterAwardTemplate *this)

{
  float fVar1;
  
  CAwardTemplate::GetOwner((CAwardTemplate *)this);
  if ((*(int *)(this + 0x10) < 0x32) ||
     (fVar1 = (float)*(int *)(this + 0x14) / (float)*(int *)(this + 0x10), fVar1 < 0.75)) {
    this[0x1c] = (CSharpshooterAwardTemplate)0x1;
    this[0x1d] = (CSharpshooterAwardTemplate)0x1;
  }
  else if (fVar1 < 0.9) {
    (**(code **)(*(int *)this + 0x14))(this,10,0);
    this[0x1d] = (CSharpshooterAwardTemplate)0x1;
  }
  else {
    (**(code **)(*(int *)this + 0x14))(this,0xb);
  }
  *(undefined4 *)(this + 0x10) = 0;
  *(undefined4 *)(this + 0x14) = 0;
  *(undefined4 *)(this + 0x18) = 0xbf800000;
  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)