L L4D2node

CGameText::Display

0x006f2b70 · 253 bytes · __thiscall

_ZN9CGameText7DisplayEP11CBaseEntity

Decompiled

undefined (2 params)

/* CGameText::Display(CBaseEntity*) */

void __thiscall CGameText::Display(CGameText *this,CBaseEntity *param_1)

{
  char cVar1;
  char *pcVar2;
  CBasePlayer *pCVar3;
  
  if ((*(int *)(this + 0x440) != 0) &&
     (cVar1 = UTIL_IsMasterTriggered(*(undefined4 *)(this + 0x440),param_1), cVar1 == '\0')) {
    return;
  }
  if ((*(uint *)(this + 0x148) & 1) == 0) {
    if (*(int *)(gpGlobals + 0x14) == 1) {
      pCVar3 = (CBasePlayer *)UTIL_GetLocalPlayer();
      pcVar2 = "";
      if (*(char **)(this + 0x448) != (char *)0x0) {
        pcVar2 = *(char **)(this + 0x448);
      }
      UTIL_HudMessage(pCVar3,(hudtextparms_s *)(this + 0x44c),pcVar2);
    }
    else if ((param_1 != (CBaseEntity *)0x0) &&
            (cVar1 = (**(code **)(*(int *)param_1 + 0x170))(param_1), cVar1 != '\0')) {
      pcVar2 = "";
      if (*(char **)(this + 0x448) != (char *)0x0) {
        pcVar2 = *(char **)(this + 0x448);
      }
      cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
      if (cVar1 == '\0') {
        param_1 = (CBaseEntity *)0x0;
      }
      UTIL_HudMessage((CBasePlayer *)param_1,(hudtextparms_s *)(this + 0x44c),pcVar2);
    }
    return;
  }
  pcVar2 = "";
  if (*(char **)(this + 0x448) != (char *)0x0) {
    pcVar2 = *(char **)(this + 0x448);
  }
  UTIL_HudMessageAll((hudtextparms_s *)(this + 0x44c),pcVar2);
  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)