]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
I'm a goddamn genius, IT WORKS!
authorSamual Lenks <samual@xonotic.org>
Thu, 22 Aug 2013 00:35:10 +0000 (20:35 -0400)
committerSamual Lenks <samual@xonotic.org>
Thu, 22 Aug 2013 00:35:10 +0000 (20:35 -0400)
17 files changed:
qcsrc/Makefile
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/server/accuracy.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/vote.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/scores.qc
qcsrc/server/sv_main.qc

index a92b06bc645b4f814cee7ddf1cedb2cda0de54a3..6f3a9b84c410730fdf8f954445e4656ec1b4470c 100644 (file)
@@ -34,6 +34,7 @@ QCCFLAGS ?= \
        -funtyped-nil \
        -fno-permissive \
        -fvariadic-args \
+       -DNOTIFICATIONS_DEBUG \
        $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
 
 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
index 5c5c41e1e49cd4dfe9eb40dc2ef2e60fa42e2a2e..d119269b50ce55fd38ecfd039463b13d183eee9a 100644 (file)
@@ -445,6 +445,7 @@ void Create_Notification_Entity(
        string durcnt,
        string normal,
        string gentle,
+       float challow,
        float chtype,
        float optiona,
        float optionb)
@@ -813,8 +814,15 @@ void Create_Notification_Entity(
                                                break;
                                        }
                                }
+                               notif.nent_challow = challow; // 0: never allowed, 1: allowed in warmup, 2: always allowed
                                notif.nent_stringcount = max(notif.nent_optiona.nent_stringcount, notif.nent_optionb.nent_stringcount);
                                notif.nent_floatcount = max(notif.nent_optiona.nent_floatcount, notif.nent_optionb.nent_floatcount);
+                               print(sprintf("INIT NOTIF DEBUG: %d %d\n", notif.nent_stringcount, notif.nent_floatcount));
+                               print(sprintf("^ optiona: %s %s : %d %d\n",
+                                       Get_Notif_TypeName(notif.nent_optiona.nent_type),
+                                       notif.nent_optiona.nent_name,
+                                       notif.nent_optiona.nent_stringcount,
+                                       notif.nent_optiona.nent_floatcount));
                        }
                        break;
                }
@@ -1152,7 +1160,16 @@ string Local_Notification_sprintf(
                        default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
                }
        }
-       return sprintf(strcat(input, "\n"), arg_slot[0], arg_slot[1], arg_slot[2], arg_slot[3], arg_slot[4], arg_slot[5], arg_slot[6]);
+       return sprintf(
+               strcat(input, "\n"),
+               arg_slot[0],
+               arg_slot[1],
+               arg_slot[2],
+               arg_slot[3],
+               arg_slot[4],
+               arg_slot[5],
+               arg_slot[6]
+       );
 }
 
 #ifdef CSQC
