Xonotic
all.qh File Reference
#include <common/command/_mod.qh>
#include <common/constants.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include <common/sounds/sound.qh>
#include <common/weapons/all.qh>
#include "all.inc"
+ Include dependency graph for all.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ACVNN(name)   autocvar_notification_##name
 
#define APP_NUM(num, prefix)   ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL)
 
#define APP_TEAM_NUM(num, prefix)   ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK)))
 
#define BOLD_OPERATOR   "^BOLD"
 
#define DEFAULT_FILENAME   "notifications_dump.cfg"
 
#define EIGHT_VARS_TO_VARARGS_VARLIST
 
#define KILL_SPREE_LIST
 
#define MSG_ANNCE_NOTIF(name, defaultvalue, sound, channel, volume, position)
 
#define MSG_ANNCE_NOTIF_(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position)
 
#define MSG_ANNCE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position)   MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, defaultvalue, sound, channel, volume, position)
 
#define MSG_CENTER_NOTIF(name, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle)
 
#define MSG_CENTER_NOTIF_(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle)
 
#define MSG_CENTER_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle)   MSG_CENTER_NOTIF_(teamnum, CENTER_##name, CENTER_##cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle)
 
#define MSG_CHOICE_NOTIF(name, defaultvalue, challow, chtype, optiona, optionb)
 
#define MSG_CHOICE_NOTIF_(teamnum, name, cvarname, defaultvalue, challow, chtype, optiona, optionb)
 
#define MSG_CHOICE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, challow, chtype, optiona, optionb)   MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, defaultvalue, challow, chtype, optiona, optionb)
 
#define MSG_INFO_NOTIF(name, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle)
 
#define MSG_INFO_NOTIF_(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle)
 
#define MSG_INFO_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle)   MSG_INFO_NOTIF_(teamnum, INFO_##name, INFO_##cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle)
 
#define MSG_MULTI_NOTIF(name, defaultvalue, anncename, infoname, centername)
 
#define MULTIICON_INFO(name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)   MULTIICON_INFO_(INFO_##name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)
 
#define MULTIICON_INFO_(name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)
 
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)   float autocvar_notification_##name = defaultvalue;
 
#define NOTIF_ARGUMENT_LIST
 
#define NOTIF_HIT_MAX(count, funcname)
 
#define NOTIF_HIT_UNKNOWN(token, funcname)   { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; }
 
#define SPREE_ITEM(counta, countb, center, normal, gentle)   case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
 

Typedefs

using Notification = entity
 always last More...
 

Functions

string BUFF_NAME (int i)
 
void Create_Notification_Entity (entity notif, float var_default, float var_cvar, MSG typeId, string namestring, int teamnum)
 
void Create_Notification_Entity_Annce (entity notif, float var_cvar, string namestring, float channel, string snd, float vol, float position)
 
void Create_Notification_Entity_Choice (entity notif, float var_cvar, string namestring, float challow_def, float challow_var, MSG chtype, Notification optiona, Notification optionb)
 
void Create_Notification_Entity_InfoCenter (entity notif, float var_cvar, string namestring, int strnum, int flnum, string args, string hudargs, string icon, CPID cpid, string durcnt, string normal, string gentle)
 
void Create_Notification_Entity_Multi (entity notif, float var_cvar, string namestring, Notification anncename, Notification infoname, Notification centername)
 
void Destroy_All_Notifications ()
 
void Dump_Notifications (int fh, bool alsoprint)
 used to output notifications.cfg file More...
 
 GENERIC_COMMAND (dumpnotifs, "Dump all notifications into " DEFAULT_FILENAME, false)
 
string Get_Notif_CvarName (Notification notif)
 
Notification Get_Notif_Ent (MSG net_type, int net_name)
 
string Get_Notif_TypeName (MSG net_type)
 main types/groups of notifications More...
 
void Local_Notification (MSG net_type, Notification net_name,...count)
 
void Local_Notification_WOVA (MSG net_type, Notification net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4)
 glue for networking, forwards to Local_Notification More...
 
string notif_arg_item_wepammo (float f1, float f2)
 
string notif_arg_spree_inf (float type, string input, string player, float spree)
 
 REGISTRY_BEGIN (Notifications)
 
 REGISTRY_END (Notifications)
 
 REGISTRY_SORT (Notifications)
 
 STATIC_INIT (Notifications)
 
 STATIC_INIT_LATE (Notif_Choices)
 

Variables

const float ARG_CS = 4
 
const float ARG_CS_SV = 3
 
const float ARG_CS_SV_DC = 2
 
const float ARG_CS_SV_HA = 1
 
const float ARG_DC = 6
 
string arg_slot [NOTIF_MAX_ARGS]
 
const float ARG_SV = 5
 
float autocvar_notification_allow_chatboxprint = 0
 
float autocvar_notification_errors_are_fatal = true
 
float autocvar_notification_item_centerprinttime = 1.5
 
float autocvar_notification_show_location = false
 
string autocvar_notification_show_location_string = ""
 
float autocvar_notification_show_sprees = true
 
float autocvar_notification_show_sprees_center = true
 
float autocvar_notification_show_sprees_center_specialonly = true
 
float autocvar_notification_show_sprees_info = 3
 
float autocvar_notification_show_sprees_info_newline = true
 
float autocvar_notification_show_sprees_info_specialonly = true
 
int msg_choice_choices [NOTIF_CHOICE_MAX]
 
string nent_args
 
float nent_challow_def
 
float nent_challow_var
 
int nent_channel
 
int nent_choice_count = 0
 
int nent_choice_idx
 
entity nent_client
 
CPID nent_cpid
 
int nent_default
 
string nent_durcnt
 
bool nent_enabled
 
int nent_floatcount
 
float nent_floats [4]
 
string nent_hudargs
 
string nent_icon
 
string nent_iconargs
 
entity nent_msgannce
 
entity nent_msgcenter
 
entity nent_msginfo
 
string nent_name
 
float nent_net_name
 
MSG nent_net_type
 
entity nent_optiona
 
entity nent_optionb
 
float nent_position
 
string nent_snd
 
string nent_string
 
int nent_stringcount
 
string nent_strings [4]
 
int nent_teamnum
 
MSG nent_type
 
float nent_vol
 
const int NOTIF_CHOICE_MAX = 20
 
bool notif_error
 
bool notif_global_error
 
const float NOTIF_MAX_ARGS = 7
 
const float NOTIF_MAX_DURCNT = 2
 
const float NOTIF_MAX_HUDARGS = 2
 

Macro Definition Documentation

◆ ACVNN

#define ACVNN (   name)    autocvar_notification_##name

Definition at line 700 of file all.qh.

◆ APP_NUM

#define APP_NUM (   num,
  prefix 
)    ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL)

◆ APP_TEAM_NUM

◆ BOLD_OPERATOR

#define BOLD_OPERATOR   "^BOLD"

Definition at line 12 of file all.qh.

Referenced by centerprint_Add().

◆ DEFAULT_FILENAME

#define DEFAULT_FILENAME   "notifications_dump.cfg"

Definition at line 164 of file all.qh.

Referenced by GENERIC_COMMAND().

◆ EIGHT_VARS_TO_VARARGS_VARLIST

#define EIGHT_VARS_TO_VARARGS_VARLIST
Value:
VARITEM(1, 0, s1) \
VARITEM(2, 0, XPD(s1, s2)) \
VARITEM(3, 0, XPD(s1, s2, s3)) \
VARITEM(4, 0, XPD(s1, s2, s3, s4)) \
VARITEM(0, 1, f1) \
VARITEM(1, 1, XPD(s1, f1)) \
VARITEM(2, 1, XPD(s1, s2, f1)) \
VARITEM(3, 1, XPD(s1, s2, s3, f1)) \
VARITEM(4, 1, XPD(s1, s2, s3, s4, f1)) \
VARITEM(0, 2, XPD(f1, f2)) \
VARITEM(1, 2, XPD(s1, f1, f2)) \
VARITEM(2, 2, XPD(s1, s2, f1, f2)) \
VARITEM(3, 2, XPD(s1, s2, s3, f1, f2)) \
VARITEM(4, 2, XPD(s1, s2, s3, s4, f1, f2)) \
VARITEM(0, 3, XPD(f1, f2, f3)) \
VARITEM(1, 3, XPD(s1, f1, f2, f3)) \
VARITEM(2, 3, XPD(s1, s2, f1, f2, f3)) \
VARITEM(3, 3, XPD(s1, s2, s3, f1, f2, f3)) \
VARITEM(4, 3, XPD(s1, s2, s3, s4, f1, f2, f3)) \
VARITEM(0, 4, XPD(f1, f2, f3, f4)) \
VARITEM(1, 4, XPD(s1, f1, f2, f3, f4)) \
VARITEM(2, 4, XPD(s1, s2, f1, f2, f3, f4)) \
VARITEM(3, 4, XPD(s1, s2, s3, f1, f2, f3, f4)) \
VARITEM(4, 4, XPD(s1, s2, s3, s4, f1, f2, f3, f4))
#define VARITEM(stringc, floatc, args)
spree_inf s1 s2 s3loc s2 s1
Definition: all.inc:265
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1 f1points s1 s2
Definition: all.inc:438
#define XPD(...)
Definition: util.qh:188
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1
Definition: all.inc:654
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1 f1points f2
Definition: all.inc:348

