L L4D2node

CBaseMultiplayerPlayer::EscortScoringThink

0x0062c920 · 341 bytes · __thiscall

_ZN22CBaseMultiplayerPlayer18EscortScoringThinkEv

Decompiled

undefined (1 param)

/* CBaseMultiplayerPlayer::EscortScoringThink() */

void __thiscall CBaseMultiplayerPlayer::EscortScoringThink(CBaseMultiplayerPlayer *this)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  float fVar4;
  float fVar5;
  undefined1 local_24 [20];
  
  fVar4 = *(float *)(this + 0x236c) + 0.1;
  *(float *)(this + 0x236c) = fVar4;
  piVar1 = gameeventmanager;
  if (0.0 < *(float *)(this + 0x2370)) {
    iVar3 = 0;
    fVar5 = 1.0 / *(float *)(this + 0x2370);
    if (fVar5 <= fVar4) {
      do {
        fVar4 = fVar4 - fVar5;
        iVar3 = iVar3 + 1;
      } while (fVar5 <= fVar4);
      *(float *)(this + 0x236c) = fVar4;
      piVar1 = (int *)(**(code **)(*piVar1 + 0x1c))(piVar1,"player_escort_score",0,0);
      if (piVar1 != (int *)0x0) {
        if (*(int *)(this + 0x30) == 0) {
          iVar2 = 0;
        }
        else {
          iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
        }
        (**(code **)(*piVar1 + 0x30))(piVar1,"player",iVar2);
        (**(code **)(*piVar1 + 0x30))(piVar1,"points",iVar3);
        (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar1,1);
      }
    }
  }
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)EscortScoringThink);
  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)