@@ -1453,13 +1470,19 @@ void Local_Notification(float net_type, float net_name, ...count)
 
                case MSG_CHOICE:
                {
-                       entity found_choice; 
-                       switch(cvar_string(sprintf("notification_%s", notif.nent_name)))
+                       entity found_choice;
+                       
+                       if(notif.nent_challow && (warmup_stage || (notif.nent_challow == 2)))
                        {
-                               case 1: found_choice = notif.nent_optiona; break;
-                               case 2: found_choice = notif.nent_optionb; break;
-                               default: return; // not enabled anyway
+                               switch(cvar_string(sprintf("notification_%s", notif.nent_name)))
+                               {
+                                       case 1: found_choice = notif.nent_optiona; break;
+                                       case 2: found_choice = notif.nent_optionb; break;
+                                       default: return; // not enabled anyway
+                               }
                        }
+                       else { found_choice = notif.nent_optiona; }
+                       
                        Local_Notification_WOVA(
                                found_choice.nent_type,
                                found_choice.nent_id, 
@@ -1707,6 +1730,26 @@ void Send_Notification(
        entity notif = Get_Notif_Ent(net_type, net_name);
        if not(notif) { backtrace("Send_Notification: Could not find notification entity!\n"); return; }
 
+       string s1 = ((0 < notif.nent_stringcount) ? ...(0, string) : "");
+       string s2 = ((1 < notif.nent_stringcount) ? ...(1, string) : "");
+       string s3 = ((2 < notif.nent_stringcount) ? ...(2, string) : "");
+       string s4 = ((3 < notif.nent_stringcount) ? ...(3, string) : "");
+       float f1 = ((0 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 0), float) : 0);
+       float f2 = ((1 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 1), float) : 0);
+       float f3 = ((2 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 2), float) : 0);
+       float f4 = ((3 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 3), float) : 0);
+
+       #ifdef NOTIFICATIONS_DEBUG
+       Debug_Notification(sprintf(
+               "Send_Notification(%d, %s, %s, %s, %s);\n",
+               broadcast,
+               Get_Notif_TypeName(net_type),
+               notif.nent_name,
+               MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
+               sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
+       ));
+       #endif
+
        if((notif.nent_stringcount + notif.nent_floatcount) > count)
        {
                backtrace(sprintf(
@@ -1734,26 +1777,6 @@ void Send_Notification(
                return;
        }
 
-       string s1 = ((0 < notif.nent_stringcount) ? ...(0, string) : "");
-       string s2 = ((1 < notif.nent_stringcount) ? ...(1, string) : "");
-       string s3 = ((2 < notif.nent_stringcount) ? ...(2, string) : "");
-       string s4 = ((3 < notif.nent_stringcount) ? ...(3, string) : "");
-       float f1 = ((0 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 0), float) : 0);
-       float f2 = ((1 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 1), float) : 0);
-       float f3 = ((2 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 2), float) : 0);
-       float f4 = ((3 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 3), float) : 0);
-
-       #ifdef NOTIFICATIONS_DEBUG
-       Debug_Notification(sprintf(
-               "Send_Notification(%d, %s, %s, %s, %s);\n",
-               broadcast,
-               Get_Notif_TypeName(net_type),
-               notif.nent_name,
-               MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
-               sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
-       ));
-       #endif
-
        if(
                server_is_dedicated
                &&
@@ -1780,8 +1803,8 @@ void Send_Notification(
 
        if(net_type == MSG_CHOICE)
        {
-               // float verbose_allowed = (autocvar_notification_server_allows_frag_verbose && ((autocvar_notification_server_allows_frag_verbose == 2) || inWarmupStage));
-               // THIS GETS TRICKY... now we have to cycle through each possible player (checking broadcast)
+               // float verbose_allowed = (autocvar_notification_server_allows_frag_verbose && ((autocvar_notification_server_allows_frag_verbose == 2) || warmup_stage));
+               // THIS GETS TRICKY... now we have to cycle through each possible player (checking broadcast)nent_challow
                // and then do an individual NOTIF_ONE_ONLY recursive call for each one depending on their option...
                // It's slow, but it's better than the alternatives:
                //   1. Constantly networking all info and letting client decide
@@ -1789,17 +1812,23 @@ void Send_Notification(
                entity found_choice; 
 
                #define RECURSE_FROM_CHOICE(ent,action) \
-                       switch(ent.msg_choice_choices[net_name]) \
+                       if(notif.nent_challow && (warmup_stage || (notif.nent_challow == 2))) \
                        { \
-                               case 1: found_choice = notif.nent_optiona; break; \
-                               case 2: found_choice = notif.nent_optionb; break; \
-                               default: action; \
+                               switch(ent.msg_choice_choices[net_name]) \
+                               { \
+                                       case 1: found_choice = notif.nent_optiona; break; \
+                                       case 2: found_choice = notif.nent_optionb; break; \
+                                       default: action; \
+                               } \
                        } \
+                       else { found_choice = notif.nent_optiona; } \
                        Send_Notification_WOVA( \
                                NOTIF_ONE_ONLY, \
                                ent, \
                                found_choice.nent_type, \
                                found_choice.nent_id, \
+                               found_choice.nent_stringcount, \
+                               found_choice.nent_floatcount, \
                                s1, s2, s3, s4, \
                                f1, f2, f3, f4);
 
@@ -1854,6 +1883,36 @@ void Send_Notification(
 
 // WOVA = Without Variable Arguments 
 void Send_Notification_WOVA(
+       float broadcast, entity client,
+       float net_type, float net_name,
+       float stringcount, float floatcount,
+       string s1, string s2, string s3, string s4,
+       float f1, float f2, float f3, float f4)
+{
+       #ifdef NOTIFICATIONS_DEBUG
+       entity notif = Get_Notif_Ent(net_type, net_name);
+       Debug_Notification(sprintf(
+               "Send_Notification_WOVA(%d, %s, %d, %d, %d, %s, %s);\n",
+               broadcast,
+               Get_Notif_TypeName(net_type),
+               notif.nent_name,
+               stringcount,
+               floatcount,
+               MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
+               sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
+       ));
+       #endif
+       
+       #define VARITEM(stringc,floatc,args) \
+               if((stringcount == stringc) && (floatcount == floatc)) \
+                       { Send_Notification(broadcast, client, net_type, net_name, args); return; }
+       EIGHT_VARS_TO_VARARGS_VARLIST
+       #undef VARITEM
+       Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
+}
+
+// WOCOVA = Without Counts Or Variable Arguments 
+void Send_Notification_WOCOVA(
        float broadcast, entity client,
        float net_type, float net_name,
        string s1, string s2, string s3, string s4,
@@ -1863,7 +1922,7 @@ void Send_Notification_WOVA(
        
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
-               "Send_Notification_WOVA(%d, %s, %s, %s, %s);\n",
+               "Send_Notification_WOCOVA(%d, %s, %s, %s, %s);\n",
                broadcast,
                Get_Notif_TypeName(net_type),
                notif.nent_name,
index ce0c618319d938ba4889e4470e751ba54d878cf2..317642676b5fd82aeaff7cb45033016c0cf8ce87 100644 (file)
@@ -62,6 +62,7 @@ void Create_Notification_Entity(
        string durcnt,
        string normal,
        string gentle,
+       float challow,
        float chtype,
        float optiona,
        float optionb);
@@ -104,6 +105,12 @@ void Send_Notification(
        float net_type, float net_name,
        ...count);
 void Send_Notification_WOVA(
+       float broadcast, entity client,
+       float net_type, float net_name,
+       float stringcount, float floatcount,
+       string s1, string s2, string s3, string s4,
+       float f1, float f2, float f3, float f4);
+void Send_Notification_WOCOVA(
        float broadcast, entity client,
        float net_type, float net_name,
        string s1, string s2, string s3, string s4,
@@ -705,20 +712,20 @@ void Send_Notification_WOVA(
        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,prefix,teams,chtype,optiona,optionb) \
-       MSG_CHOICE_NOTIF(default, prefix##RED, chtype, optiona##RED, optionb##RED) \
-       MSG_CHOICE_NOTIF(default, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+#define MULTITEAM_CHOICE(default,challow,prefix,teams,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, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
+               MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
        #endif \
        #if teams >= 4 \
-               MSG_CHOICE_NOTIF(default, prefix##PINK, chtype, optiona##PINK, optionb##PINK) \
+               MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK) \
        #endif
 #define MSG_CHOICE_NOTIFICATIONS \
-       MSG_CHOICE_NOTIF(1, CHOICE_FRAG,          MSG_CENTER,  CENTER_DEATH_MURDER_FRAG,         CENTER_DEATH_MURDER_FRAG_VERBOSE) \
-       MSG_CHOICE_NOTIF(1, CHOICE_FRAGGED,       MSG_CENTER,  CENTER_DEATH_MURDER_FRAGGED,      CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
-       MSG_CHOICE_NOTIF(1, CHOICE_TYPEFRAG,      MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAG,     CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
-       MSG_CHOICE_NOTIF(1, CHOICE_TYPEFRAGGED,   MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAGGED,  CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG,          MSG_CENTER,  CENTER_DEATH_MURDER_FRAG,         CENTER_DEATH_MURDER_FRAG_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED,       MSG_CENTER,  CENTER_DEATH_MURDER_FRAGGED,      CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG,      MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAG,     CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAGGED,   MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAGGED,  CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
        //MSG_CHOICE_NOTIF(2, CHOICE_)
 
 
@@ -1114,6 +1121,7 @@ float NOTIF_CPID_COUNT;
 .float nent_cpid;
 .string nent_durcnt;
 .string nent_string;
+.float nent_challow;
 .entity nent_optiona;
 .entity nent_optionb;
 
@@ -1157,6 +1165,7 @@ float NOTIF_CPID_COUNT;
                        "",                            /* durcnt */ \
                        "",                            /* normal */ \
                        "",                            /* gentle */ \
+                       NO_MSG,                        /* challow */ \
                        NO_MSG,                        /* chtype */ \
                        NO_MSG,                        /* optiona */ \
                        NO_MSG);                       /* optionb */ \
@@ -1192,6 +1201,7 @@ float NOTIF_CPID_COUNT;
                        "",                            /* durcnt */ \
                        normal,                        /* normal */ \
                        gentle,                        /* gentle */ \
+                       NO_MSG,                        /* challow */ \
                        NO_MSG,                        /* chtype */ \
                        NO_MSG,                        /* optiona */ \
                        NO_MSG);                       /* optionb */ \
@@ -1229,6 +1239,7 @@ float NOTIF_CPID_COUNT;
                        durcnt,                        /* durcnt */ \
                        normal,                        /* normal */ \
                        gentle,                        /* gentle */ \
+                       NO_MSG,                        /* challow */ \
                        NO_MSG,                        /* chtype */ \
                        NO_MSG,                        /* optiona */ \
                        NO_MSG);                       /* optionb */ \
@@ -1264,44 +1275,47 @@ float NOTIF_CPID_COUNT;
                        "",                            /* durcnt */ \
                        "",                            /* normal */ \
                        "",                            /* gentle */ \
+                       NO_MSG,                        /* challow */ \
                        NO_MSG,                        /* chtype */ \
                        NO_MSG,                        /* optiona */ \
                        NO_MSG);                       /* optionb */ \
        } \
        ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
-#define MSG_CHOICE_NOTIF(default,name,chtype,optiona,optionb) \
+#define MSG_CHOICE_NOTIF(default,challow,name,chtype,optiona,optionb) \
        NOTIF_ADD_AUTOCVAR(name, default) \
+       NOTIF_ADD_AUTOCVAR(name##_ALLOWED, challow) \
        float name; \
        void RegisterNotification_##name() \
        { \
                SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CHOICE_COUNT) \
                CHECK_MAX_COUNT(name, NOTIF_CHOICE_MAX, NOTIF_CHOICE_COUNT, "MSG_CHOICE") \
                Create_Notification_Entity( \
-                       default,                       /* var_default */ \
-                       autocvar_notification_##name,  /* var_cvar */ \
-                       MSG_CHOICE,                    /* typeid */ \
-                       name,                          /* nameid */ \
-                       strtoupper(#name),             /* namestring */ \
-                       NO_MSG,                        /* anncename */ \
-                       NO_MSG,                        /* infoname */ \
-                       NO_MSG,                        /* centername */ \
-                       NO_MSG,                        /* channel */ \
-                       "",                            /* snd */ \
-                       NO_MSG,                        /* vol */ \
-                       NO_MSG,                        /* position */ \
-                       NO_MSG,                        /* strnum */ \
-                       NO_MSG,                        /* flnum */ \
-                       "",                            /* args */ \
-                       "",                            /* hudargs */ \
-                       "",                            /* icon */ \
-                       NO_MSG,                        /* cpid */ \
-                       "",                            /* durcnt */ \
-                       "",                            /* normal */ \
-                       "",                            /* gentle */ \
-                       chtype,                        /* chtype */ \
-                       optiona,                       /* optiona */ \
-                       optionb);                      /* optionb */ \
+                       default,                                 /* var_default */ \
+                       autocvar_notification_##name,            /* var_cvar */ \
+                       MSG_CHOICE,                              /* typeid */ \
+                       name,                                    /* nameid */ \
+                       strtoupper(#name),                       /* namestring */ \
+                       NO_MSG,                                  /* anncename */ \
+                       NO_MSG,                                  /* infoname */ \
+                       NO_MSG,                                  /* centername */ \
+                       NO_MSG,                                  /* channel */ \
+                       "",                                      /* snd */ \
+                       NO_MSG,                                  /* vol */ \
+                       NO_MSG,                                  /* position */ \
+                       NO_MSG,                                  /* strnum */ \
+                       NO_MSG,                                  /* flnum */ \
+                       "",                                      /* args */ \
+                       "",                                      /* hudargs */ \
+                       "",                                      /* icon */ \
+                       NO_MSG,                                  /* cpid */ \
+                       "",                                      /* durcnt */ \
+                       "",                                      /* normal */ \
+                       "",                                      /* gentle */ \
+                       autocvar_notification_##name##_ALLOWED,  /* challow */ \
+                       chtype,                                  /* chtype */ \
+                       optiona,                                 /* optiona */ \
+                       optionb);                                /* optionb */ \
        } \
        ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
index 3c737f6e6cec277f4e8d225f6ccefcc0004a271d..b8b167beb37742ff79ca7c4b650cf4fcaf5e696c 100644 (file)
@@ -109,7 +109,7 @@ void accuracy_add(entity e, float w, float fired, float hit)
 
 float accuracy_isgooddamage(entity attacker, entity targ)
 {
-       if(!inWarmupStage)
+       if(!warmup_stage)
        if(IS_CLIENT(targ))
        if(targ.deadflag == DEAD_NO)
        if(IsDifferentTeam(attacker, targ))
@@ -119,7 +119,7 @@ float accuracy_isgooddamage(entity attacker, entity targ)
 
 float accuracy_canbegooddamage(entity attacker)
 {
-       if(!inWarmupStage)
+       if(!warmup_stage)
                return TRUE;
        return FALSE;
 }
index d7ca62ba01a800c4ee8f7ee848940649b84206a0..90a7eeed8a51c564afaf1a8a352c63000c5ef9c8 100644 (file)
@@ -170,7 +170,7 @@ void PutObserverInServer (void)
        
        if(self.alivetime)
        {
-               if(!inWarmupStage)
+               if(!warmup_stage)
                        PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
                self.alivetime = 0;
        }
@@ -424,7 +424,7 @@ void PutClientInServer (void)
                        self.nex_charge = autocvar_g_balance_nex_charge_start;
                }
 
-               if(inWarmupStage)
+               if(warmup_stage)
                {
                        self.ammo_shells = warmup_start_ammo_shells;
                        self.ammo_nails = warmup_start_ammo_nails;
@@ -593,7 +593,7 @@ void PutClientInServer (void)
                self.weaponname = "";
                self.switchingweapon = 0;
 
-               if(!inWarmupStage)
+               if(!warmup_stage)
                        if(!self.alivetime)
                                self.alivetime = time;
 
index fbe6d7aea9dbda56745613bc34d0944d39c1cdad..4b28f88b8866ae3bb1f3a85ccb0abc5d6088273b 100644 (file)
@@ -857,7 +857,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
        if not(IS_PLAYER(source))
        {
                if not(intermission_running)
-                       if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(inWarmupStage || gameover)))
+                       if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(warmup_stage || gameover)))
                                teamsay = -1; // spectators
        }
 
index ec9c33b1987b093005f28c5df16c062d3d9e9c65..4850049e5c9b351705ea28ea10cdc5fa7d7314f9 100644 (file)
@@ -190,7 +190,7 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes
                {
                        if(IS_CLIENT(self))
                        {
-                               if(inWarmupStage || autocvar_sv_ready_restart || g_race_qualifying == 2)
+                               if(warmup_stage || autocvar_sv_ready_restart || g_race_qualifying == 2)
                                {
                                        if(!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
                                        {
index 73bf0df4f7d279bb92709f1203a711c290831edf..2cbed75d389bba697cbbd0211344499d5b78c39c 100644 (file)
@@ -554,7 +554,7 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAN
                                
                                if(timeout_status) { print_to(caller, "^7Error: A timeout is already active."); }
                                else if(vote_called) { print_to(caller, "^7Error: You can not call a timeout while a vote is active."); }
-                               else if(inWarmupStage && !g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); }
+                               else if(warmup_stage && !g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); }
                                else if(time < game_starttime) { print_to(caller, "^7Error: You can not call a timeout while the map is being restarted."); }
                                else if(caller && (caller.allowed_timeouts < 1)) { print_to(caller, "^7Error: You already used all your timeout calls for this map."); }
                                else if(caller && !IS_PLAYER(caller)) { print_to(caller, "^7Error: You must be a player to call a timeout."); }
index c7010dfb756369a47cd41aff93425d567d69bfc4..3a6de430cd0a6d0151e342fa8b45d6df286f1035 100644 (file)
@@ -33,7 +33,7 @@ float Nagger_SendEntity(entity to, float sendflags)
                if(to.vote_selection == 0)
                        nags |= 8;
        }
-       if(inWarmupStage)
+       if(warmup_stage)
                nags |= 16;
 
        if(sendflags & 64)
@@ -191,7 +191,7 @@ void VoteCount(float first_count)
        vote_accept_count = vote_reject_count = vote_abstain_count = 0;
        
        float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
-                               || ((autocvar_sv_vote_nospectators == 1) && (inWarmupStage || gameover))
+                               || ((autocvar_sv_vote_nospectators == 1) && (warmup_stage || gameover))
                                || (autocvar_sv_vote_nospectators == 0));
                                
        float vote_player_count = 0, notvoters = 0;
@@ -429,7 +429,7 @@ void ReadyRestart_force()
        restart_mapalreadyrestarted = 0; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
 
        // disable the warmup global for the server
-       inWarmupStage = 0; // once the game is restarted the game is in match stage
+       warmup_stage = 0; // once the game is restarted the game is in match stage
 
        // reset the .ready status of all players (also spectators)
        FOR_EACH_REALCLIENT(tmp_player) { tmp_player.ready = 0; }
@@ -778,7 +778,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
                case CMD_REQUEST_COMMAND:
                {
                        float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
-                               || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage) 
+                               || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) 
                                || (autocvar_sv_vote_nospectators == 0));
                                
                        float tmp_playercount = 0;
@@ -883,7 +883,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                                        default: // calling a vote for master
                                        {
                                                float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
-                                                       || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage) 
+                                                       || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) 
                                                        || (autocvar_sv_vote_nospectators == 0));
                                                
                                                if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
index 74d4345b824529469b3855d185a249e14221ccd4..2b1826691f3c569e41cd78e9ed99acc57c67aeb5 100644 (file)
@@ -21,7 +21,7 @@ float g_warmup_limit;
 float g_warmup_allguns;
 float g_warmup_allow_timeout;
 float g_race_qualifying;
-float inWarmupStage;
+float warmup_stage;
 float g_pickup_respawntime_weapon;
 float g_pickup_respawntime_superweapon;
 float g_pickup_respawntime_ammo;
index 7e764ccf5a3b7389a33e927d8047ddfd25c64a7e..6832a54d9f0ee3f3334d12595e9961fbb57e043f 100644 (file)
@@ -143,7 +143,7 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                                GiveFrags_randomweapons.classname = "GiveFrags_randomweapons";
                        }
 
-                       if(inWarmupStage)
+                       if(warmup_stage)
                                WEPSET_COPY_EA(GiveFrags_randomweapons, warmup_start_weapons);
                        else
                                WEPSET_COPY_EA(GiveFrags_randomweapons, start_weapons);
@@ -247,7 +247,7 @@ void Obituary_SpecialDeath(
                {
                        if(deathent.death_msgmurder)
                        {
-                               Send_Notification_WOVA(
+                               Send_Notification_WOCOVA(
                                        NOTIF_ONE,
                                        notif_target,
                                        MSG_MULTI,
@@ -255,7 +255,7 @@ void Obituary_SpecialDeath(
                                        s1, s2, s3, "",
                                        f1, f2, f3, 0
                                );
-                               Send_Notification_WOVA(
+                               Send_Notification_WOCOVA(
                                        NOTIF_ALL_EXCEPT,
                                        notif_target,
                                        MSG_INFO,
@@ -269,7 +269,7 @@ void Obituary_SpecialDeath(
                {
                        if(deathent.death_msgself)
                        {
-                               Send_Notification_WOVA(
+                               Send_Notification_WOCOVA(
                                        NOTIF_ONE,
                                        notif_target,
                                        MSG_MULTI,
@@ -277,7 +277,7 @@ void Obituary_SpecialDeath(
                                        s1, s2, s3, "",
                                        f1, f2, f3, 0
                                );
-                               Send_Notification_WOVA(
+                               Send_Notification_WOCOVA(
                                        NOTIF_ALL_EXCEPT,
                                        notif_target,
                                        MSG_INFO,
@@ -308,7 +308,7 @@ float Obituary_WeaponDeath(
 
                if(death_message)
                {
-                       Send_Notification_WOVA(
+                       Send_Notification_WOCOVA(
                                NOTIF_ONE,
                                notif_target,
                                MSG_MULTI,
@@ -316,7 +316,7 @@ float Obituary_WeaponDeath(
                                s1, s2, s3, "",
                                f1, f2, 0, 0
                        );
-                       Send_Notification_WOVA(
+                       Send_Notification_WOCOVA(
                                NOTIF_ALL_EXCEPT,
                                notif_target,
                                MSG_INFO,
index e8b34509838cb2e56d05b685165ddb792cade3b9..52cf9643014781d260f4320cbd90851f1c758a2d 100644 (file)
@@ -1709,7 +1709,7 @@ float WinningCondition_Onslaught()
 
        WinningConditionHelper(); // set worldstatus
 
-       if(inWarmupStage)
+       if(warmup_stage)
                return WINNING_NO;
 
        // first check if the game has ended
@@ -2102,7 +2102,7 @@ void CheckRules_World()
        fraglimit = autocvar_fraglimit;
        leadlimit = autocvar_leadlimit;
 
-       if(inWarmupStage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
+       if(warmup_stage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
        {
                if(timelimit > 0)
                        timelimit = 0; // timelimit is not made for warmup
index ef05b5a5b6ccc4fa647c7b13d724e96592dacab6..ea0dacdfe6896c596da19be0e79710d3e2e0f5ac 100644 (file)
@@ -806,7 +806,7 @@ void readplayerstartcvars()
                start_ammo_fuel = cvar("g_start_ammo_fuel");
        }
 
-       if (inWarmupStage)
+       if (warmup_stage)
        {
                warmup_start_ammo_shells = start_ammo_shells;
                warmup_start_ammo_nails = start_ammo_nails;
@@ -961,13 +961,13 @@ void readlevelcvars(void)
        sv_autotaunt = cvar("sv_autotaunt");
        sv_taunt = cvar("sv_taunt");
 
-       inWarmupStage = cvar("g_warmup");
+       warmup_stage = cvar("g_warmup");
        g_warmup_limit = cvar("g_warmup_limit");
        g_warmup_allguns = cvar("g_warmup_allguns");
        g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
 
        if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
-               inWarmupStage = 0; // these modes cannot work together, sorry
+               warmup_stage = 0; // these modes cannot work together, sorry
 
        g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
        g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon");
@@ -1033,7 +1033,7 @@ void readlevelcvars(void)
     if(!g_weapon_stay)
         g_weapon_stay = cvar("g_weapon_stay");
 
-       if not(inWarmupStage)
+       if not(warmup_stage)
                game_starttime = time + cvar("g_start_delay");
 
        readplayerstartcvars();
index 7c49045650b3479f170f67f9b16d7c126f351ddc..3643968836e860dde28e18380d2c1f6b32c3cc1c 100644 (file)
@@ -100,7 +100,7 @@ float CA_CheckWinner()
 
 void CA_RoundStart()
 {
-       if(inWarmupStage)
+       if(warmup_stage)
                allowed_to_spawn = TRUE;
        else
                allowed_to_spawn = FALSE;
index e4be2d7ab4ce2ea2b9422456b2affc7fbec3f2fd..d9c1bafab3c460a925292fc0977b57fb091fdc5f 100644 (file)
@@ -576,7 +576,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
        float i;
        if (damage <= 0)
                return;
-       if(inWarmupStage)
+       if(warmup_stage)
                return;
        if (attacker != self)
        {
@@ -614,7 +614,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
 #endif
                self.lasthealth = self.health;
        }
-       else if not(inWarmupStage)
+       else if not(warmup_stage)
        {
                if (attacker == self)
                        bprint(Team_ColoredFullName(self.team), " generator spontaneously exploded due to overtime!\n");
index 0769a4f038021e85b09ebabb757090c482de98a6..6a9f866ed4b517c0cb8fda708204b467e48ef98b 100644 (file)
@@ -349,7 +349,7 @@ float PlayerScore_Add(entity player, float scorefield, float score)
        if(score)
                if(scores_label[scorefield] != "")
                        s.SendFlags |= pow(2, scorefield);
-       if(!inWarmupStage)
+       if(!warmup_stage)
                PlayerStats_Event(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label[scorefield]), score);
        return (s.(scores[scorefield]) += score);
 }
index a9b2443b73f1715fdf1678a7a8b781517a32f624..2dc7ab190035f44c5212a23c088adb284084c6ca 100644 (file)
@@ -220,7 +220,7 @@ void StartFrame (void)
        game_delay_last = game_delay;
 
        // if in warmup stage and limit for warmup is hit start match
-       if (inWarmupStage)
+       if (warmup_stage)
        if ((g_warmup_limit > 0 && time >= g_warmup_limit)
         || (g_warmup_limit == 0 && autocvar_timelimit != 0 && time >= autocvar_timelimit * 60))
        {