L L4D2node

warp_to_start_area

0x00900400 · 169 bytes · __cdecl

_ZL18warp_to_start_areaRK8CCommand

Decompiled

undefined (1 param)

/* warp_to_start_area(CCommand const&) */

void warp_to_start_area(CCommand *param_1)

{
  char cVar1;
  int *piVar2;
  int local_38;
  undefined1 local_34 [12];
  undefined1 local_28 [24];
  
  piVar2 = (int *)UTIL_GetCommandClient();
  if (piVar2 != (int *)0x0) {
    cVar1 = (**(code **)(*piVar2 + 0x16c))(piVar2);
    if (cVar1 != '\0') {
      cVar1 = GetPlayerSpawnPosition(piVar2[0xae8],local_34,local_28,&local_38);
      if ((cVar1 != '\0') && (local_38 != 0)) {
        (**(code **)(*piVar2 + 0x1dc))(piVar2,local_34,local_28,0);
        DevMsg("Start area is %d\n",*(undefined4 *)(local_38 + 0x8c));
        return;
      }
      Warning("warp_to_start_area: ERROR - Cannot determine start area\n");
      return;
    }
  }
  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)