Definition at line 88 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ KILL_SPREE_LIST

#define KILL_SPREE_LIST
Value:
SPREE_ITEM(3, 03, _("TRIPLE FRAG! "), _("%s^K1 made a TRIPLE FRAG! %s^BG"), _("%s^K1 made a TRIPLE SCORE! %s^BG")) \
SPREE_ITEM(5, 05, _("RAGE! "), _("%s^K1 unlocked RAGE! %s^BG"), _("%s^K1 made FIVE SCORES IN A ROW! %s^BG")) \
SPREE_ITEM(10, 10, _("MASSACRE! "), _("%s^K1 started a MASSACRE! %s^BG"), _("%s^K1 made TEN SCORES IN A ROW! %s^BG")) \
SPREE_ITEM(15, 15, _("MAYHEM! "), _("%s^K1 executed MAYHEM! %s^BG"), _("%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG")) \
SPREE_ITEM(20, 20, _("BERSERKER! "), _("%s^K1 is a BERSERKER! %s^BG"), _("%s^K1 made TWENTY SCORES IN A ROW! %s^BG")) \
SPREE_ITEM(25, 25, _("CARNAGE! "), _("%s^K1 inflicts CARNAGE! %s^BG"), _("%s^K1 made TWENTY FIVE SCORES IN A ROW! %s^BG")) \
SPREE_ITEM(30, 30, _("ARMAGEDDON! "), _("%s^K1 unleashes ARMAGEDDON! %s^BG"), _("%s^K1 made THIRTY SCORES IN A ROW! %s^BG"))
#define SPREE_ITEM(counta, countb, center, normal, gentle)

Definition at line 454 of file all.qh.

Referenced by notif_arg_spree_inf(), and Obituary().

◆ MSG_ANNCE_NOTIF

