L L4D2node

CTransitioningPlayer::TransitionThink

0x00521c80 · 285 bytes · __thiscall

_ZN20CTransitioningPlayer15TransitionThinkEv

Decompiled

undefined (1 param)

/* CTransitioningPlayer::TransitionThink() */

void __thiscall CTransitioningPlayer::TransitionThink(CTransitioningPlayer *this)

{
  CBaseEdict *this_00;
  char cVar1;
  int iVar2;
  int iVar3;
  
  if ((*(float *)(gpGlobals + 0xc) < *(float *)(DirectorTransitionTimeout._28_4_ + 0x2c)) ||
     (cVar1 = (**(code **)(*engine + 0x48))(engine,*(undefined4 *)(this + 0x1a48)), cVar1 != '\0'))
  {
    iVar2 = UTIL_PlayerByUserId(*(int *)(this + 0x1a48));
    if (iVar2 == 0) {
      CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
      iVar2 = (**(code **)(*engine + 0x4c))(engine,*(undefined4 *)(this + 0x1a48));
      if (iVar2 == *(int *)(this + 0x1a58)) {
        return;
      }
      if (this[0x6c] == (CTransitioningPlayer)0x0) {
        this_00 = *(CBaseEdict **)(this + 0x30);
        if (this_00 != (CBaseEdict *)0x0) {
          *(uint *)this_00 = *(uint *)this_00 | 0x101;
          iVar3 = CBaseEdict::GetChangeAccessor(this_00);
          *(undefined2 *)(iVar3 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
      }
      *(int *)(this + 0x1a58) = iVar2;
      return;
    }
  }
  else {
    UTIL_LogPrintf("UserID %d (%s) has gone away - removing transition record\n",
                   *(undefined4 *)(this + 0x1a48),this + 0x1a60);
    RemoveTransitioningPlayerRecord(*(int *)(this + 0x1a48));
  }
  if (*(int *)(RemoveTransitioningPlayers._28_4_ + 0x30) == 0) {
    return;
  }
  UTIL_Remove((CBaseEntity *)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)