L L4D2node

CCSGameRules::GetPlayerSpawnSpot

0x00435810 · 349 bytes · __thiscall

_ZN12CCSGameRules18GetPlayerSpawnSpotEP11CBasePlayer

Decompiled

undefined (2 params)

/* CCSGameRules::GetPlayerSpawnSpot(CBasePlayer*) */

CBaseEntity * __thiscall CCSGameRules::GetPlayerSpawnSpot(CCSGameRules *this,CBasePlayer *param_1)

{
  code *pcVar1;
  float fVar2;
  float fVar3;
  CBaseEntity *this_00;
  int iVar4;
  int iVar5;
  CBaseEntity local_28 [24];
  
  this_00 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0x698))(param_1);
  iVar4 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
  iVar4 = iVar4 + 0x18;
  iVar5 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
  if (((byte)this_00[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(this_00);
  }
  DropToGround(local_28,(Vector *)param_1,(Vector *)(this_00 + 0x2e0),(Vector *)(iVar5 + 0xc));
  pcVar1 = *(code **)(*(int *)param_1 + 0x1dc);
  if (((byte)this_00[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(this_00);
  }
  (*pcVar1)(param_1,(Vector *)(this_00 + 0x2e0),this_00 + 0x3a8,&vec3_origin,iVar4);
  fVar3 = DAT_01053d44;
  fVar2 = DAT_01053d40;
  if (((vec3_angle != *(float *)(param_1 + 0x1ab0)) ||
      (DAT_01053d40 != *(float *)(param_1 + 0x1ab4))) ||
     (DAT_01053d44 != *(float *)(param_1 + 0x1ab8))) {
    (**(code **)(*(int *)(param_1 + 0x1a40) + 4))(param_1 + 0x1a40,param_1 + 0x1ab0);
    *(float *)(param_1 + 0x1ab0) = vec3_angle;
    *(float *)(param_1 + 0x1ab4) = fVar2;
    *(float *)(param_1 + 0x1ab8) = fVar3;
  }
  return this_00;
}

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)