]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/monsters
authorMario <mario.mario@y7mail.com>
Wed, 2 Oct 2013 04:24:15 +0000 (21:24 -0700)
committerMario <mario.mario@y7mail.com>
Wed, 2 Oct 2013 04:24:15 +0000 (21:24 -0700)
commands.cfg
qcsrc/client/hud.qh
qcsrc/common/deathtypes.qh
qcsrc/common/items.qh
qcsrc/common/mapinfo.qh
qcsrc/common/monsters/monsters.qh
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/util-pre.qh
qcsrc/common/util.qh

index 67f5f343e3e65a0d3d462bddc8438318f90a2f9b..ac7316f07514bf9e14f35ced0cf88d1d6d3354ae 100644 (file)
@@ -157,8 +157,8 @@ alias reportcvar           "qc_cmd_cmd    reportcvar           ${* ?}" // Old sy
 alias selectteam           "qc_cmd_cmd    selectteam           ${* ?}" // Attempt to choose a team to join into
 alias selfstuff            "qc_cmd_cmd    selfstuff            ${* ?}" // Stuffcmd a command to your own client
 alias sentcvar             "qc_cmd_cmd    sentcvar             ${* ?}" // New system for sending a client cvar to the server
-alias editmob                     "qc_cmd_cmd    mobedit                          ${* ?}" // Edit a monster's properties
-alias killmob                     "qc_cmd_cmd    mobkill                          ${* ?}" // Kill a monster
+alias editmob              "qc_cmd_cmd   mobedit                          ${* ?}" // Edit a monster's properties
+alias killmob              "qc_cmd_cmd   mobkill                          ${* ?}" // Kill a monster
 alias spawnmob             "qc_cmd_cmd    mobspawn             ${* ?}" // Spawn a monster infront of the player
 alias spectate             "qc_cmd_cmd    spectate             ${* ?}" // Become an observer
 alias suggestmap           "qc_cmd_cmd    suggestmap           ${* ?}" // Suggest a map to the mapvote at match end
index db9405ef6af6039b968176b9de277fb0aae5820b..1fe76b091cc2239684a1a420d1e5ee95108b8a8e 100644 (file)
@@ -132,7 +132,7 @@ float current_player;
                hud_panelent.panel_draw = ##draw_func; \
                ++HUD_PANEL_NUM; \
        } \
-       ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME)
+       ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME);
 
 HUD_PANELS
 #undef HUD_PANEL
index 8ea53b5e749d7c6d21a2433a797b425d4c1dafcc..5e4b0870c9c02d78fb4a4609b3a92d7369c95fea 100644 (file)
@@ -96,14 +96,12 @@ entity deathtypes[DT_MAX];
                deathtypes[(name - DT_FIRST)] = deathent; \
                deathent.classname = "deathtype"; \
                deathent.nent_name = #name; \
-               #if (msg_death != NO_MSG) \
+               if (msg_death != NO_MSG) \
                        deathent.death_msgself = msg_multi_notifs[msg_death - 1]; \
-               #endif \
-               #if (msg_death_by != NO_MSG) \
+               if (msg_death_by != NO_MSG) \
                        deathent.death_msgmurder = msg_multi_notifs[msg_death_by - 1]; \
-               #endif \
        } \
-       ACCUMULATE_FUNCTION(RegisterDeathtypes, RegisterDeathtype_##name)
+       ACCUMULATE_FUNCTION(RegisterDeathtypes, RegisterDeathtype_##name);
 
 DEATHTYPES
 #undef DEATHTYPE
index 45510437fcf50e830ad97026d587040468495423..35cc00232bfd329eab32beeb5907f6707852f7aa 100644 (file)
@@ -136,7 +136,7 @@ void register_weapons_done();
 #include "../server/w_all.qc"
 
 #undef REGISTER_WEAPON
-ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done)
+ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done);
 
 
 string W_FixWeaponOrder(string order, float complete);
index d2a9409e310213df929f572f6713558d73e74e01..4e3e81b66d5743a54cb03db2aa326505b1655610 100644 (file)
@@ -33,52 +33,52 @@ entity MapInfo_Type_last;
 #define IS_GAMETYPE(NAME) \
        (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME)
 
-REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,"timelimit=20 pointlimit=30 leadlimit=0")
+REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,"timelimit=20 pointlimit=30 leadlimit=0");
 #define g_dm IS_GAMETYPE(DEATHMATCH)
 
-REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,"timelimit=20 lives=9 leadlimit=0")
+REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,"timelimit=20 lives=9 leadlimit=0");
 #define g_lms IS_GAMETYPE(LMS)
 
-REGISTER_GAMETYPE(_("Arena"),arena,g_arena,ARENA,"timelimit=20 pointlimit=10 leadlimit=0")
+REGISTER_GAMETYPE(_("Arena"),arena,g_arena,ARENA,"timelimit=20 pointlimit=10 leadlimit=0");
 #define g_arena IS_GAMETYPE(ARENA)
 
-REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0")
+REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0");
 #define g_race IS_GAMETYPE(RACE)
 
-REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,"timelimit=20 skill=-1")
+REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,"timelimit=20 skill=-1");
 #define g_cts IS_GAMETYPE(CTS)
 
-REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,"timelimit=20 pointlimit=50 teams=2 leadlimit=0")
+REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,"timelimit=20 pointlimit=50 teams=2 leadlimit=0");
 #define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH)
 
-REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 caplimit=10 leadlimit=0")
+REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 caplimit=10 leadlimit=0");
 #define g_ctf IS_GAMETYPE(CTF)
 
-REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,"timelimit=20 pointlimit=10 leadlimit=0")
+REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,"timelimit=20 pointlimit=10 leadlimit=0");
 #define g_ca IS_GAMETYPE(CA)
 
-REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,"timelimit=20 pointlimit=200 teams=2 leadlimit=0")
+REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,"timelimit=20 pointlimit=200 teams=2 leadlimit=0");
 #define g_domination IS_GAMETYPE(DOMINATION)
 
-REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0")
+REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0");
 #define g_keyhunt IS_GAMETYPE(KEYHUNT)
 
-REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,"timelimit=20")
+REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,"timelimit=20");
 #define g_assault IS_GAMETYPE(ASSAULT)
 
-REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,"timelimit=20")
+REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,"timelimit=20");
 #define g_onslaught IS_GAMETYPE(ONSLAUGHT)
 
-REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0")
+REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0");
 #define g_nexball IS_GAMETYPE(NEXBALL)
 
-REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0")
+REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0");
 #define g_freezetag IS_GAMETYPE(FREEZETAG)
 
-REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30")
+REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30");
 #define g_keepaway IS_GAMETYPE(KEEPAWAY)
 
-REGISTER_GAMETYPE(_("Invasion"),invasion,g_invasion,INVASION,"pointlimit=5")
+REGISTER_GAMETYPE(_("Invasion"),invasion,g_invasion,INVASION,"pointlimit=5");
 #define g_invasion IS_GAMETYPE(INVASION)
 
 const float MAPINFO_FEATURE_WEAPONS       = 1; // not defined for minstagib-only maps
index 61e2e536453840c283a1fb026906f781e7567b8b..e9a942b45790470f67dc690dd2e48e90d25c1950 100644 (file)
@@ -79,4 +79,4 @@ float MON_LAST;
 
 #undef MON_ADD_CVAR
 #undef REGISTER_MONSTER
-ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done)
+ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done);
index c2420d4435ba7bdc7ca4647edcbfb015164ba9eb..09c049681819bc62d57ed5b813393b120141af90 100644 (file)
@@ -331,12 +331,21 @@ string Process_Notif_Args(
 
                                switch(strtolower(selected))
                                {
-                                       #define ARG_CASE(prog,selected,result) \
-                                               #if (prog != ARG_DC) \
-                                                       case selected: { ++sel_num; break; } \
-                                               #endif
+                                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV(selected,result)    case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS(selected,result)       case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_SV(selected,result)       case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_DC(selected,result)
+                                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                                        NOTIF_ARGUMENT_LIST
                                        #undef ARG_CASE
+                                       #undef ARG_CASE_ARG_DC
+                                       #undef ARG_CASE_ARG_SV
+                                       #undef ARG_CASE_ARG_CS
+                                       #undef ARG_CASE_ARG_CS_SV
+                                       #undef ARG_CASE_ARG_CS_SV_DC
+                                       #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
                                                print(sprintf(
@@ -373,12 +382,21 @@ string Process_Notif_Args(
 
                                switch(strtolower(selected))
                                {
-                                       #define ARG_CASE(prog,selected,result) \
-                                               #if (prog == ARG_CS_SV_HA) \
-                                                       case selected: { ++sel_num; break; } \
-                                               #endif
+                                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV_DC(selected,result)
+                                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                                       #define ARG_CASE_ARG_CS(selected,result)
+                                       #define ARG_CASE_ARG_SV(selected,result)
+                                       #define ARG_CASE_ARG_DC(selected,result)
+                                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                                        NOTIF_ARGUMENT_LIST
                                        #undef ARG_CASE
+                                       #undef ARG_CASE_ARG_DC
+                                       #undef ARG_CASE_ARG_SV
+                                       #undef ARG_CASE_ARG_CS
+                                       #undef ARG_CASE_ARG_CS_SV
+                                       #undef ARG_CASE_ARG_CS_SV_DC
+                                       #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
                                                print(sprintf(
@@ -415,12 +433,21 @@ string Process_Notif_Args(
 
                                switch(strtolower(selected))
                                {
-                                       #define ARG_CASE(prog,selected,result) \
-                                               #if (prog == ARG_CS_SV_DC) || (prog == ARG_DC) \
-                                                       case selected: { ++sel_num; break; } \
-                                               #endif
+                                       #define ARG_CASE_ARG_CS_SV_HA(selected,result)
+                                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                                       #define ARG_CASE_ARG_CS(selected,result)
+                                       #define ARG_CASE_ARG_SV(selected,result)
+                                       #define ARG_CASE_ARG_DC(selected,result)       case selected: { ++sel_num; break; }
+                                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                                        NOTIF_ARGUMENT_LIST
                                        #undef ARG_CASE
+                                       #undef ARG_CASE_ARG_DC
+                                       #undef ARG_CASE_ARG_SV
+                                       #undef ARG_CASE_ARG_CS
+                                       #undef ARG_CASE_ARG_CS_SV
+                                       #undef ARG_CASE_ARG_CS_SV_DC
+                                       #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
                                                if(ftos(stof(selected)) != "") { ++sel_num; }
@@ -1183,18 +1210,30 @@ string Local_Notification_sprintf(
                NOTIF_HIT_MAX(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
                switch(strtolower(selected))
                {
-                       #define ARG_CASE(prog,selected,result) \
-                               #ifdef CSQC \
-                                       #if (prog != ARG_SV) && (prog != ARG_DC) \
-                                               case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                                       #endif \
-                               #else \
-                                       #if (prog != ARG_CS) && (prog != ARG_DC) \
-                                               case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                                       #endif \
-                               #endif
+                       #ifdef CSQC
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV(selected,result)    case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS(selected,result)       case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_SV(selected,result)
+                       #define ARG_CASE_ARG_DC(selected,result)
+                       #else
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV(selected,result)    case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS(selected,result)
+                       #define ARG_CASE_ARG_SV(selected,result)       case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_DC(selected,result)
+                       #endif
+                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                        NOTIF_ARGUMENT_LIST
                        #undef ARG_CASE
+                       #undef ARG_CASE_ARG_DC
+                       #undef ARG_CASE_ARG_SV
+                       #undef ARG_CASE_ARG_CS
+                       #undef ARG_CASE_ARG_CS_SV
+                       #undef ARG_CASE_ARG_CS_SV_DC
+                       #undef ARG_CASE_ARG_CS_SV_HA
                        default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
                }
        }
@@ -1285,12 +1324,21 @@ void Local_Notification_HUD_Notify_Push(
                NOTIF_HIT_MAX(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
                switch(strtolower(selected))
                {
-                       #define ARG_CASE(prog,selected,result) \
-                               #if (prog == ARG_CS_SV_HA) \
-                                       case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                               #endif
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result)
+                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                       #define ARG_CASE_ARG_CS(selected,result)
+                       #define ARG_CASE_ARG_SV(selected,result)
+                       #define ARG_CASE_ARG_DC(selected,result)
+                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                        NOTIF_ARGUMENT_LIST
                        #undef ARG_CASE
+                       #undef ARG_CASE_ARG_DC
+                       #undef ARG_CASE_ARG_SV
+                       #undef ARG_CASE_ARG_CS
+                       #undef ARG_CASE_ARG_CS_SV
+                       #undef ARG_CASE_ARG_CS_SV_DC
+                       #undef ARG_CASE_ARG_CS_SV_HA
                        default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
                }
        }
@@ -1320,12 +1368,21 @@ void Local_Notification_centerprint_generic(
                NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic")
                switch(strtolower(selected))
                {
-                       #define ARG_CASE(prog,selected,result) \
-                               #if (prog == ARG_CS_SV_DC) || (prog == ARG_DC) \
-                                       case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                               #endif
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result)
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                       #define ARG_CASE_ARG_CS(selected,result)
+                       #define ARG_CASE_ARG_SV(selected,result)
+                       #define ARG_CASE_ARG_DC(selected,result)       case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                        NOTIF_ARGUMENT_LIST
                        #undef ARG_CASE
+                       #undef ARG_CASE_ARG_DC
+                       #undef ARG_CASE_ARG_SV
+                       #undef ARG_CASE_ARG_CS
+                       #undef ARG_CASE_ARG_CS_SV
+                       #undef ARG_CASE_ARG_CS_SV_DC
+                       #undef ARG_CASE_ARG_CS_SV_HA
                        default:
                        {
                                if(ftos(stof(selected)) != "") { arg_slot[sel_num] = selected; ++sel_num; }
index 1a58afb78ae00b9bbc9981b9583d4a883ceaad44..f078e69b3422b0024f16b5b91e998fe59e4ca9d1 100644 (file)
@@ -217,15 +217,21 @@ void Send_Notification_WOCOVA(
       If you send a notification with mismatching arguments, Send_Notification() will error.
 */
 
-#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+#define MULTITEAM_ANNCE2(default,prefix,channel,sound,volume,position) \
+       MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position)
+#define MULTITEAM_ANNCE3(default,prefix,channel,sound,volume,position) \
        MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
        MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
-       #if teams >= 3 \
-               MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
-       #endif \
-       #if teams >= 4 \
-               MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position) \
-       #endif
+       MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position)
+#define MULTITEAM_ANNCE4(default,prefix,channel,sound,volume,position) \
+       MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
+#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+       MSG_ANNCE_NOTIF_##teams(default,prefix,channel,sound,volume,position) \
+
 #define MSG_ANNCE_NOTIFICATIONS \
        MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT,       CH_INFO, "airshot",           VOL_BASEVOICE, ATTEN_NONE) \
        MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AMAZING,       CH_INFO, "amazing",           VOL_BASEVOICE, ATTEN_NONE) \
@@ -317,15 +323,21 @@ void Send_Notification_WOCOVA(
        MSG_ANNCE_NOTIF(2, ANNCE_VOTE_CALL,                 CH_INFO, "votecall",          VOL_BASEVOICE, ATTEN_NONE) \
        MSG_ANNCE_NOTIF(2, ANNCE_VOTE_FAIL,                 CH_INFO, "votefail",          VOL_BASEVOICE, ATTEN_NONE)
 
-#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+#define MULTITEAM_INFO2(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_INFO3(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
        MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
        MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-       #if teams >= 3 \
-               MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
-       #endif \
-       #if teams >= 4 \
-               MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
-       #endif
+       MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_INFO4(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+       MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+       MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MULTITEAM_INFO##teams(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle)
+
 #define MSG_INFO_NOTIFICATIONS \
        MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 2,                1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \
        MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 2,         2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \
@@ -530,15 +542,21 @@ void Send_Notification_WOCOVA(
        MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SNIPE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "") 
 
-#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+#define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_CENTER3(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
        MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
        MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-       #if teams >= 3 \
-               MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
-       #endif \
-       #if teams >= 4 \
-               MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
-       #endif
+       MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_CENTER4(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+       MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+       MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MULTITEAM_CENTER##teams(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle)
+
 #define MSG_CENTER_NOTIFICATIONS \
        MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are attacking!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are defending!"), "") \
@@ -670,15 +688,21 @@ void Send_Notification_WOCOVA(
        MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING,           0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
        MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "")
 
-#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
+       MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+       MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE)
+#define MULTITEAM_MULTI3(default,prefix,anncepre,infopre,centerpre) \
        MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
        MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
-       #if teams >= 3 \
-               MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
-       #endif \
-       #if teams >= 4 \
-               MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK) \
-       #endif
+       MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
+#define MULTITEAM_MULTI4(default,prefix,anncepre,infopre,centerpre) \
+       MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+       MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
+       MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
+       MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK)
+#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+       MULTITEAM_MULTI##teams(default,prefix,anncepre,infopre,centerpre)
+
 #define MSG_MULTI_NOTIFICATIONS \
        MSG_MULTI_NOTIF(1, DEATH_MURDER_CHEAT,                   NO_MSG,        INFO_DEATH_MURDER_CHEAT,                   NO_MSG) \
        MSG_MULTI_NOTIF(1, DEATH_MURDER_DROWN,                   NO_MSG,        INFO_DEATH_MURDER_DROWN,                   NO_MSG) \
@@ -826,15 +850,21 @@ void Send_Notification_WOCOVA(
        MSG_MULTI_NOTIF(1, WEAPON_UZI_MURDER_SNIPE,              NO_MSG,        INFO_WEAPON_UZI_MURDER_SNIPE,              NO_MSG) \
        MSG_MULTI_NOTIF(1, WEAPON_UZI_MURDER_SPRAY,              NO_MSG,        INFO_WEAPON_UZI_MURDER_SPRAY,              NO_MSG)
 
-#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
+#define MULTITEAM_CHOICE2(default,challow,prefix,chtype,optiona,optionb) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE)
+#define MULTITEAM_CHOICE3(default,challow,prefix,chtype,optiona,optionb) \
        MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
        MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
-       #if teams >= 3 \
-               MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
-       #endif \
-       #if teams >= 4 \
-               MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK) \
-       #endif
+       MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW)
+#define MULTITEAM_CHOICE4(default,challow,prefix,chtype,optiona,optionb) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK)
+#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
+       MULTITEAM_CHOICE##teams(default,challow,prefix,chtype,optiona,optionb)
+
 #define MSG_CHOICE_NOTIFICATIONS \
        MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 2,    MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_BROKEN_) \
        MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 2,      MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_TIME_) \
@@ -1300,7 +1330,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define MSG_INFO_NOTIF(default,name,strnum,flnum,args,hudargs,icon,normal,gentle) \
        NOTIF_ADD_AUTOCVAR(name, default) \
@@ -1342,7 +1372,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define MSG_CENTER_NOTIF(default,name,strnum,flnum,args,cpid,durcnt,normal,gentle) \
        NOTIF_ADD_AUTOCVAR(name, default) \
@@ -1386,7 +1416,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define MSG_MULTI_NOTIF(default,name,anncename,infoname,centername) \
        NOTIF_ADD_AUTOCVAR(name, default) \
@@ -1428,7 +1458,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define ACVNN(name) autocvar_notification_##name
 
@@ -1473,7 +1503,7 @@ float notif_global_error;
                        optiona,                                 /* optiona     */ \
                        optionb);                                /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 void RegisterNotifications_First()
 {
@@ -1516,13 +1546,13 @@ void RegisterNotifications_Done()
 }
 
 // NOW we actually activate the declarations
-ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First)
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First);
 MSG_ANNCE_NOTIFICATIONS
 MSG_INFO_NOTIFICATIONS
 MSG_CENTER_NOTIFICATIONS
 MSG_MULTI_NOTIFICATIONS
 MSG_CHOICE_NOTIFICATIONS
-ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done)
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done);
 #undef MSG_ANNCE_NOTIF
 #undef MSG_INFO_NOTIF
 #undef MSG_CENTER_NOTIF
index 3912773fba3794cdb2c7c7e838f2948f2472422b..f39c30c0007cb03165d06d181c6c04e534497e25 100644 (file)
@@ -4,7 +4,8 @@
 #endif
 
 // FTEQCC can do this
-#define HAVE_YO_DAWG_CPP
+// #define HAVE_YO_DAWG_CPP
+// No, this is an ex-"feature" and non-C11.
 
 #ifndef NOCOMPAT
 //# define WORKAROUND_XON010
index 1150dbbaac07cc9b34c7b0e3303cb24b1122fabe..d575bbfddbd3c32c3c70c9b210ebe6c76117b10c 100644 (file)
@@ -24,7 +24,7 @@
        func()
 #else
 # define ACCUMULATE_FUNCTION(func,otherfunc) \
-       .void _ACCUMULATE_##func##__##otherfunc;
+       .float _ACCUMULATE_##func##__##otherfunc
 void ACCUMULATE_call(string func)
 {
        float i;