L L4D2node

TerrorNavArea::SpawnAttributeFromString

0x00975980 · 650 bytes · __cdecl

_ZN13TerrorNavArea24SpawnAttributeFromStringEPKc

Decompiled

undefined (1 param)

/* TerrorNavArea::SpawnAttributeFromString(char const*) */

undefined4 TerrorNavArea::SpawnAttributeFromString(char *param_1)

{
  int iVar1;
  
  if ((param_1 == "empty") || (iVar1 = _V_stricmp(param_1,"empty"), iVar1 == 0)) {
    return 2;
  }
  if (param_1 == "stop") {
    return 4;
  }
  iVar1 = _V_stricmp(param_1,"stop");
  if (iVar1 == 0) {
    return 4;
  }
  if ((param_1 == "finale") || (iVar1 = _V_stricmp(param_1,"finale"), iVar1 == 0)) {
    return 0x40;
  }
  if ((param_1 == "battlefield") || (iVar1 = _V_stricmp(param_1,"battlefield"), iVar1 == 0)) {
    return 0x100;
  }
  if ((param_1 == "player_start") || (iVar1 = _V_stricmp(param_1,"player_start"), iVar1 == 0)) {
    return 0x80;
  }
  if ((param_1 == "ignore_visibility") ||
     (iVar1 = _V_stricmp(param_1,"ignore_visibility"), iVar1 == 0)) {
    return 0x200;
  }
  if ((param_1 == "not_clearable") || (iVar1 = _V_stricmp(param_1,"not_clearable"), iVar1 == 0)) {
    return 0x400;
  }
  if ((param_1 != "checkpoint") && (iVar1 = _V_stricmp(param_1,"checkpoint"), iVar1 != 0)) {
    if ((param_1 == "obscured") || (iVar1 = _V_stricmp(param_1,"obscured"), iVar1 == 0)) {
      return 0x1000;
    }
    if ((param_1 == "no_mobs") || (iVar1 = _V_stricmp(param_1,"no_mobs"), iVar1 == 0)) {
      return 0x2000;
    }
    if ((param_1 == "threat") || (iVar1 = _V_stricmp(param_1,"threat"), iVar1 == 0)) {
      return 0x4000;
    }
    if ((param_1 != "nothreat") && (iVar1 = _V_stricmp(param_1,"nothreat"), iVar1 != 0)) {
      if ((param_1 == "lyingdown") || (iVar1 = _V_stricmp(param_1,"lyingdown"), iVar1 == 0)) {
        return 0x100000;
      }
      if ((param_1 != "rescue_closet") && (iVar1 = _V_stricmp(param_1,"rescue_closet"), iVar1 != 0))
      {
        if ((param_1 != "rescue_vehicle") &&
           (iVar1 = _V_stricmp(param_1,"rescue_vehicle"), iVar1 != 0)) {
          return 0;
        }
        return 0x8000;
      }
      return 0x10000;
    }
    return 0x80000;
  }
  return 0x800;
}

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)