#define MSG_ANNCE_NOTIF (   name,
  defaultvalue,
  sound,
  channel,
  volume,
  position 
)
Value:
NOTIF_ADD_AUTOCVAR(ANNCE_##name, defaultvalue) \
MSG_ANNCE_NOTIF_(0, ANNCE_##name, ANNCE_##name, defaultvalue, sound, channel, volume, position)
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)
Definition: all.qh:302
#define sound(e, c, s, v, a)
Definition: sound.qh:52
float volume
Definition: triggers.qh:47

Definition at line 751 of file all.qh.

◆ MSG_ANNCE_NOTIF_

#define MSG_ANNCE_NOTIF_ (   teamnum,
  name,
  cvarname,
  defaultvalue,
  sound,
  channel,
  volume,
  position 
)
Value:
REGISTER(Notifications, name, m_id, new_pure(msg_annce_notification)) { \
Create_Notification_Entity (this, defaultvalue, ACVNN(cvarname), MSG_ANNCE, strtoupper(#name), teamnum); \
Create_Notification_Entity_Annce(this, ACVNN(cvarname), strtoupper(#name), \
channel, /* channel */ \
sound, /* snd */ \
volume, /* vol */ \
position); /* position */ \
}
#define REGISTER(...)
Register a new entity with a registry.
Definition: registry.qh:87
int m_id
Definition: effect.qh:19
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define sound(e, c, s, v, a)
Definition: sound.qh:52
#define ACVNN(name)
Definition: all.qh:700
float volume
Definition: triggers.qh:47

Definition at line 755 of file all.qh.

◆ MSG_ANNCE_NOTIF_TEAM

#define MSG_ANNCE_NOTIF_TEAM (   teamnum,
  name,
  cvarname,
  defaultvalue,
  sound,
  channel,
  volume,
  position 
)    MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, defaultvalue, sound, channel, volume, position)

Definition at line 748 of file all.qh.

◆ MSG_CENTER_NOTIF

#define MSG_CENTER_NOTIF (   name,
  defaultvalue,
  strnum,
  flnum,
  args,
  cpid,
  durcnt,
  normal,
  gentle 
)
Value:
NOTIF_ADD_AUTOCVAR(CENTER_##name, defaultvalue) \
MSG_CENTER_NOTIF_(0, CENTER_##name, CENTER_##name, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle)
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)
Definition: all.qh:302

Definition at line 806 of file all.qh.

◆ MSG_CENTER_NOTIF_

#define MSG_CENTER_NOTIF_ (   teamnum,
  name,
  cvarname,
  defaultvalue,
  strnum,
  flnum,
  args,
  cpid,
  durcnt,
  normal,
  gentle 
)
Value:
REGISTER(Notifications, name, m_id, new_pure(msg_center_notification)) { \
Create_Notification_Entity (this, defaultvalue, ACVNN(cvarname), MSG_CENTER, strtoupper(#name), teamnum); \
Create_Notification_Entity_InfoCenter(this, ACVNN(cvarname), strtoupper(#name), strnum, flnum, \
args, /* args */ \
"", /* hudargs */ \
"", /* icon */ \
cpid, /* cpid */ \
durcnt, /* durcnt */ \
normal, /* normal */ \
gentle); /* gentle */ \
}
#define REGISTER(...)
Register a new entity with a registry.
Definition: registry.qh:87
int m_id
Definition: effect.qh:19
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define ACVNN(name)
Definition: all.qh:700

Definition at line 810 of file all.qh.

◆ MSG_CENTER_NOTIF_TEAM

#define MSG_CENTER_NOTIF_TEAM (   teamnum,
  name,
  cvarname,
  defaultvalue,
  strnum,
  flnum,
  args,
  cpid,
  durcnt,
  normal,
  gentle 
)    MSG_CENTER_NOTIF_(teamnum, CENTER_##name, CENTER_##cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle)

Definition at line 803 of file all.qh.

◆ MSG_CHOICE_NOTIF

#define MSG_CHOICE_NOTIF (   name,
  defaultvalue,
  challow,
  chtype,
  optiona,
  optionb 
)
Value:
NOTIF_ADD_AUTOCVAR(CHOICE_##name, defaultvalue) \
NOTIF_ADD_AUTOCVAR(CHOICE_##name##_ALLOWED, challow) \
MSG_CHOICE_NOTIF_(0, CHOICE_##name, CHOICE_##name, defaultvalue, challow, chtype, optiona, optionb)
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)
Definition: all.qh:302

Definition at line 836 of file all.qh.

◆ MSG_CHOICE_NOTIF_

#define MSG_CHOICE_NOTIF_ (   teamnum,
  name,
  cvarname,
  defaultvalue,
  challow,
  chtype,
  optiona,
  optionb 
)
Value:
REGISTER(Notifications, name, m_id, new_pure(msg_choice_notification)) { \
this.nent_choice_idx = nent_choice_count; \
if (!teamnum || teamnum == NUM_TEAM_4) \
nent_choice_count++; \
Create_Notification_Entity (this, defaultvalue, ACVNN(cvarname), MSG_CHOICE, strtoupper(#name), teamnum); \
Create_Notification_Entity_Choice(this, ACVNN(cvarname), strtoupper(#name), \
challow, /* challow_def */ \
autocvar_notification_##cvarname##_ALLOWED, /* challow_var */ \
chtype, /* chtype */ \
optiona, /* optiona */ \
optionb); /* optionb */ \
}
#define REGISTER(...)
Register a new entity with a registry.
Definition: registry.qh:87
int m_id
Definition: effect.qh:19
int nent_choice_count
Definition: all.qh:713
const int NUM_TEAM_4
Definition: teams.qh:21
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define ACVNN(name)
Definition: all.qh:700

Definition at line 841 of file all.qh.

◆ MSG_CHOICE_NOTIF_TEAM

#define MSG_CHOICE_NOTIF_TEAM (   teamnum,
  name,
  cvarname,
  defaultvalue,
  challow,
  chtype,
  optiona,
  optionb 
)    MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, defaultvalue, challow, chtype, optiona, optionb)

Definition at line 833 of file all.qh.

◆ MSG_INFO_NOTIF

#define MSG_INFO_NOTIF (   name,
  defaultvalue,
  strnum,
  flnum,
  args,
  hudargs,
  icon,
  normal,
  gentle 
)
Value:
NOTIF_ADD_AUTOCVAR(INFO_##name, defaultvalue) \
MSG_INFO_NOTIF_(0, INFO_##name, INFO_##name, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle)
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)
Definition: all.qh:302

Definition at line 768 of file all.qh.

◆ MSG_INFO_NOTIF_

#define MSG_INFO_NOTIF_ (   teamnum,
  name,
  cvarname,
  defaultvalue,
  strnum,
  flnum,
  args,
  hudargs,
  icon,
  normal,
  gentle 
)
Value:
REGISTER(Notifications, name, m_id, new_pure(msg_info_notification)) { \
Create_Notification_Entity (this, defaultvalue, ACVNN(cvarname), MSG_INFO, strtoupper(#name), teamnum); \
Create_Notification_Entity_InfoCenter(this, ACVNN(cvarname), strtoupper(#name), strnum, flnum, \
args, /* args */ \
hudargs, /* hudargs */ \
icon, /* icon */ \
CPID_Null,/* cpid */ \
"", /* durcnt */ \
normal, /* normal */ \
gentle); /* gentle */ \
}
#define REGISTER(...)
Register a new entity with a registry.
Definition: registry.qh:87
spree_cen s1 CPID_Null
Definition: all.inc:583
int m_id
Definition: effect.qh:19
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define ACVNN(name)
Definition: all.qh:700

Definition at line 772 of file all.qh.

◆ MSG_INFO_NOTIF_TEAM

#define MSG_INFO_NOTIF_TEAM (   teamnum,
  name,
  cvarname,
  defaultvalue,
  strnum,
  flnum,
  args,
  hudargs,
  icon,
  normal,
  gentle 
)    MSG_INFO_NOTIF_(teamnum, INFO_##name, INFO_##cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle)

Definition at line 765 of file all.qh.

◆ MSG_MULTI_NOTIF

#define MSG_MULTI_NOTIF (   name,
  defaultvalue,
  anncename,
  infoname,
  centername 
)
Value:
NOTIF_ADD_AUTOCVAR(name, defaultvalue) \
REGISTER(Notifications, name, m_id, new_pure(msg_multi_notification)) { \
Create_Notification_Entity (this, defaultvalue, ACVNN(name), MSG_MULTI, strtoupper(#name), 0); \
Create_Notification_Entity_Multi(this, ACVNN(name), strtoupper(#name), \
anncename, /* anncename */ \
infoname, /* infoname */ \
centername); /* centername */ \
}
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)
Definition: all.qh:302
int m_id
Definition: effect.qh:19
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define ACVNN(name)
Definition: all.qh:700

Definition at line 823 of file all.qh.

◆ MULTIICON_INFO

#define MULTIICON_INFO (   name,
  defaultvalue,
  strnum,
  flnum,
  args,
  hudargs,
  iconargs,
  icon,
  normal,
  gentle 
)    MULTIICON_INFO_(INFO_##name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)

Definition at line 786 of file all.qh.

◆ MULTIICON_INFO_

#define MULTIICON_INFO_ (   name,
  defaultvalue,
  strnum,
  flnum,
  args,
  hudargs,
  iconargs,
  icon,
  normal,
  gentle 
)
Value:
NOTIF_ADD_AUTOCVAR(name, defaultvalue) \
REGISTER(Notifications, name, m_id, new_pure(msg_info_notification)) { \
Create_Notification_Entity (this, defaultvalue, ACVNN(name), MSG_INFO, strtoupper(#name), 0); \
Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
args, /* args */ \
hudargs, /* hudargs */ \
icon, /* icon */ \
CPID_Null,/* cpid */ \
"", /* durcnt */ \
normal, /* normal */ \
gentle); /* gentle */ \
this.nent_iconargs = iconargs; \
}
#define NOTIF_ADD_AUTOCVAR(name, defaultvalue)
Definition: all.qh:302
spree_cen s1 CPID_Null
Definition: all.inc:583
int m_id
Definition: effect.qh:19
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define ACVNN(name)
Definition: all.qh:700

Definition at line 788 of file all.qh.

◆ NOTIF_ADD_AUTOCVAR

#define NOTIF_ADD_AUTOCVAR (   name,
  defaultvalue 
)    float autocvar_notification_##name = defaultvalue;

Definition at line 302 of file all.qh.

◆ NOTIF_ARGUMENT_LIST

#define NOTIF_ARGUMENT_LIST

Definition at line 403 of file all.qh.

Referenced by Local_Notification_sprintf(), and Process_Notif_Args().

◆ NOTIF_HIT_MAX

#define NOTIF_HIT_MAX (   count,
  funcname 
)
Value:
if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } \
MACRO_END
#define backtrace(msg)
Definition: log.qh:105
float count
Definition: powerups.qc:22
if(IS_DEAD(this))
Definition: impulse.qc:92

Definition at line 448 of file all.qh.

Referenced by Local_Notification_sprintf().

◆ NOTIF_HIT_UNKNOWN

#define NOTIF_HIT_UNKNOWN (   token,
  funcname 
)    { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; }

Definition at line 452 of file all.qh.

Referenced by Local_Notification_sprintf().

◆ SPREE_ITEM

#define SPREE_ITEM (   counta,
  countb,
  center,
  normal,
  gentle 
)    case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }

Typedef Documentation

◆ Notification

always last

Definition at line 82 of file all.qh.

Function Documentation

◆ BUFF_NAME()

string BUFF_NAME ( int  i)

Definition at line 3 of file buffs.qc.

References Buff::m_color, Buff::m_name, REGISTRY_GET, REPLICATE(), rgb_to_hexcolor(), and strcat().

4 {
5  Buff b = REGISTRY_GET(StatusEffect, i);
6  return strcat(rgb_to_hexcolor(b.m_color), b.m_name);
7 }
#define REGISTRY_GET(id, i)
Definition: registry.qh:43
string m_name
Definition: buffs.qh:27
Definition: buffs.qh:20
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
ERASEABLE string rgb_to_hexcolor(vector rgb)
Definition: color.qh:183
vector m_color
Definition: buffs.qh:26
+ Here is the call graph for this function:

◆ Create_Notification_Entity()

void Create_Notification_Entity ( entity  notif,
float  var_default,
float  var_cvar,
MSG  typeId,
string  namestring,
int  teamnum 
)

Definition at line 396 of file all.qc.

References LOG_INFOF, notif_error, notif_global_error, and strzone().

402 {
403  // =====================
404  // Global Entity Setup
405  // =====================
406  notif.nent_default = var_default;
407  notif.nent_enabled = (var_cvar >= 1);
408  notif.nent_type = typeId;
409  notif.nent_name = strzone(namestring);
410  notif.nent_teamnum = teamnum;
411 
412  // Other pre-notif-setup requisites
413  notif_error = false;
414 
415  switch (typeId)
416  {
417  case MSG_ANNCE:
418  case MSG_INFO:
419  case MSG_CENTER:
420  case MSG_MULTI:
421  case MSG_CHOICE:
422  break;
423  default:
424  LOG_INFOF(
425  (
426  "^1NOTIFICATION WITH IMPROPER TYPE: "
427  "^7net_type = %d, net_name = %s."
428  ),
429  typeId,
430  namestring
431  );
432  notif_error = true;
433  break;
434  }
435 
436  // now check to see if any errors happened
437  if (notif_error)
438  {
439  notif.nent_enabled = false; // disable the notification so it can't cause trouble
440  notif_global_error = true; // throw the red flag that an error happened on init
441  }
442 }
bool notif_error
Definition: all.qh:717
#define LOG_INFOF(...)
Definition: log.qh:71
bool notif_global_error
Definition: all.qh:718
+ Here is the call graph for this function:

◆ Create_Notification_Entity_Annce()

void Create_Notification_Entity_Annce ( entity  notif,
float  var_cvar,
string  namestring,
float  channel,
string  snd,
float  vol,
float  position 
)

Definition at line 446 of file all.qc.

References AnnouncerFilename, Get_Notif_TypeName(), LOG_INFOF, notif_error, precache_sound(), and strzone().

454  {
455  // Set MSG_ANNCE information and handle precaching
456  #ifdef CSQC
457  MSG typeId = MSG_ANNCE;
458  if (!(GENTLE && (var_cvar == 1)))
459  {
460  if(snd != "")
461  {
462  if(notif.nent_enabled)
463  {
465  notif.nent_channel = channel;
466  notif.nent_snd = strzone(snd);
467  notif.nent_vol = vol;
468  notif.nent_position = position;
469  }
470  }
471  else
472  {
473  string typestring = Get_Notif_TypeName(typeId);
474  LOG_INFOF(
475  (
476  "^1NOTIFICATION WITH NO SOUND: "
477  "^7net_type = %s, net_name = %s."
478  ),
479  typestring,
480  namestring
481  );
482  notif_error = true;
483  }
484  }
485  else { notif.nent_enabled = false; }
486  #else
487  notif.nent_enabled = false;
488  #endif
489 
490  }
bool notif_error
Definition: all.qh:717
string Get_Notif_TypeName(MSG net_type)
main types/groups of notifications
Definition: all.qh:30
#define LOG_INFOF(...)
Definition: log.qh:71
#define AnnouncerFilename(snd)
Definition: all.qc:444
+ Here is the call graph for this function:

◆ Create_Notification_Entity_Choice()

void Create_Notification_Entity_Choice ( entity  notif,
float  var_cvar,
string  namestring,
float  challow_def,
float  challow_var,
MSG  chtype,
Notification  optiona,
Notification  optionb 
)

Definition at line 702 of file all.qc.

References entity(), FOREACH, Get_Notif_TypeName(), LOG_INFOF, max(), notif_error, and NUM_TEAM_1.

711  {
712  MSG typeId = MSG_CHOICE;
713  if (chtype == MSG_Null || !optiona || !optionb)
714  {
715  string typestring = Get_Notif_TypeName(typeId);
716  LOG_INFOF(
717  (
718  "^1NOTIFICATION IS MISSING CHOICE PARAMS: "
719  "^7net_type = %s, net_name = %s."
720  ),
721  typestring,
722  namestring
723  );
724  notif_error = true;
725  }
726  else
727  {
728  notif.nent_optiona = optiona;
729  notif.nent_optionb = optionb;
730  notif.nent_challow_def = challow_def; // 0: never allowed, 1: allowed in warmup, 2: always allowed
731  notif.nent_challow_var = challow_var; // 0: never allowed, 1: allowed in warmup, 2: always allowed
732  notif.nent_stringcount = max(notif.nent_optiona.nent_stringcount, notif.nent_optionb.nent_stringcount);
733  notif.nent_floatcount = max(notif.nent_optiona.nent_floatcount, notif.nent_optionb.nent_floatcount);
734 
735  /*#ifdef NOTIFICATIONS_DEBUG
736  Debug_Notification(sprintf(
737  "Create_Notification_Entity(...): MSG_CHOICE: %s\n%s\n%s\n",
738  notif.nent_name,
739  sprintf(
740  "^ optiona: %s %s : %d %d",
741  Get_Notif_TypeName(notif.nent_optiona.nent_type),
742  notif.nent_optiona.nent_name,
743  notif.nent_optiona.nent_stringcount,
744  notif.nent_optiona.nent_floatcount
745  ),
746  sprintf(
747  "^ optionb: %s %s : %d %d",
748  Get_Notif_TypeName(notif.nent_optionb.nent_type),
749  notif.nent_optionb.nent_name,
750  notif.nent_optionb.nent_stringcount,
751  notif.nent_optionb.nent_floatcount
752  )
753  ));
754  #endif*/
755  }
756  }
bool notif_error
Definition: all.qh:717
string Get_Notif_TypeName(MSG net_type)
main types/groups of notifications
Definition: all.qh:30
#define LOG_INFOF(...)
Definition: log.qh:71
+ Here is the call graph for this function:

◆ Create_Notification_Entity_InfoCenter()

void Create_Notification_Entity_InfoCenter ( entity  notif,
float  var_cvar,
string  namestring,
int  strnum,
int  flnum,
string  args,
string  hudargs,
string  icon,
CPID  cpid,
string  durcnt,
string  normal,
string  gentle 
)

Definition at line 492 of file all.qc.

References CPID_Null, Get_Notif_TypeName(), LOG_INFOF, LOG_WARNF, notif_error, Process_Notif_Args(), server_is_dedicated, SET_NOTIF_STRING, and strzone().

505  {
506  MSG typeId = notif.nent_type;
507  // Set MSG_INFO and MSG_CENTER string/float counts
508  notif.nent_stringcount = strnum;
509  notif.nent_floatcount = flnum;
510 
511  // Only initialize arguments if we're either a client or on a dedicated server
512  #ifdef SVQC
513  float should_process_args = server_is_dedicated;
514  #else
515  float should_process_args = true;
516  #endif
517  string typestring = Get_Notif_TypeName(typeId);
518  if(should_process_args)
519  {
520  // ========================
521  // Process Main Arguments
522  // ========================
523  if(strnum + flnum)
524  {
525  if(args != "")
526  {
527  notif.nent_args = strzone(
528  Process_Notif_Args(1, args, typestring, namestring));
529  }
530  else if((hudargs == "") && (durcnt ==""))
531  {
532  LOG_INFOF(
533  (
534  "^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: "
535  "^7net_type = %s, net_name = %s, strnum = %d, flnum = %d"
536  ),
537  typestring,
538  namestring,
539  strnum,
540  flnum
541  );
542  notif_error = true;
543  }
544  }
545  else if(args != "")
546  {
547  notif.nent_args = strzone(
548  Process_Notif_Args(1, args, typestring, namestring));
549  }
550 
551 
552  // =======================================
553  // Process HUD and Centerprint Arguments
554  // Only processed on CSQC, as these
555  // args are only for HUD features.
556  // =======================================
557  #ifdef CSQC
558  if(hudargs != "")
559  {
560  notif.nent_hudargs = strzone(
561  Process_Notif_Args(2, hudargs, typestring, namestring));
562 
563  if(icon != "") { notif.nent_icon = strzone(icon); }
564  else
565  {
566  LOG_INFOF(
567  (
568  "^1NOTIFICATION HAS HUDARGS BUT NO ICON: "
569  "^7net_type = %s, net_name = %s."
570  ),
571  typestring,
572  namestring
573  );
574  notif_error = true;
575  }
576  }
577  else if(icon != "")
578  {
579  LOG_WARNF(
580  (
581  "^1NOTIFICATION HAS ICON BUT NO HUDARGS: "
582  "^7net_type = %s, net_name = %s.\n"
583  ),
584  typestring,
585  namestring
586  );
587  notif_error = true;
588  }
589 
590  if (durcnt != "")
591  {
592  notif.nent_durcnt = strzone(Process_Notif_Args(3, durcnt, typestring, namestring));
593 
594  if (cpid == CPID_Null && durcnt != "0 0")
595  {
596  LOG_WARNF(
597  (
598  "Notification has durcnt but no cpid: "
599  "net_type = %s, net_name = %s."
600  ),
601  typestring,
602  namestring
603  );
604  notif_error = true;
605  }
606  }
607  notif.nent_cpid = cpid;
608  #endif
609 
610 
611  // ======================
612  // Process Notif String
613  // ======================
614  #define SET_NOTIF_STRING(string,stringname) MACRO_BEGIN \
615  notif.nent_string = strzone(CCR( \
616  Process_Notif_Line( \
617  typeId, \
618  (var_cvar > 1), \
619  string, \
620  typestring, \
621  namestring, \
622  stringname \
623  )) \
624  ); \
625  MACRO_END
626 
627  if(GENTLE)
628  {
629  if(gentle != "") { SET_NOTIF_STRING(gentle, "GENTLE"); }
630  else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL"); }
631  }
632  else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL"); }
633  #undef SET_NOTIF_STRING
634 
635  // Check to make sure a string was chosen
636  if(notif.nent_string == "")
637  {
638  LOG_INFOF(
639  (
640  "^1EMPTY NOTIFICATION: "
641  "^7net_type = %s, net_name = %s."
642  ),
643  typestring,
644  namestring
645  );
646  notif_error = true;
647  }
648  }
649  }
bool notif_error
Definition: all.qh:717
#define LOG_WARNF(...)
Definition: log.qh:67
spree_cen s1 CPID_Null
Definition: all.inc:583
#define SET_NOTIF_STRING(string, stringname)
string Get_Notif_TypeName(MSG net_type)
main types/groups of notifications
Definition: all.qh:30
#define LOG_INFOF(...)
Definition: log.qh:71
string Process_Notif_Args(float arg_type, string args, string notiftype, string notifname)
Definition: all.qc:219
bool server_is_dedicated
Definition: world.qh:37
+ Here is the call graph for this function:

◆ Create_Notification_Entity_Multi()

void Create_Notification_Entity_Multi ( entity  notif,
float  var_cvar,
string  namestring,
Notification  anncename,
Notification  infoname,
Notification  centername 
)

Definition at line 651 of file all.qc.

References Get_Notif_TypeName(), LOG_INFOF, max(), and notif_error.

658  {
659  MSG typeId = MSG_MULTI;
660  // Set MSG_MULTI string/float counts
661  if (!anncename && !infoname && !centername)
662  {
663  string typestring = Get_Notif_TypeName(typeId);
664  LOG_INFOF(
665  (
666  "^1NOTIFICATION WITH NO SUBCALLS: "
667  "^7net_type = %s, net_name = %s."
668  ),
669  typestring,
670  namestring
671  );
672  notif_error = true;
673  }
674  else
675  {
676  // announcements don't actually need any arguments, so lets not even count them.
677  if (anncename) { notif.nent_msgannce = anncename; }
678 
679  float infoname_stringcount = 0, infoname_floatcount = 0;
680  float centername_stringcount = 0, centername_floatcount = 0;
681 
682  if (infoname)
683  {
684  notif.nent_msginfo = infoname;
685  infoname_stringcount = notif.nent_msginfo.nent_stringcount;
686  infoname_floatcount = notif.nent_msginfo.nent_floatcount;
687  }
688 
689  if (centername)
690  {
691  notif.nent_msgcenter = centername;
692  centername_stringcount = notif.nent_msgcenter.nent_stringcount;
693  centername_floatcount = notif.nent_msgcenter.nent_floatcount;
694  }
695 
696  // set the requirements of THIS notification to the totals of its subcalls
697  notif.nent_stringcount = max(infoname_stringcount, centername_stringcount);
698  notif.nent_floatcount = max(infoname_floatcount, centername_floatcount);
699  }
700  }
bool notif_error
Definition: all.qh:717
string Get_Notif_TypeName(MSG net_type)
main types/groups of notifications
Definition: all.qh:30
#define LOG_INFOF(...)
Definition: log.qh:71
+ Here is the call graph for this function:

◆ Destroy_All_Notifications()

void Destroy_All_Notifications ( )

Definition at line 159 of file all.qc.

References centerprint_KillAll(), CPID_Null, Destroy_Notification_Entity(), FOREACH, and NULL.

Referenced by GenericCommand_restartnotifs().

160 {
161  // kill all networked notifications and centerprints
162  #ifdef SVQC
163  Kill_Notification(NOTIF_ALL, NULL, MSG_Null, CPID_Null);
164  #else
166  #endif
167 
168  // kill all real notification entities
169  FOREACH(Notifications, true, { Destroy_Notification_Entity(it); });
170 }
void Destroy_Notification_Entity(entity notif)
Definition: all.qc:147
spree_cen s1 CPID_Null
Definition: all.inc:583
#define NULL
Definition: post.qh:17
void centerprint_KillAll()
Definition: centerprint.qc:137
#define FOREACH(list, cond, body)
Definition: iter.qh:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Dump_Notifications()

void Dump_Notifications ( int  fh,
bool  alsoprint 
)

used to output notifications.cfg file

Definition at line 781 of file all.qc.

References FOREACH, NOTIF_WRITE, NOTIF_WRITE_HARDCODED, and NUM_TEAM_1.

Referenced by GENERIC_COMMAND().

782 {
783  #define NOTIF_WRITE(str) write_String_To_File(fh, str, alsoprint)
784 
785  #define NOTIF_WRITE_ENTITY(e, description) \
786  NOTIF_WRITE(sprintf( \
787  "seta notification_%s \"%d\" \"%s\"\n", \
788  Get_Notif_CvarName(e), e.nent_default, description \
789  ))
790 
791  #define NOTIF_WRITE_ENTITY_CHOICE(e, descriptiona, descriptionb) \
792  NOTIF_WRITE(sprintf( \
793  "seta notification_%s \"%d\" \"%s\"\n" \
794  "seta notification_%s_ALLOWED \"%d\" \"%s\"\n", \
795  Get_Notif_CvarName(e), e.nent_default, descriptiona, \
796  Get_Notif_CvarName(e), e.nent_challow_def, descriptionb \
797  ))
798 
799  #define NOTIF_WRITE_HARDCODED(cvar, default, description) \
800  NOTIF_WRITE("seta notification_" cvar " \"" default "\" \"" description "\"\n")
801 
802  // Note: This warning only applies to the notifications.cfg file that is output...
803  // You ARE supposed to manually edit this function to add i.e. hard coded
804  // notification variables for mutators or game modes or such and then
805  // regenerate the notifications.cfg file from the new code.
806 
807  NOTIF_WRITE(
808  "// ********************************************** //\n"
809  "// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n"
810  "// ** ** //\n"
811  "// ** This file is automatically generated ** //\n"
812  "// ** by code with the command 'dumpnotifs'. ** //\n"
813  "// ** ** //\n"
814  "// ** If you add a new notification, please ** //\n"
815  "// ** regenerate this file with that command ** //\n"
816  "// ** making sure that the output matches ** //\n"
817  "// ** with the lists and defaults in code. ** //\n"
818  "// ** ** //\n"
819  "// ********************************************** //\n");
820 
821  // These notifications will also append their string as a comment...
822  // This is not necessary, and does not matter if they vary between config versions,
823  // it is just a semi-helpful tool for those who want to manually change their user settings.
824 
825  int NOTIF_ANNCE_COUNT = 0;
826  int NOTIF_INFO_COUNT = 0;
827  int NOTIF_CENTER_COUNT = 0;
828  int NOTIF_MULTI_COUNT = 0;
829  int NOTIF_CHOICE_COUNT = 0;
830  FOREACH(Notifications, true, {
831  switch (it.nent_type)
832  {
833  case MSG_ANNCE: ++NOTIF_ANNCE_COUNT; break;
834  case MSG_INFO: ++NOTIF_INFO_COUNT; break;
835  case MSG_CENTER: ++NOTIF_CENTER_COUNT; break;
836  case MSG_MULTI: ++NOTIF_MULTI_COUNT; break;
837  case MSG_CHOICE: ++NOTIF_CHOICE_COUNT; break;
838  }
839  });
840 
841  NOTIF_WRITE(sprintf("\n// MSG_ANNCE notifications (count = %d):\n", NOTIF_ANNCE_COUNT));
842  FOREACH(Notifications, it.nent_type == MSG_ANNCE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
843  NOTIF_WRITE_ENTITY(it,
844  "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
845  );
846  });
847 
848  NOTIF_WRITE(sprintf("\n// MSG_INFO notifications (count = %d):\n", NOTIF_INFO_COUNT));
849  FOREACH(Notifications, it.nent_type == MSG_INFO && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
850  NOTIF_WRITE_ENTITY(it,
851  "0 = off, 1 = print to console, "
852  "2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
853  );
854  });
855 
856  NOTIF_WRITE(sprintf("\n// MSG_CENTER notifications (count = %d):\n", NOTIF_CENTER_COUNT));
857  FOREACH(Notifications, it.nent_type == MSG_CENTER && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
858  NOTIF_WRITE_ENTITY(it,
859  "0 = off, 1 = centerprint"
860  );
861  });
862 
863  NOTIF_WRITE(sprintf("\n// MSG_MULTI notifications (count = %d):\n", NOTIF_MULTI_COUNT));
864  FOREACH(Notifications, it.nent_type == MSG_MULTI && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
865  NOTIF_WRITE_ENTITY(it,
866  "Enable this multiple notification"
867  );
868  });
869 
870  NOTIF_WRITE(sprintf("\n// MSG_CHOICE notifications (count = %d):\n", NOTIF_CHOICE_COUNT));
871  FOREACH(Notifications, it.nent_type == MSG_CHOICE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
872  NOTIF_WRITE_ENTITY_CHOICE(it,
873  "Choice for this notification 0 = off, 1 = default message, 2 = verbose message",
874  "Allow choice for this notification 0 = off, 1 = only in warmup mode, 2 = always"
875  );
876  });
877 
878  // edit these to match whichever cvars are used for specific notification options
879  NOTIF_WRITE("\n// HARD CODED notification variables:\n");
880 
882  "allow_chatboxprint", "1",
883  "Allow INFO notifications to be printed to chat box "
884  "0 = do not allow, "
885  "1 = allow only if allowed by individual notification_INFO* cvars, "
886  "2 = force all INFO notifications to be printed to the chatbox"
887  );
888 
890  "debug", "0",
891  "Print extra debug information on all notification function calls "
892  "(Requires -DNOTIFICATIONS_DEBUG flag to be enabled on QCSRC compilation)... "
893  "0 = disabled, 1 = dprint, 2 = print"
894  );
895 
897  "errors_are_fatal", "1",
898  "If a notification fails upon initialization, cause a Host_Error to stop the program"
899  );
900 
902  "item_centerprinttime", "1.5",
903  "How long to show item information centerprint messages (like 'You got the Electro' or such)"
904  );
905 
907  "lifetime_mapload", "10",
908  "Amount of time that notification entities last immediately at mapload (in seconds) "
909  "to help prevent notifications from being lost on early init (like gamestart countdown)"
910  );
911 
913  "lifetime_runtime", "0.5",
914  "Amount of time that notification entities last on the server during runtime (In seconds)"
915  );
916 
918  "server_allows_location", "1",
919  "Server side cvar for allowing death messages to show location information too"
920  );
921 
923  "show_location", "0",
924  "Append location information to MSG_INFO death/kill messages"
925  );
926 
928  "show_location_string", "",
929  "Replacement string piped into sprintf, "
930  "so you can do different messages like this: ' at the %s' or ' (near %s)'"
931  );
932 
934  "show_sprees", "1",
935  "Print information about sprees in death/kill messages"
936  );
937 
939  "show_sprees_center", "1",
940  "Show spree information in MSG_CENTER messages... "
941  "0 = off, 1 = target (but only for first victim) and attacker"
942  );
943 
945  "show_sprees_center_specialonly", "1",
946  "Don't show spree information in MSG_CENTER messages if it isn't an achievement"
947  );
948 
950  "show_sprees_info", "3",
951  "Show spree information in MSG_INFO messages... "
952  "0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker"
953  );
954 
956  "show_sprees_info_newline", "1",
957  "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
958  );
959 
961  "show_sprees_info_specialonly", "1",
962  "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
963  );
964 
965  NOTIF_WRITE(sprintf(
966  (
967  "\n// Notification counts (total = %d): "
968  "MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d\n"
969  ),
970  (
971  NOTIF_ANNCE_COUNT +
972  NOTIF_INFO_COUNT +
973  NOTIF_CENTER_COUNT +
974  NOTIF_MULTI_COUNT +
975  NOTIF_CHOICE_COUNT
976  ),
977  NOTIF_ANNCE_COUNT,
978  NOTIF_INFO_COUNT,
979  NOTIF_CENTER_COUNT,
980  NOTIF_MULTI_COUNT,
981  NOTIF_CHOICE_COUNT
982  ));
983  #undef NOTIF_WRITE_HARDCODED
984  #undef NOTIF_WRITE_ENTITY
985  #undef NOTIF_WRITE
986 }
#define NOTIF_WRITE(str)
#define NOTIF_WRITE_HARDCODED(cvar, default, description)
const int NUM_TEAM_1
Definition: teams.qh:18
#define FOREACH(list, cond, body)
Definition: iter.qh:19
+ Here is the caller graph for this function:

