X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fnotifications%2Fall.qh;h=d2682a148f70c937ea202d0ed7e1b1822109b114;hb=b0a563c3658ec620ddb9037b9417b743a47002a5;hp=983b69f3f4562b3a6a96363ef94543940de4f983;hpb=9185b58da6fe5f2b095d7066577e1e024b4d2798;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 983b69f3f..d2682a148 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include @@ -65,6 +65,7 @@ ENUMCLASS(CPID) CASE(CPID, RACE_FINISHLAP) CASE(CPID, TEAMCHANGE) CASE(CPID, TIMEOUT) + CASE(CPID, TIMEIN) CASE(CPID, VEHICLES) CASE(CPID, VEHICLES_OTHER) /** always last */ @@ -75,8 +76,7 @@ USING(Notification, entity); // used for notification system multi-team identifiers #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))) -/** @deprecated use APP_TEAM_NUM */ -#define APP_TEAM_ENT(ent, prefix) APP_TEAM_NUM(ent.team, prefix) +#define APP_NUM(num, prefix) ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL) #define EIGHT_VARS_TO_VARARGS_VARLIST \ VARITEM(1, 0, s1) \ @@ -159,7 +159,7 @@ GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt" { case CMD_REQUEST_COMMAND: { - #ifndef MENUQC + #ifdef GAMEQC string filename = argv(1); bool alsoprint = false; if (filename == "") @@ -225,6 +225,11 @@ string prev_soundfile; float prev_soundtime; #endif +#ifdef SVQC +IntrusiveList g_notifications; +STATIC_INIT(g_notifications) { g_notifications = IL_NEW(); } +#endif + #ifdef SVQC ENUMCLASS(NOTIF) /** send to one client and their spectators */ @@ -348,6 +353,7 @@ float autocvar_notification_show_sprees_center_specialonly = true; race_diff: show time difference between f2 and f3 missing_teams: show which teams still need players pass_key: find the keybind for "passing" or "dropping" in CTF game mode + nade_key: find the keybind for nade throwing frag_ping: show the ping of a player frag_stats: show health/armor/ping of a player frag_pos: show score status and position in the match of a player @@ -408,6 +414,7 @@ string BUFF_NAME(int i); ARG_CASE(ARG_CS_SV, "race_diff", ((f2 > f3) ? sprintf(CCR("^1[+%s]"), mmssss(f2 - f3)) : sprintf(CCR("^2[-%s]"), mmssss(f3 - f2)))) \ ARG_CASE(ARG_CS, "missing_teams", notif_arg_missing_teams(f1)) \ ARG_CASE(ARG_CS, "pass_key", getcommandkey(_("drop flag"), "+use")) \ + ARG_CASE(ARG_CS, "nade_key", getcommandkey(_("throw nade"), "dropweapon")) \ ARG_CASE(ARG_CS, "frag_ping", notif_arg_frag_ping(true, f2)) \ ARG_CASE(ARG_CS, "frag_stats", notif_arg_frag_stats(f2, f3, f4)) \ /*ARG_CASE(ARG_CS, "frag_pos", ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : ""))*/ \