L L4D2node

CCheckpointCompleteAwardTemplate::CheckAndAwardCheckpointAwards

0x0084cd20 · 365 bytes · __thiscall

_ZN32CCheckpointCompleteAwardTemplate29CheckAndAwardCheckpointAwardsEv

Decompiled

undefined (1 param)

/* CCheckpointCompleteAwardTemplate::CheckAndAwardCheckpointAwards() */

void __thiscall
CCheckpointCompleteAwardTemplate::CheckAndAwardCheckpointAwards
          (CCheckpointCompleteAwardTemplate *this)

{
  char cVar1;
  CTerrorPlayer *this_00;
  int iVar2;
  int *piVar3;
  
  this_00 = (CTerrorPlayer *)CAwardTemplate::GetOwner((CAwardTemplate *)this);
  cVar1 = (**(code **)(*(int *)this_00 + 300))(this_00);
  if (((cVar1 == '\0') || (cVar1 = CTerrorPlayer::WasSpawnedAtCheckpoint(this_00), cVar1 == '\0'))
     || (this[0x12] != (CCheckpointCompleteAwardTemplate)0x0)) {
    this[0x16] = (CCheckpointCompleteAwardTemplate)0x1;
    this[0x17] = (CCheckpointCompleteAwardTemplate)0x1;
    this[0x18] = (CCheckpointCompleteAwardTemplate)0x1;
  }
  else if (this[0x11] == (CCheckpointCompleteAwardTemplate)0x0) {
    if (this[0x10] == (CCheckpointCompleteAwardTemplate)0x0) {
      (**(code **)(*(int *)this + 0x14))(this,9,0);
    }
    else {
      (**(code **)(*(int *)this + 0x14))(this,8);
      this[0x16] = (CCheckpointCompleteAwardTemplate)0x1;
    }
  }
  else {
    (**(code **)(*(int *)this + 0x14))(this,7,0);
    this[0x16] = (CCheckpointCompleteAwardTemplate)0x1;
    this[0x17] = (CCheckpointCompleteAwardTemplate)0x1;
  }
  iVar2 = GetGlobalTeam(2);
  if (iVar2 != 0) {
    piVar3 = (int *)GetGlobalTeam(2);
    iVar2 = (**(code **)(*piVar3 + 0x354))(piVar3);
    if (iVar2 == 1) {
      return;
    }
  }
  if (this[0x15] == (CCheckpointCompleteAwardTemplate)0x0) {
    if (this[0x14] == (CCheckpointCompleteAwardTemplate)0x0) {
      if (this[0x13] != (CCheckpointCompleteAwardTemplate)0x0) {
        (**(code **)(*(int *)this + 0x14))(this,0x48,0);
        this[0x19] = (CCheckpointCompleteAwardTemplate)0x1;
        return;
      }
      (**(code **)(*(int *)this + 0x14))(this,0x49);
    }
    else {
      (**(code **)(*(int *)this + 0x14))(this,0x47,0);
      this[0x19] = (CCheckpointCompleteAwardTemplate)0x1;
      this[0x1a] = (CCheckpointCompleteAwardTemplate)0x1;
    }
    return;
  }
  this[0x19] = (CCheckpointCompleteAwardTemplate)0x1;
  this[0x1a] = (CCheckpointCompleteAwardTemplate)0x1;
  this[0x1b] = (CCheckpointCompleteAwardTemplate)0x1;
  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)