L L4D2node

GetMissionName

0x0051f800 · 206 bytes · unknown

_Z14GetMissionNamev

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* GetMissionName() */

undefined1 * GetMissionName(void)

{
  int iVar1;
  int iVar2;
  int iVar3;
  char *pcVar4;
  int iVar5;
  
  pcVar4 = "";
  if (*(char **)(gpGlobals + 0x3c) != (char *)0x0) {
    pcVar4 = *(char **)(gpGlobals + 0x3c);
  }
  V_strncpy(GetMissionName()::missionName,pcVar4,0x20);
  iVar1 = _V_strlen(GetMissionName()::missionName);
  if (3 < iVar1) {
    iVar5 = (int)(char)(&DAT_00fa955f)[iVar1];
    iVar2 = isalpha(iVar5);
    iVar3 = iVar1 + -1;
    if (iVar2 != 0) {
      (&DAT_00fa955f)[iVar1] = 0;
      iVar3 = iVar1 + -2;
      iVar5 = (int)(char)(&DAT_00fa955e)[iVar1];
      iVar1 = iVar1 + -1;
    }
    if (9 < iVar5 - 0x30U) {
      V_strncpy(GetMissionName()::missionName,pcVar4,0x20);
      return GetMissionName()::missionName;
    }
    GetMissionName()::missionName[iVar3] = 0;
    if ((int)(char)(&DAT_00fa955e)[iVar1] - 0x30U < 10) {
      (&DAT_00fa955e)[iVar1] = 0;
    }
  }
  return GetMissionName()::missionName;
}

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)