◆ GENERIC_COMMAND()

GENERIC_COMMAND ( dumpnotifs  ,
"Dump all notifications into "  DEFAULT_FILENAME,
false   
)

Definition at line 166 of file all.qh.

References argv(), CASE, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, count, DEFAULT_FILENAME, Dump_Notifications(), entity(), ENUMCLASS, ENUMCLASS_END, f1, f2, fclose(), FILE_WRITE, fopen(), IL_NEW, Local_Notification(), Local_Notification_WOVA(), LOG_HELP, LOG_HELPF, LOG_INFO, LOG_INFOF, LOG_TRACE, LOG_WARNF, s1, s2, and STATIC_INIT().

167 {
168  switch (request)
169  {
170  case CMD_REQUEST_COMMAND:
171  {
172  #ifdef GAMEQC
173  string filename = argv(1);
174  bool alsoprint = false;
175  if (filename == "")
176  {
177  filename = DEFAULT_FILENAME;
178  alsoprint = false;
179  }
180  else if (filename == "-")
181  {
182  filename = DEFAULT_FILENAME;
183  alsoprint = true;
184  }
185  int fh = fopen(filename, FILE_WRITE);
186  if (fh >= 0)
187  {
188  Dump_Notifications(fh, alsoprint);
189  LOG_INFOF("Dumping notifications... File located in ^2data/data/%s^7.", filename);
190  fclose(fh);
191  }
192  else
193  {
194  LOG_INFOF("^1Error: ^7Could not open file '%s'!", filename);
195  }
196  #else
197  LOG_INFO("Notification dump command only works with cl_cmd and sv_cmd.");
198  #endif
199  return;
200  }
201  default:
202  case CMD_REQUEST_USAGE:
203  {
204  LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [<filename>]");
205  LOG_HELPF(" Where <filename> is the file to write (default is %s),", DEFAULT_FILENAME);
206  LOG_HELP(" if supplied with '-' output to console as well as default,");
207  LOG_HELP(" if left blank, it will only write to default.");
208  return;
209  }
210  }
211 }
#define LOG_HELPF(...)
Definition: log.qh:96
void Dump_Notifications(int fh, bool alsoprint)
used to output notifications.cfg file
Definition: all.qc:781
const int CMD_REQUEST_USAGE
Definition: command.qh:4
#define LOG_HELP(...)
Definition: log.qh:95
#define DEFAULT_FILENAME
Definition: all.qh:164
#define LOG_INFOF(...)
Definition: log.qh:71
const int CMD_REQUEST_COMMAND
Definition: command.qh:3
#define LOG_INFO(...)
Definition: log.qh:70
const float FILE_WRITE
Definition: csprogsdefs.qc:233
+ Here is the call graph for this function:

