L L4D2node

FindPlayerStart

0x007af9f0 · 105 bytes · __cdecl

_Z15FindPlayerStartPKc

Decompiled

undefined (1 param)

/* FindPlayerStart(char const*) */

CBaseEntity * FindPlayerStart(char *param_1)

{
  CBaseEntity *pCVar1;
  CBaseEntity *pCVar2;
  
  pCVar1 = (CBaseEntity *)
           CGlobalEntityList::FindEntityByClassname
                     ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,param_1);
  if ((pCVar1 != (CBaseEntity *)0x0) && (pCVar2 = pCVar1, ((byte)pCVar1[0x148] & 1) == 0)) {
    while (pCVar2 = (CBaseEntity *)
                    CGlobalEntityList::FindEntityByClassname
                              ((CGlobalEntityList *)gEntList,pCVar2,param_1),
          pCVar2 != (CBaseEntity *)0x0) {
      if (((byte)pCVar2[0x148] & 1) != 0) {
        return pCVar2;
      }
    }
  }
  return pCVar1;
}

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)