L L4D2node

CCSGameRules::CheckLevelInitialized

0x00434a80 · 588 bytes · __thiscall

_ZN12CCSGameRules21CheckLevelInitializedEv.part.88

Decompiled

undefined (1 param)

/* CCSGameRules::CheckLevelInitialized() [clone .part.88] */

void __thiscall CCSGameRules::CheckLevelInitialized(CCSGameRules *this)

{
  float fVar1;
  char cVar2;
  int *in_EAX;
  CBaseEntity *this_00;
  int iVar3;
  CBaseEntity *this_01;
  double dVar4;
  double dVar5;
  
  this_01 = (CBaseEntity *)0x0;
  in_EAX[0xa5] = 0;
  in_EAX[0xa6] = 0;
  while( true ) {
    this_01 = (CBaseEntity *)
              CGlobalEntityList::FindEntityByClassname
                        ((CGlobalEntityList *)gEntList,this_01,"info_player_terrorist");
    this_00 = (CBaseEntity *)0x0;
    if (this_01 == (CBaseEntity *)0x0) break;
    cVar2 = (**(code **)(*in_EAX + 0x124))();
    if (cVar2 == '\0') {
      if (((byte)this_01[0x14d] & 8) == 0) {
        dVar4 = (double)*(float *)(this_01 + 0x2e8);
        dVar5 = dVar4;
      }
      else {
        CBaseEntity::CalcAbsolutePosition(this_01);
        dVar4 = (double)*(float *)(this_01 + 0x2e8);
        dVar5 = dVar4;
        if (((byte)this_01[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition(this_01);
          fVar1 = *(float *)(this_01 + 0x2e8);
          dVar5 = (double)fVar1;
          if (((byte)this_01[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition(this_01);
          }
        }
      }
      Warning("Invalid terrorist spawnpoint at (%.1f,%.1f,%.1f)\n",
              (double)*(float *)(this_01 + 0x2e0),dVar5,dVar4);
    }
    else {
      in_EAX[0xa5] = in_EAX[0xa5] + 1;
    }
  }
  while (this_00 = (CBaseEntity *)
                   CGlobalEntityList::FindEntityByClassname
                             ((CGlobalEntityList *)gEntList,this_00,"info_zombie_spawn"),
        this_00 != (CBaseEntity *)0x0) {
    cVar2 = (**(code **)(*in_EAX + 0x124))();
    if (cVar2 == '\0') {
      if (((byte)this_00[0x14d] & 8) == 0) {
        dVar4 = (double)*(float *)(this_00 + 0x2e8);
        dVar5 = dVar4;
      }
      else {
        CBaseEntity::CalcAbsolutePosition(this_00);
        dVar4 = (double)*(float *)(this_00 + 0x2e8);
        dVar5 = dVar4;
        if (((byte)this_00[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition(this_00);
          fVar1 = *(float *)(this_00 + 0x2e8);
          dVar5 = (double)fVar1;
          if (((byte)this_00[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition(this_00);
          }
        }
      }
      Warning("Invalid counterterrorist spawnpoint at (%.1f,%.1f,%.1f)\n",
              (double)*(float *)(this_00 + 0x2e0),dVar5,dVar4);
    }
    else {
      in_EAX[0xa6] = in_EAX[0xa6] + 1;
    }
  }
  iVar3 = CGlobalEntityList::FindEntityByClassname
                    ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"info_player_logo");
  if ((iVar3 != 0) && (*(char *)((int)in_EAX + 0x252) != '\x01')) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    *(undefined1 *)((int)in_EAX + 0x252) = 1;
  }
  *(undefined1 *)((int)in_EAX + 0x255) = 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)