◆ Get_Notif_CvarName()

string Get_Notif_CvarName ( Notification  notif)

Definition at line 727 of file all.qh.

References Static_Team_ColorName(), strlen(), and substring().

Referenced by Local_Notification().

728 {
729  if(!notif.nent_teamnum)
730  return notif.nent_name;
731  return substring(notif.nent_name, 0, -strlen(Static_Team_ColorName(notif.nent_teamnum)) - 2);
732 }
string Static_Team_ColorName(int teamid)
Definition: teams.qh:103
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Get_Notif_Ent()

Notification Get_Notif_Ent ( MSG  net_type,
int  net_name 
)

Definition at line 734 of file all.qh.

References Get_Notif_TypeName(), LOG_WARNF, NULL, and REGISTRY_GET.

Referenced by Local_Notification_WOVA().

735 {
736  Notification it = REGISTRY_GET(Notifications, net_name);
737  if (it.nent_type != net_type) {
738  LOG_WARNF("Get_Notif_Ent(%s (%d), %s (%d)): Improper net type '%s'!",
739  Get_Notif_TypeName(net_type), net_type,
740  it.registered_id, net_name,
741  Get_Notif_TypeName(it.nent_type)
742  );
743  return NULL;
744  }
745  return it;
746 }
#define REGISTRY_GET(id, i)
Definition: registry.qh:43
#define LOG_WARNF(...)
Definition: log.qh:67
string Get_Notif_TypeName(MSG net_type)
main types/groups of notifications
Definition: all.qh:30
#define NULL
Definition: post.qh:17
entity Notification
always last
Definition: all.qh:82
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Get_Notif_TypeName()

