L L4D2node

CTransitioningPlayer::CTransitioningPlayer

0x00521ed0 · 414 bytes · __thiscall

_ZN20CTransitioningPlayerC2Ev

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CTransitioningPlayer::CTransitioningPlayer() */

void __thiscall CTransitioningPlayer::CTransitioningPlayer(CTransitioningPlayer *this)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  CBaseCombatCharacter::CBaseCombatCharacter((CBaseCombatCharacter *)this);
  *(undefined ***)this = &PTR__CTransitioningPlayer_00c2efa8;
  iVar1 = DAT_00fa9a14;
  this[0x1a44] = (CTransitioningPlayer)0x0;
  *(undefined4 *)(this + 0x1a40) = 0x2a;
  iVar4 = DAT_00fa9a0c;
  *(undefined ***)(this + 0x1a3c) = &PTR__CTransitioningPlayer_00c2f51c;
  iVar3 = iVar1 + 1;
  if ((iVar3 <= iVar4) || (DAT_00fa9a10 < 0)) goto LAB_00521f20;
  if (DAT_00fa9a10 == 0) {
    if (iVar4 == 0) {
      if (iVar3 < 9) {
        DAT_00fa9a0c = 8;
        goto LAB_00521fd7;
      }
      iVar4 = 8;
    }
    do {
      DAT_00fa9a0c = iVar4 * 2;
      if (iVar3 <= DAT_00fa9a0c) break;
      DAT_00fa9a0c = iVar4 * 4;
      iVar4 = DAT_00fa9a0c;
    } while (DAT_00fa9a0c < iVar3);
  }
  else {
    for (DAT_00fa9a0c = (iVar1 / DAT_00fa9a10 + 1) * DAT_00fa9a10; DAT_00fa9a0c < iVar3;
        DAT_00fa9a0c = (DAT_00fa9a0c + iVar3) / 2) {
    }
  }
LAB_00521fd7:
  if (g_TransitioningPlayers == (void *)0x0) {
    g_TransitioningPlayers = malloc(DAT_00fa9a0c << 2);
  }
  else {
    g_TransitioningPlayers = realloc(g_TransitioningPlayers,DAT_00fa9a0c << 2);
    iVar3 = DAT_00fa9a14 + 1;
  }
LAB_00521f20:
  iVar5 = iVar1 * 4;
  iVar4 = (iVar3 - iVar1) + -1;
  DAT_00fa9a14 = iVar3;
  _DAT_00fa9a18 = g_TransitioningPlayers;
  if (0 < iVar4) {
    _V_memmove((void *)((int)g_TransitioningPlayers + iVar5 + 4),
               (void *)((int)g_TransitioningPlayers + iVar5),iVar4 * 4);
  }
  if ((undefined4 *)(iVar5 + (int)g_TransitioningPlayers) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)g_TransitioningPlayers) = this;
  }
  piVar2 = gameeventmanager;
  this[0x1a44] = (CTransitioningPlayer)0x1;
                    /* try { // try from 00521f6c to 0052202f has its CatchHandler @ 00522084 */
  (**(code **)(*piVar2 + 0x10))(piVar2,this + 0x1a3c,"player_transitioned",1);
  piVar2 = gameeventmanager;
  this[0x1a44] = (CTransitioningPlayer)0x1;
  (**(code **)(*piVar2 + 0x10))(piVar2,this + 0x1a3c,"player_disconnect",1);
  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)