string Get_Notif_TypeName ( MSG  net_type)

main types/groups of notifications

"Global" AND "personal" announcer messages "Global" information messages "Personal" centerprint messages Subcall MSG_INFO and/or MSG_CENTER notifications Choose which subcall wrapper to activate Kill centerprint message

Deprecated:

Definition at line 30 of file all.qh.

References CASE, ENUMCLASS, ENUMCLASS_END, LOG_WARNF, and ORDINAL.

Referenced by Create_Notification_Entity_Annce(), Create_Notification_Entity_Choice(), Create_Notification_Entity_InfoCenter(), Create_Notification_Entity_Multi(), Get_Notif_Ent(), Local_Notification(), and Local_Notification_WOVA().

31 {
32  switch (net_type)
33  {
34  case MSG_ANNCE: return "MSG_ANNCE";
35  case MSG_INFO: return "MSG_INFO";
36  case MSG_CENTER: return "MSG_CENTER";
37  case MSG_MULTI: return "MSG_MULTI";
38  case MSG_CHOICE: return "MSG_CHOICE";
39  case MSG_CENTER_KILL: return "MSG_CENTER_KILL";
40  }
41  LOG_WARNF("Get_Notif_TypeName(%d): Improper net type!", ORDINAL(net_type));
42  return "";
43 }
#define ORDINAL(it)
Definition: enumclass.qh:25
#define LOG_WARNF(...)
Definition: log.qh:67
+ Here is the caller graph for this function:

◆ Local_Notification()

void Local_Notification ( MSG  net_type,
Notification  net_name,
  count 
)

Definition at line 1185 of file all.qc.

References backtrace, count, cvar(), entity(), float(), Get_Notif_CvarName(), Get_Notif_TypeName(), Local_Notification_sprintf(), Local_Notification_WOVA(), LOG_WARNF, MakeConsoleSafe(), print(), strzone(), substring(), and warmup_stage.

Referenced by Announcer_Countdown(), Announcer_Gamestart(), GENERIC_COMMAND(), Local_Notification_WOVA(), and NET_HANDLE().

1186 {
1187  // retreive entity of this notification
1188  entity notif = net_name;
1189  if (!notif)
1190  {
1191  #ifdef NOTIFICATIONS_DEBUG
1192  Debug_Notification(sprintf(
1193  "Local_Notification(%s, NULL, ...);\n",
1194  Get_Notif_TypeName(net_type)
1195  ));
1196  #endif
1197  LOG_WARNF("Incorrect usage of Local_Notification: %s", "Null notification");
1198  return;
1199  }
1200 
1201  // check if the notification is enabled
1202  if (!notif.nent_enabled)
1203  {
1204  #ifdef NOTIFICATIONS_DEBUG
1205  Debug_Notification(sprintf(
1206  "Local_Notification(%s, %s, ...): Entity was disabled...\n",
1207  Get_Notif_TypeName(net_type),
1208  notif.nent_name
1209  ));
1210  #endif
1211  return;
1212  }
1213 
1214  string s1 = CCR((notif.nent_stringcount > 0) ? ...(0, string) : "");
1215  string s2 = CCR((notif.nent_stringcount > 1) ? ...(1, string) : "");
1216  string s3 = CCR((notif.nent_stringcount > 2) ? ...(2, string) : "");
1217  string s4 = CCR((notif.nent_stringcount > 3) ? ...(3, string) : "");
1218  float f1 = ((notif.nent_floatcount > 0) ? ...((notif.nent_stringcount + 0), float) : 0);
1219  float f2 = ((notif.nent_floatcount > 1) ? ...((notif.nent_stringcount + 1), float) : 0);
1220  float f3 = ((notif.nent_floatcount > 2) ? ...((notif.nent_stringcount + 2), float) : 0);
1221  float f4 = ((notif.nent_floatcount > 3) ? ...((notif.nent_stringcount + 3), float) : 0);
1222 
1223  #ifdef NOTIFICATIONS_DEBUG
1224  Debug_Notification(sprintf(
1225  "Local_Notification(%s, %s, %s, %s);\n",
1226  Get_Notif_TypeName(net_type),
1227  notif.nent_name,
1228  MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
1229  sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
1230  ));
1231  #endif
1232 
1233  if ((notif.nent_stringcount + notif.nent_floatcount) != count)
1234  {
1235  backtrace(sprintf(
1236  (
1237  "Arguments mismatch for Local_Notification(%s, %s, ...)! "
1238  "stringcount(%d) + floatcount(%d) != count(%d)\n"
1239  "Check the definition and function call for accuracy...?\n"
1240  ),
1241  Get_Notif_TypeName(net_type),
1242  notif.nent_name,
1243  notif.nent_stringcount,
1244  notif.nent_floatcount,
1245  count
1246  ));
1247  return;
1248  }
1249 
1250  switch (net_type)
1251  {
1252  case MSG_ANNCE:
1253  {
1254  #ifdef CSQC
1255  Local_Notification_sound(notif.nent_channel, notif.nent_snd, notif.nent_vol, notif.nent_position);
1256  #else
1257  backtrace("MSG_ANNCE on server?... Please notify Samual immediately!\n");
1258  #endif
1259  break;
1260  }
1261 
1262  case MSG_INFO:
1263  {
1264  print(
1266  notif.nent_string,
1267  notif.nent_args,
1268  s1, s2, s3, s4,
1269  f1, f2, f3, f4)
1270  );
1271  #ifdef CSQC
1272  if (notif.nent_icon != "")
1273  {
1274  if (notif.nent_iconargs != "")
1275  {
1276  string s = Local_Notification_sprintf(
1277  notif.nent_icon,notif.nent_iconargs,
1278  s1, s2, s3, s4, f1, f2, f3, f4);
1279  // remove the trailing newline
1280  notif.nent_icon = strzone(substring(s, 0, -1));
1281  }
1282  Local_Notification_HUD_Notify_Push(
1283  notif.nent_icon,
1284  notif.nent_hudargs,
1285  s1, s2, s3, s4,
1286  f1, f2, f3, f4);
1287  }
1288  #endif
1289  break;
1290  }
1291 
1292  #ifdef CSQC
1293  case MSG_CENTER:
1294  {
1295  Local_Notification_centerprint_Add(
1297  notif.nent_string,
1298  notif.nent_args,
1299  s1, s2, s3, s4,
1300  f1, f2, f3, f4),
1301  notif.nent_durcnt,
1302  notif.nent_cpid,
1303  f1, f2);
1304  break;
1305  }
1306  #endif
1307 
1308  case MSG_MULTI:
1309  {
1310  if (notif.nent_msginfo && notif.nent_msginfo.nent_enabled)
1311  {
1313  MSG_INFO,
1314  notif.nent_msginfo,
1315  notif.nent_msginfo.nent_stringcount,
1316  notif.nent_msginfo.nent_floatcount,
1317  s1, s2, s3, s4,
1318  f1, f2, f3, f4);
1319  }
1320  #ifdef CSQC
1321  if (notif.nent_msgannce && notif.nent_msgannce.nent_enabled)
1322  {
1324  MSG_ANNCE,
1325  notif.nent_msgannce,
1326  0, 0,
1327  "", "", "", "",
1328  0, 0, 0, 0);
1329  }
1330  if (notif.nent_msgcenter && notif.nent_msgcenter.nent_enabled)
1331  {
1333  MSG_CENTER,
1334  notif.nent_msgcenter,
1335  notif.nent_msgcenter.nent_stringcount,
1336  notif.nent_msgcenter.nent_floatcount,
1337  s1, s2, s3, s4,
1338  f1, f2, f3, f4);
1339  }
1340  #endif
1341  break;
1342  }
1343 
1344  case MSG_CHOICE:
1345  {
1346  entity found_choice = notif.nent_optiona;
1347  if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) {
1348  switch (cvar(sprintf("notification_%s", Get_Notif_CvarName(notif))))
1349  {
1350  case 1: break;
1351  case 2: found_choice = notif.nent_optionb; break;
1352  default: return; // not enabled anyway
1353  }
1354  }
1355 
1357  found_choice.nent_type,
1358  found_choice,
1359  found_choice.nent_stringcount,
1360  found_choice.nent_floatcount,
1361  s1, s2, s3, s4,
1362  f1, f2, f3, f4);
1363  }
1364  }
1365 }
spree_inf s1 s2 s3loc s2 s1
Definition: all.inc:265
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1 f1points s1 s2
Definition: all.inc:438
float(entity, float) PlayerPhysplug
entity() spawn
bool warmup_stage
Definition: main.qh:103
ERASEABLE string MakeConsoleSafe(string input)
escape the string to make it safe for consoles
Definition: cvar.qh:24
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1
Definition: all.inc:654
string Local_Notification_sprintf(string input, string args, string s1, string s2, string s3, string s4, int f1, float f2, float f3, float f4)
Definition: all.qc:993
#define LOG_WARNF(...)
Definition: log.qh:67
string Get_Notif_TypeName(MSG net_type)
main types/groups of notifications
Definition: all.qh:30
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1 f1points f2
Definition: all.inc:348
#define backtrace(msg)
Definition: log.qh:105
string Get_Notif_CvarName(Notification notif)
Definition: all.qh:727
float count
Definition: powerups.qc:22
void Local_Notification_WOVA(MSG net_type, Notification net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4)
glue for networking, forwards to Local_Notification
Definition: all.qc:1368
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Local_Notification_WOVA()

void Local_Notification_WOVA ( MSG  net_type,
Notification  net_name,
float  stringcount,
float  floatcount,
string  s1,
string  s2,
string  s3,
string  s4,
float  f1,
float  f2,
float  f3,
float  f4 
)

glue for networking, forwards to Local_Notification

Definition at line 1368 of file all.qc.

References backtrace, centerprint_Kill(), centerprint_KillAll(), count, CPID_Null, EIGHT_VARS_TO_VARARGS_VARLIST, entity(), ENUMCAST, float(), FOREACH_CLIENT, Get_Notif_Ent(), Get_Notif_TypeName(), IL_EACH, IL_PUSH(), IS_REAL_CLIENT, Local_Notification(), Local_Notification_WOVA(), LOG_WARN, LOG_WARNF, make_pure, MakeConsoleSafe(), nent_client, nent_floatcount, nent_floats, nent_net_name, nent_net_type, nent_stringcount, nent_strings, NET_HANDLE, new_pure, ORDINAL, owner, ReadString, REGISTER_NET_LINKED, server_is_dedicated, setthink, strfree, strzone(), time, WriteByte(), WriteLong(), WriteShort(), and WriteString().

Referenced by GENERIC_COMMAND(), Local_Notification(), and Local_Notification_WOVA().

1373 {
1374  #define VARITEM(stringc, floatc, args) \
1375  if ((stringcount == stringc) && (floatcount == floatc)) \
1376  { Local_Notification(net_type, net_name, args); return; }
1378  #undef VARITEM
1379  Local_Notification(net_type, net_name); // some notifications don't have any arguments at all
1380 }
#define EIGHT_VARS_TO_VARARGS_VARLIST
Definition: all.qh:88
void Local_Notification(MSG net_type, Notification net_name,...count)
Definition: all.qc:1185
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notif_arg_item_wepammo()

string notif_arg_item_wepammo ( float  f1,
float  f2 
)

Definition at line 633 of file all.qh.

References Weapon::ammo_type, and REGISTRY_GET.

634 {
635  string ammoitems = "";
636  Weapon wep = REGISTRY_GET(Weapons, f1);
637  // TODO: registry handles
638  switch (wep.ammo_type)
639  {
640  case RES_SHELLS: ammoitems = ITEM_Shells.m_name; break;
641  case RES_BULLETS: ammoitems = ITEM_Bullets.m_name; break;
642  case RES_ROCKETS: ammoitems = ITEM_Rockets.m_name; break;
643  case RES_CELLS: ammoitems = ITEM_Cells.m_name; break;
644  case RES_PLASMA: ammoitems = ITEM_Plasma.m_name; break;
645  case RES_FUEL: ammoitems = ITEM_JetpackFuel.m_name; break;
646  default: return ""; // doesn't use ammo
647  }
648  return sprintf(_(" with %d %s"), f2, ammoitems);
649 }
#define REGISTRY_GET(id, i)
Definition: registry.qh:43
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1
Definition: all.inc:654
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1 f1points f2
Definition: all.inc:348
Resource ammo_type
M: ammotype : main ammo type.
Definition: weapon.qh:48
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition: weapon.qh:41

◆ notif_arg_spree_inf()

string notif_arg_spree_inf ( float  type,
string  input,
string  player,
float  spree 
)

Definition at line 536 of file all.qh.

References autocvar_notification_show_sprees_info, autocvar_notification_show_sprees_info_newline, autocvar_notification_show_sprees_info_specialonly, KILL_SPREE_LIST, and substring().

537 {
538  switch(type)
539  {
540  case 1: // attacker kill spree
541  {
542  // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
543  // this conditional (& 2) is true for 2 and 3
545  {
546  #ifdef CSQC
547  string spree_newline =
549  ((substring(input, 0, 1) == "\{3}") ? "\n\{3}" : "\n") : "" );
550  #else
551  string spree_newline =
553  #endif
554 
555  if(spree > 1)
556  {
557  #define SPREE_ITEM(counta,countb,center,normal,gentle) \
558  case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
559 
560  switch(spree)
561  {
563  default:
564  {
566  {
567  return
568  sprintf(
569  CCR(normal_or_gentle(
570  _("%s^K1 has %d frags in a row! %s^BG"),
571  _("%s^K1 made %d scores in a row! %s^BG")
572  )),
573  player,
574  spree,
575  spree_newline
576  );
577  }
578  else { return ""; } // don't show spree information if it isn't an achievement
579  }
580  }
581 
582  #undef SPREE_ITEM
583  }
584  else if(spree == -1) // firstblood
585  {
586  return
587  sprintf(
588  CCR(normal_or_gentle(
589  _("%s^K1 drew first blood! %s^BG"),
590  _("%s^K1 got the first score! %s^BG")
591  )),
592  player,
593  spree_newline
594  );
595  }
596  }
597  break;
598  }
599 
600  case -1: // kill spree ended
601  {
602  if((spree > 1) && (autocvar_notification_show_sprees_info & 1))
603  {
604  return
605  sprintf(normal_or_gentle(
606  _(", ending their %d frag spree"),
607  _(", ending their %d score spree")
608  ),
609  spree
610  );
611  }
612  break;
613  }
614 
615  case -2: // kill spree lost
616  {
617  if((spree > 1) && (autocvar_notification_show_sprees_info & 1))
618  {
619  return
620  sprintf(normal_or_gentle(
621  _(", losing their %d frag spree"),
622  _(", losing their %d score spree")
623  ),
624  spree
625  );
626  }
627  break;
628  }
629  }
630  return "";
631 }
float autocvar_notification_show_sprees_info
Definition: all.qh:307
float autocvar_notification_show_sprees_info_newline
Definition: all.qh:308
float autocvar_notification_show_sprees_info_specialonly
Definition: all.qh:309
#define KILL_SPREE_LIST
Definition: all.qh:454
+ Here is the call graph for this function:

◆ REGISTRY_BEGIN()

REGISTRY_BEGIN ( Notifications  )

Definition at line 855 of file all.qh.

References notif_global_error.

856 {
857  notif_global_error = false;
858 }
bool notif_global_error
Definition: all.qh:718

◆ REGISTRY_END()

REGISTRY_END ( Notifications  )

Definition at line 860 of file all.qh.

References autocvar_notification_errors_are_fatal, FOREACH, LOG_FATAL, LOG_SEVERE, notif_global_error, and NUM_TEAM_1.

861 {
862  if (!notif_global_error) return;
863  // shit happened... stop the loading of the program now if this is unacceptable
865  LOG_FATAL("Notification initialization failed! Read above and fix the errors!");
866  else
867  LOG_SEVERE("Notification initialization failed! Read above and fix the errors!");
868 }
float autocvar_notification_errors_are_fatal
Definition: all.qh:310
#define LOG_SEVERE(...)
Definition: log.qh:62
bool notif_global_error
Definition: all.qh:718
#define LOG_FATAL(...)
Definition: log.qh:58

◆ REGISTRY_SORT()

REGISTRY_SORT ( Notifications  )

◆ STATIC_INIT()

STATIC_INIT ( Notifications  )

Definition at line 707 of file all.qh.

References FOREACH, and REGISTRY_CHECK.

707 { FOREACH(Notifications, true, it.m_id = i); }
#define FOREACH(list, cond, body)
Definition: iter.qh:19

◆ STATIC_INIT_LATE()

STATIC_INIT_LATE ( Notif_Choices  )

Definition at line 720 of file all.qh.

References LOG_FATALF.

Referenced by GENERIC_COMMAND().

721 {
723  LOG_FATALF("Too many MSG_CHOICE notifications (%d), hit NOTIF_CHOICE_MAX (%d) limit",
725 }
int nent_choice_count
Definition: all.qh:713
const int NOTIF_CHOICE_MAX
Definition: all.qh:710
#define LOG_FATALF(...)
Definition: log.qh:59
+ Here is the caller graph for this function:

Variable Documentation

◆ ARG_CS

const float ARG_CS = 4

Definition at line 394 of file all.qh.

◆ ARG_CS_SV

const float ARG_CS_SV = 3

Definition at line 393 of file all.qh.

◆ ARG_CS_SV_DC

const float ARG_CS_SV_DC = 2

Definition at line 392 of file all.qh.

◆ ARG_CS_SV_HA

const float ARG_CS_SV_HA = 1

Definition at line 391 of file all.qh.

◆ ARG_DC

const float ARG_DC = 6

Definition at line 396 of file all.qh.

◆ arg_slot

Definition at line 389 of file all.qh.

Referenced by Local_Notification_sprintf().

◆ ARG_SV

const float ARG_SV = 5

Definition at line 395 of file all.qh.

◆ autocvar_notification_allow_chatboxprint

float autocvar_notification_allow_chatboxprint = 0

Definition at line 324 of file all.qh.

Referenced by Process_Notif_Line().

◆ autocvar_notification_errors_are_fatal

float autocvar_notification_errors_are_fatal = true

Definition at line 310 of file all.qh.

Referenced by REGISTRY_END().

◆ autocvar_notification_item_centerprinttime

float autocvar_notification_item_centerprinttime = 1.5

Definition at line 320 of file all.qh.

◆ autocvar_notification_show_location

float autocvar_notification_show_location = false

Definition at line 304 of file all.qh.

◆ autocvar_notification_show_location_string

string autocvar_notification_show_location_string = ""

Definition at line 305 of file all.qh.

◆ autocvar_notification_show_sprees

float autocvar_notification_show_sprees = true

Definition at line 306 of file all.qh.

◆ autocvar_notification_show_sprees_center

float autocvar_notification_show_sprees_center = true

Definition at line 326 of file all.qh.

◆ autocvar_notification_show_sprees_center_specialonly

float autocvar_notification_show_sprees_center_specialonly = true

Definition at line 327 of file all.qh.

◆ autocvar_notification_show_sprees_info

float autocvar_notification_show_sprees_info = 3

Definition at line 307 of file all.qh.

Referenced by notif_arg_spree_inf().

◆ autocvar_notification_show_sprees_info_newline

float autocvar_notification_show_sprees_info_newline = true

Definition at line 308 of file all.qh.

Referenced by notif_arg_spree_inf().

◆ autocvar_notification_show_sprees_info_specialonly

float autocvar_notification_show_sprees_info_specialonly = true

Definition at line 309 of file all.qh.

Referenced by notif_arg_spree_inf().

◆ msg_choice_choices

int msg_choice_choices[NOTIF_CHOICE_MAX]

Definition at line 715 of file all.qh.

◆ nent_args

string nent_args

Definition at line 672 of file all.qh.

◆ nent_challow_def

float nent_challow_def

Definition at line 685 of file all.qh.

◆ nent_challow_var

float nent_challow_var

Definition at line 686 of file all.qh.

◆ nent_channel

int nent_channel

Definition at line 666 of file all.qh.

◆ nent_choice_count

int nent_choice_count = 0

Definition at line 713 of file all.qh.

◆ nent_choice_idx

int nent_choice_idx

Definition at line 714 of file all.qh.

◆ nent_client

entity nent_client

Definition at line 694 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_cpid

CPID nent_cpid

Definition at line 675 of file all.qh.

◆ nent_default

int nent_default

Definition at line 657 of file all.qh.

◆ nent_durcnt

string nent_durcnt

Definition at line 676 of file all.qh.

◆ nent_enabled

bool nent_enabled

Definition at line 658 of file all.qh.

◆ nent_floatcount

int nent_floatcount

Definition at line 662 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_floats

float nent_floats[4]

Definition at line 698 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_hudargs

string nent_hudargs

Definition at line 673 of file all.qh.

◆ nent_icon

string nent_icon

Definition at line 674 of file all.qh.

◆ nent_iconargs

string nent_iconargs

Definition at line 785 of file all.qh.

◆ nent_msgannce

entity nent_msgannce

Definition at line 680 of file all.qh.

◆ nent_msgcenter

entity nent_msgcenter

Definition at line 682 of file all.qh.

◆ nent_msginfo

entity nent_msginfo

Definition at line 681 of file all.qh.

◆ nent_name

string nent_name

Definition at line 660 of file all.qh.

◆ nent_net_name

float nent_net_name

Definition at line 696 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_net_type

MSG nent_net_type

Definition at line 695 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_optiona

entity nent_optiona

Definition at line 687 of file all.qh.

◆ nent_optionb

entity nent_optionb

Definition at line 688 of file all.qh.

◆ nent_position

float nent_position

Definition at line 669 of file all.qh.

◆ nent_snd

string nent_snd

Definition at line 667 of file all.qh.

◆ nent_string

string nent_string

Definition at line 677 of file all.qh.

◆ nent_stringcount

int nent_stringcount

Definition at line 661 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_strings

string nent_strings[4]

Definition at line 697 of file all.qh.

Referenced by Local_Notification_WOVA().

◆ nent_teamnum

int nent_teamnum

Definition at line 663 of file all.qh.

◆ nent_type

MSG nent_type

Definition at line 659 of file all.qh.

◆ nent_vol

float nent_vol

Definition at line 668 of file all.qh.

◆ NOTIF_CHOICE_MAX

const int NOTIF_CHOICE_MAX = 20

Definition at line 710 of file all.qh.

◆ notif_error

◆ notif_global_error

bool notif_global_error

Definition at line 718 of file all.qh.

Referenced by Create_Notification_Entity(), REGISTRY_BEGIN(), and REGISTRY_END().

◆ NOTIF_MAX_ARGS

const float NOTIF_MAX_ARGS = 7

Definition at line 385 of file all.qh.

Referenced by Local_Notification_sprintf(), and Process_Notif_Args().

◆ NOTIF_MAX_DURCNT

const float NOTIF_MAX_DURCNT = 2

Definition at line 387 of file all.qh.

Referenced by Local_Notification_sprintf(), and Process_Notif_Args().

◆ NOTIF_MAX_HUDARGS

const float NOTIF_MAX_HUDARGS = 2

Definition at line 386 of file all.qh.

Referenced by Local_Notification_sprintf(), and Process_Notif_Args().