]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
authorSamual Lenks <samual@xonotic.org>
Tue, 1 Jan 2013 19:29:35 +0000 (14:29 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 1 Jan 2013 19:29:35 +0000 (14:29 -0500)
49 files changed:
_hud_descriptions.cfg
commands.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
qcsrc/Makefile
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/main.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/projectile.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/common/util.qh
qcsrc/csqcmodellib/cl_model.qc
qcsrc/menu/progs.src
qcsrc/menu/sys-post.qh [new file with mode: 0644]
qcsrc/menu/sys-pre.qh [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_hudpanel_weapons.c
qcsrc/menu/xonotic/maplist.c
qcsrc/menu/xonotic/util.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/bot.qc
qcsrc/server/cl_client.qc
qcsrc/server/command/common.qc
qcsrc/server/command/sv_cmd.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_ctf.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/pathlib.qh
qcsrc/server/playerstats.qc
qcsrc/server/t_plats.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles_def.qh
qcsrc/server/w_hagar.qc
qcsrc/server/w_seeker.qc
qcsrc/warpzonelib/common.qh

index cb95f968132ba7145549310b491ec98885459a7a..4c832ef1e9b9a6208be14c874f302a93528ff300 100644 (file)
@@ -52,7 +52,11 @@ seta hud_panel_weapons_complainbubble_color_unavailable "" "color of the complai
 seta hud_panel_weapons_ammo_color "" "color of status bar"
 seta hud_panel_weapons_ammo_alpha "" "alpha of status bar"
 seta hud_panel_weapons_timeout "" "panel disappears if you don't switch weapon for this amount of seconds"
-seta hud_panel_weapons_timeout_effect "" "disappearance effect: 0) no effect; 1) panel moves out of screen; 2) panel fades out"
+seta hud_panel_weapons_timeout_effect "" "disappearance effect: 0) no effect; 1) panel fades out; 2) panel moves off the screen; 3) combination of 1 and 2"
+seta hud_panel_weapons_timeout_fadebgmin "" "minimum alpha of the panel background while in effect mode 1"
+seta hud_panel_weapons_timeout_fadefgmin "" "minimum alpha of the panel foreground while in effect mode 1"
+seta hud_panel_weapons_timeout_speed_in "" "speed that fading/moving onto the screen occurs"
+seta hud_panel_weapons_timeout_speed_out "" "speed that fading/moving off of the screen occurs"
 seta hud_panel_weapons_label "" "1 = show number of weapon, 2 = show bound key of weapon"
 seta hud_panel_weapons_accuracy "" "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
 seta hud_panel_weapons_ammo "" "show ammo as a status bar"
index 33e8e42cfc0781b866263350767f22d83cc6814a..0aece8a628129a88a898cef037fc4c75034f6224 100644 (file)
@@ -289,7 +289,7 @@ set sv_vote_command_restriction_movetopink "1;"
 // =================================
 set sv_vote_call 1 "Allow users to call a vote for the commands in sv_vote_commands"
 set sv_vote_change 1 "Allow voters to change their mind after already voting"
-set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto" "these commands can be voted"
+set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams" "these commands can be voted"
 set sv_vote_only_commands ""
 set sv_vote_master_commands "movetored movetoblue movetoyellow movetopink" "Extra commands which vote masters can execute by themselves, along with the normal sv_vote_commands." // maybe add kickban here (but then sv_vote_master 0)
 set sv_vote_master 1   "Allows the use of the vote master system"
@@ -303,6 +303,7 @@ set sv_vote_wait 120        "a player can not call a vote again for this many seconds w
 set sv_vote_stop 15    "a player can not call a vote again for this many seconds when he stopped this vote (e.g. to correct it)"
 set sv_vote_majority_factor 0.5        "What percentage of the PLAYERS constitute a majority? (Must be at least 0.5, recommended: 0.5)"
 set sv_vote_majority_factor_of_voted 0.5 "What percentage of the VOTERS constitute a majority too? (Must be at least 0.5, recommended: 0.5)"
+set sv_vote_gamestart 0 "Allow voting during map change"
 // when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
 set sv_vote_override_mostrecent 0
 
index 6472a257963fad8c9526546031d3d6e7c716779f..c70e1b103a79bfe75504c9c8a86c4696b28f0387 100644 (file)
@@ -52,8 +52,12 @@ seta hud_panel_weapons_ammo "1"
 seta hud_panel_weapons_ammo_color "0 1 0"
 seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
-seta hud_panel_weapons_timeout "5"
-seta hud_panel_weapons_timeout_effect "3"
+seta hud_panel_weapons_timeout "1"
+seta hud_panel_weapons_timeout_effect "1"
+seta hud_panel_weapons_timeout_fadebgmin "0.4" 
+seta hud_panel_weapons_timeout_fadefgmin "0.4"
+seta hud_panel_weapons_timeout_speed_in "0.25"
+seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
 
 seta hud_panel_ammo 1
index bb7e0662e32e3bcbce1060385a3f0d42a6961549..4c0a7f46d06ad9159dce70b715d982dfd8abb5b1 100644 (file)
@@ -54,6 +54,10 @@ seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
 seta hud_panel_weapons_timeout "0"
 seta hud_panel_weapons_timeout_effect "0"
+seta hud_panel_weapons_timeout_fadebgmin "0" 
+seta hud_panel_weapons_timeout_fadefgmin "0"
+seta hud_panel_weapons_timeout_speed_in "0.25"
+seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
 
 seta hud_panel_ammo 1
index e0921ad35337d272f8e0c91a0032864349981cac..56ec31c8091c5566957fcb7f2112cd9f8ef7a398 100644 (file)
@@ -54,6 +54,10 @@ seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
 seta hud_panel_weapons_timeout "0"
 seta hud_panel_weapons_timeout_effect "0"
+seta hud_panel_weapons_timeout_fadebgmin "0" 
+seta hud_panel_weapons_timeout_fadefgmin "0"
+seta hud_panel_weapons_timeout_speed_in "0.25"
+seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
 
 seta hud_panel_ammo 1
index 119f7b18f6f8cd3f163e7e6ac172db53ed4516ad..263412734311e3e73c1015f5b90596674257da7c 100644 (file)
@@ -54,6 +54,10 @@ seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
 seta hud_panel_weapons_timeout "3"
 seta hud_panel_weapons_timeout_effect "1"
+seta hud_panel_weapons_timeout_fadebgmin "0" 
+seta hud_panel_weapons_timeout_fadefgmin "0"
+seta hud_panel_weapons_timeout_speed_in "0.25"
+seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
 
 seta hud_panel_ammo 1
index 3cf0feb753e5e08b748ce408a03f42affc78393d..42a0571bb3d96f3d92e7c87ff965f60ff982177c 100644 (file)
@@ -54,6 +54,10 @@ seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
 seta hud_panel_weapons_timeout "0"
 seta hud_panel_weapons_timeout_effect "0"
+seta hud_panel_weapons_timeout_fadebgmin "0" 
+seta hud_panel_weapons_timeout_fadefgmin "0"
+seta hud_panel_weapons_timeout_speed_in "0.25"
+seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "0"
 
 seta hud_panel_ammo 1
index fdd9fffff56062357fe277bca02a41131aa2c3c2..9fa80f8f884b8f215c249e0e9ce64a1d0f4a7a80 100644 (file)
@@ -11,18 +11,28 @@ QCCFLAGS ?= \
        -Werror -Wall \
        -Wno-field-redeclared \
        -Wno-double-declaration \
-       -Wno-assign-function-types \
-       -Wno-unused-variable \
+       -Wno-uninitialized-global \
        -O3 \
+       -fadjust-vector-fields \
        -fftepp \
+       -fftepp-predefs \
+       -frelaxed-switch \
+       -fshort-logic \
+       -fno-perl-logic \
        -ftranslatable-strings \
-       -fadjust-vector-fields \
-       -fassign-function-types \
+       -fno-initialized-nonconstants \
+       -fno-assign-function-types \
+       -flno \
        -fcorrect-ternary \
+       -fno-single-vector-defs \
        -fcorrect-logic \
        -ftrue-empty-strings \
-       -fshort-logic \
-       -flno \
+       -fno-false-empty-strings \
+       -futf8 \
+       -fno-bail-on-werror \
+       -floop-labels \
+       -funtyped-nil \
+       -fno-permissive \
        $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
 else
 # this. is. fteqccccccccccccccccccc!
index 4eac3af0952a4c2fc580fc4abe6c5659445ab856..9abcea202bdb3840597d6bb75847e7ad994e0023 100644 (file)
@@ -120,7 +120,7 @@ void CSQC_Init(void)
        draw_endBoldFont();
        menu_visible = FALSE;
        menu_show = menu_show_error;
-       menu_action = menu_sub_null;
+       menu_action = func_null;
 
        for(i = 0; i < 255; ++i)
                if(getplayerkeyvalue(i, "viewentity") == "")
@@ -181,6 +181,7 @@ void CSQC_Init(void)
        turrets_precache();
     Announcer_Precache();
        Tuba_Precache();
+       CSQCPlayer_Precache();
        
        if(autocvar_cl_reticle)
        {
@@ -400,7 +401,7 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
        if (MapVote_InputEvent(bInputType, nPrimary, nSecondary))
                return true;
 
-       if(menu_visible)
+       if(menu_visible && menu_action)
                if(menu_action(bInputType, nPrimary, nSecondary))
                        return TRUE;
 
@@ -794,6 +795,18 @@ void Ent_Remove()
        if(self.entremove)
                self.entremove();
 
+       if(self.skeletonindex)
+       {
+               skel_delete(self.skeletonindex);
+               self.skeletonindex = 0;
+       }
+
+       if(self.snd_looping > 0)
+       {
+               sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+               self.snd_looping = 0;
+       }
+
        self.enttype = 0;
        self.classname = "";
        self.draw = menu_sub_null;
index 4771a8ea99c9ecb192c834599a025999650db725..dccee35de1559ccf42e6773ee2be22b0f564c98a 100644 (file)
@@ -782,7 +782,6 @@ void CSQC_UpdateView(float w, float h)
 
 
        // improved polyblend
-       vector rgb;
        if(autocvar_hud_contents)
        {
                float contentalpha_temp, incontent, liquidalpha, contentfadetime;
index ed56f718381cc0e2ecfe61c29d8e3ed2a59a261c..cb06932e45e00eefaa25e29dd3abf2e25df753c4 100644 (file)
@@ -315,11 +315,14 @@ string autocvar_hud_panel_weapons_complainbubble_color_unavailable;
 float autocvar_hud_panel_weapons_complainbubble_fadetime;
 float autocvar_hud_panel_weapons_complainbubble_padding;
 float autocvar_hud_panel_weapons_complainbubble_time;
-var float autocvar_hud_panel_weapons_fade = 1;
 float autocvar_hud_panel_weapons_label;
 float autocvar_hud_panel_weapons_onlyowned;
 float autocvar_hud_panel_weapons_timeout;
 float autocvar_hud_panel_weapons_timeout_effect;
+float autocvar_hud_panel_weapons_timeout_fadebgmin;
+float autocvar_hud_panel_weapons_timeout_fadefgmin;
+var float autocvar_hud_panel_weapons_timeout_speed_in = 0.25; 
+var float autocvar_hud_panel_weapons_timeout_speed_out = 0.75;
 float autocvar_hud_progressbar_alpha;
 float autocvar_hud_showbinds;
 float autocvar_hud_showbinds_limit;
@@ -404,3 +407,4 @@ string autocvar__cl_playermodel;
 float autocvar_cl_precacheplayermodels;
 float autocvar_cl_deathglow;
 float autocvar_developer_csqcentities;
+float autocvar_g_jetpack_attenuation;
index e7988cb5ad1d165920dd654f336bab94b9b430ee..c4a5b39a6b27c77d0b8829d0658f513195f760b7 100644 (file)
@@ -443,6 +443,7 @@ void CSQCModel_Effects_PostUpdate(void)
        if(self.csqcmodel_teleported)
                Projectile_ResetTrail(self.origin);
 }
+.float snd_looping;
 void CSQCModel_Effects_Apply(void)
 {
        float eff = self.csqcmodel_effects;
@@ -514,6 +515,28 @@ void CSQCModel_Effects_Apply(void)
        if(self.csqcmodel_effects & CSQCMODEL_EF_RESPAWNGHOST)
                self.renderflags |= RF_ADDITIVE;
                // also special in CSQCPlayer_GlowMod_Apply
+
+       if(self.csqcmodel_modelflags & MF_ROCKET)
+       {
+               if(!self.snd_looping)
+               {
+                       sound(self, CH_TRIGGER_SINGLE, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+                       self.snd_looping = CH_TRIGGER_SINGLE;
+               }
+       }
+       else
+       {
+               if(self.snd_looping)
+               {
+                       sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+                       self.snd_looping = 0;
+               }
+       }
+}
+
+void CSQCPlayer_Precache()
+{
+       precache_sound("misc/jetpack_fly.wav");
 }
 
 // FEATURE: auto glowmod
index 77292f85f1307640fc70d3cb1524cd77166cebae..74a726d68850272f30b658ff350d01db447cdd64 100644 (file)
@@ -463,15 +463,15 @@ void HUD_Weapons(void)
        WEPSET_COPY_AS(weapons_stat);
        float i, f, a, j, factor;
        float screen_ar, center_x, center_y;
-       float weapon_count, weapon_id, weapon_alpha;
+       float weapon_count, weapon_id;
        float row, column, rows, columns;
        float aspect = autocvar_hud_panel_weapons_aspect;
 
        float show_accuracy = false, panel_weapon_accuracy;
 
        float timeout = autocvar_hud_panel_weapons_timeout;
-       float timein_effect_length = (autocvar_hud_panel_weapons_timeout_effect ? 0.375 : 0);
-       float timeout_effect_length = (autocvar_hud_panel_weapons_timeout_effect ? 0.75 : 0);
+       float timein_effect_length = autocvar_hud_panel_weapons_timeout_speed_in; //? 0.375 : 0);
+       float timeout_effect_length = autocvar_hud_panel_weapons_timeout_speed_out; //? 0.75 : 0);
 
        float ammo_type, ammo_full;
        float barsize_x = 0, barsize_y = 0, baroffset_x = 0, baroffset_y = 0;
@@ -492,7 +492,7 @@ void HUD_Weapons(void)
        {
                if((!autocvar_hud_panel_weapons) || (spectatee_status == -1))
                        return;
-               else if(timeout && time >= weapontime + timeout + timeout_effect_length)
+               else if(timeout && time >= weapontime + timeout + timeout_effect_length && ((autocvar_hud_panel_weapons_timeout_effect != 1) && !(autocvar_hud_panel_weapons_timeout_fadebgmin + autocvar_hud_panel_weapons_timeout_fadefgmin)))
                {
                        weaponprevtime = time;
                        return;
@@ -507,15 +507,6 @@ void HUD_Weapons(void)
 
        draw_beginBoldFont();
 
-       // calculate fading effect to weapon images for when the panel is idle
-       if(autocvar_hud_panel_weapons_fade)
-       {
-               weapon_alpha = 3.2 - 2 * (time - weapontime);
-               weapon_alpha = bound(0.7, weapon_alpha, 1) * panel_fg_alpha;
-       }
-       else
-               weapon_alpha = panel_fg_alpha;
-
        // figure out weapon order (how the weapons are sorted) // TODO make this configurable
        if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
        {
@@ -596,12 +587,21 @@ void HUD_Weapons(void)
        {
                if (timeout && time >= weapontime + timeout) // apply timeout effect if needed
                {
-                       f = (time - (weapontime + timeout)) / timeout_effect_length;
-                       if (autocvar_hud_panel_weapons_timeout_effect == 1 || autocvar_hud_panel_weapons_timeout_effect == 3)
+                       f = bound(0, (time - (weapontime + timeout)) / timeout_effect_length, 1);
+
+                       // fade the panel alpha
+                       if(autocvar_hud_panel_weapons_timeout_effect == 1)
+                       {
+                               panel_bg_alpha *= (autocvar_hud_panel_weapons_timeout_fadebgmin * f + (1 - f));
+                               panel_fg_alpha *= (autocvar_hud_panel_weapons_timeout_fadefgmin * f + (1 - f));
+                       }
+                       else if(autocvar_hud_panel_weapons_timeout_effect == 3)
                        {
                                panel_bg_alpha *= (1 - f);
                                panel_fg_alpha *= (1 - f);
                        }
+
+                       // move the panel off the screen
                        if (autocvar_hud_panel_weapons_timeout_effect == 2 || autocvar_hud_panel_weapons_timeout_effect == 3)
                        {
                                f *= f; // for a cooler movement
@@ -627,12 +627,21 @@ void HUD_Weapons(void)
                }
                else if (timeout && time < weaponprevtime + timein_effect_length) // apply timein effect if needed
                {
-                       f = (time - weaponprevtime) / timein_effect_length;
-                       if (autocvar_hud_panel_weapons_timeout_effect == 1 || autocvar_hud_panel_weapons_timeout_effect == 3)
+                       f = bound(0, (time - weaponprevtime) / timein_effect_length, 1);
+
+                       // fade the panel alpha
+                       if(autocvar_hud_panel_weapons_timeout_effect == 1)
+                       {
+                               panel_bg_alpha *= (autocvar_hud_panel_weapons_timeout_fadebgmin * (1 - f) + f);
+                               panel_fg_alpha *= (autocvar_hud_panel_weapons_timeout_fadefgmin * (1 - f) + f);
+                       }
+                       else if(autocvar_hud_panel_weapons_timeout_effect == 3)
                        {
                                panel_bg_alpha *= (f);
                                panel_fg_alpha *= (f);
                        }
+
+                       // move the panel back on screen
                        if (autocvar_hud_panel_weapons_timeout_effect == 2 || autocvar_hud_panel_weapons_timeout_effect == 3)
                        {
                                f *= f; // for a cooler movement
@@ -725,7 +734,7 @@ void HUD_Weapons(void)
 
                // draw background behind currently selected weapon
                if(self.weapon == switchweapon)
-                       drawpic_aspect_skin(weapon_pos, "weapon_current_bg", weapon_size, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(weapon_pos, "weapon_current_bg", weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                // draw the weapon accuracy
                if(show_accuracy)
@@ -751,7 +760,7 @@ void HUD_Weapons(void)
                if(WEPSET_CONTAINS_AW(weapons_stat, self.weapon))
                {
                        // draw the weapon image
-                       drawpic_aspect_skin(weapon_pos, strcat("weapon", self.netname), weapon_size, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(weapon_pos, strcat("weapon", self.netname), weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        // draw weapon label string
                        switch(autocvar_hud_panel_weapons_label)
index d4bb5de23a8517013fc1f3c07295d62bd696403a..acff2892da506f53bdef49d0bb8f77baa73735ea 100644 (file)
@@ -80,6 +80,10 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_aspect");
                                        HUD_Write_PanelCvar_q("_timeout");
                                        HUD_Write_PanelCvar_q("_timeout_effect");
+                                       HUD_Write_PanelCvar_q("_timeout_fadebgmin");
+                                       HUD_Write_PanelCvar_q("_timeout_fadefgmin");
+                                       HUD_Write_PanelCvar_q("_timeout_speed_in");
+                                       HUD_Write_PanelCvar_q("_timeout_speed_out");
                                        HUD_Write_PanelCvar_q("_onlyowned");
                                        break;
                                case HUD_PANEL_AMMO:
index 474e919f42ee1b5f170d89551fb4585f34c6b806..8369a5ff20bc9ce399d0eef7c1a35d1063b4d8a9 100644 (file)
@@ -1,5 +1,3 @@
-const string string_null;
-
 // --------------------------------------------------------------------------
 // MENU Functionality
 
index f7de619d0eae0c41e0146d40176578dc00f1109e..0cdfb0f8e380f8ca8fa4ba9c1446e69595078cc8 100644 (file)
@@ -1,5 +1,3 @@
-var float(string text, float handleColors, vector fontSize) stringwidth;
-
 entity players;
 entity teams;
 
index bdf633468df3bb34fb0c0da2225bc5155e0eeb0f..10f47b446634a6a53a2f21d827bd6ca704490941 100644 (file)
@@ -160,14 +160,11 @@ void loopsound(entity e, float ch, string samp, float vol, float attn)
                return;
 
        sound(e, ch, samp, vol, attn);
-       e.snd_looping = 1;
+       e.snd_looping = ch;
 }
 
 void Ent_RemoveProjectile()
 {
-       if(self.snd_looping)
-               sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM);
-
        if(self.count & 0x80)
        {
                tracebox(self.origin, self.mins, self.maxs, self.origin + self.velocity * 0.05, MOVE_NORMAL, self);
index 177c9b53511979b0df9d5bfb7ea88aba23d4e450..a6dbcef10305d55c3c7ca9f299067d0f3a8ba4ee 100644 (file)
@@ -41,7 +41,6 @@ void CSQC_BUMBLE_GUN_HUD();
 
 #define MAX_AXH 4
 entity AuxiliaryXhair[MAX_AXH];
-const var void Draw_Not();
 
 .string axh_image;
 .float  axh_fadetime;
@@ -84,7 +83,7 @@ void AuxiliaryXhair_Draw2D()
     }
 
     if(time - self.cnt > self.axh_fadetime)
-        self.draw2d = Draw_Not;
+        self.draw2d = func_null;
 }
 
 void Net_AuXair2(float bIsNew)
@@ -95,7 +94,7 @@ void Net_AuXair2(float bIsNew)
     if(axh == world || wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
     {
         axh                                    = spawn();
-               axh.draw2d                      = Draw_Not;
+               axh.draw2d                      = func_null;
                axh.drawmask            = MASK_NORMAL;
                axh.axh_drawflag        = DRAWFLAG_ADDITIVE;
                axh.axh_fadetime        = 0.1;
@@ -148,7 +147,7 @@ void Net_VehicleSetup()
             remove(axh);
 
         axh                                    = spawn();
-               axh.draw2d                      = Draw_Not;
+               axh.draw2d                      = func_null;
                axh.drawmask            = MASK_NORMAL;
                axh.axh_drawflag        = DRAWFLAG_NORMAL;
                axh.axh_fadetime        = 0.1;
@@ -212,13 +211,13 @@ void Net_VehicleSetup()
     }
 }
 #define HUD_GETSTATS \
-    float vh_health    = getstati(STAT_VEHICLESTAT_HEALTH);  \
-       float shield    = getstati(STAT_VEHICLESTAT_SHIELD);  \
-       float energy    = getstati(STAT_VEHICLESTAT_ENERGY);  \
-       float ammo1     = getstati(STAT_VEHICLESTAT_AMMO1);   \
-       float reload1   = getstati(STAT_VEHICLESTAT_RELOAD1); \
-       float ammo2     = getstati(STAT_VEHICLESTAT_AMMO2);   \
-       float reload2   = getstati(STAT_VEHICLESTAT_RELOAD2);
+    local noref float vh_health    = getstati(STAT_VEHICLESTAT_HEALTH);  \
+       local noref float shield    = getstati(STAT_VEHICLESTAT_SHIELD);  \
+       local noref float energy    = getstati(STAT_VEHICLESTAT_ENERGY);  \
+       local noref float ammo1     = getstati(STAT_VEHICLESTAT_AMMO1);   \
+       local noref float reload1   = getstati(STAT_VEHICLESTAT_RELOAD1); \
+       local noref float ammo2     = getstati(STAT_VEHICLESTAT_AMMO2);   \
+       local noref float reload2   = getstati(STAT_VEHICLESTAT_RELOAD2);
 
 void CSQC_BUMBLE_HUD()
 {
@@ -327,7 +326,7 @@ void CSQC_BUMBLE_HUD()
     drawresetcliparea();
 
 // Right gunner slot occupied?
-       if(AuxiliaryXhair[1].draw2d == Draw_Not)
+       if(!AuxiliaryXhair[1].draw2d)
        {
                shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), FALSE, '1 0 0' * picsize_y + '0 1 0' * picsize_y));                              
                drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
@@ -349,7 +348,7 @@ void CSQC_BUMBLE_HUD()
     drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     drawresetcliparea();
 // Left gunner slot occupied?
-       if(AuxiliaryXhair[2].draw2d == Draw_Not)
+       if(!AuxiliaryXhair[2].draw2d)
        {
                shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), FALSE, '1 0 0' * picsize_y + '0 1 0' * picsize_y));                               
                drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
index 9a3821ed16b4e4f2d6ff43f687c852afa06bb913..4ac13b925cd431ebac060edd2cdf1bd37785cdfb 100644 (file)
@@ -232,8 +232,13 @@ void WriteInt24_t(float dest, float val);
 #endif
 
 // the NULL function
+#ifdef GMQCC
+#define func_null nil
+#define string_null nil
+#else
 var void func_null(void);
 var string string_null;
+#endif
 float float2range11(float f);
 float float2range01(float f);
 
index 163a5126d3be8f34b5e96289d61740c42c2eae0d..8ccdf814e7362296b49209c647ed7ab0a0b6bf32 100644 (file)
@@ -145,9 +145,9 @@ void CSQCModel_InterpolateAnimation_Do()
 void CSQCModel_Draw()
 {
        // some nice flags for CSQCMODEL_IF and the hooks
-       float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
-       float islocalplayer = (self.entnum == player_localnum + 1);
-       float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
+       local noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
+       local noref float islocalplayer = (self.entnum == player_localnum + 1);
+       local noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
 
        // we don't do this for the local player as that one is already handled
        // by CSQCPlayer_SetCamera()
@@ -179,9 +179,9 @@ void CSQCModel_Read(float isnew)
        sf = ReadShort();
 
        // some nice flags for CSQCMODEL_IF and the hooks
-       float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
-       float islocalplayer = (self.entnum == player_localnum + 1);
-       float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
+       local noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
+       local noref float islocalplayer = (self.entnum == player_localnum + 1);
+       local noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
 
        self.classname = "csqcmodel";
        self.iflags |= IFLAG_ANGLES; // interpolate angles too
index 37bc4bea81e08e7325afb0789cee53558dd11886..efaff9d46092367fe70c32326ac70d28ff0bbc25 100644 (file)
@@ -1,7 +1,9 @@
 ../../menu.dat
 
+sys-pre.qh
 ../dpdefs/menudefs.qc
 ../dpdefs/keycodes.qc
+sys-post.qh
 
 config.qh
 ../common/util-pre.qh
diff --git a/qcsrc/menu/sys-post.qh b/qcsrc/menu/sys-post.qh
new file mode 100644 (file)
index 0000000..e466fb4
--- /dev/null
@@ -0,0 +1 @@
+#pragma noref 0
diff --git a/qcsrc/menu/sys-pre.qh b/qcsrc/menu/sys-pre.qh
new file mode 100644 (file)
index 0000000..a964ae9
--- /dev/null
@@ -0,0 +1 @@
+#pragma noref 1
index b31622f67390e02f1d1465b02c5b55652fab1907..e3cd78eb6a56ba17f982a9c24456176f724c4502 100644 (file)
@@ -33,8 +33,8 @@ void XonoticHUDWeaponsDialog_fill(entity me)
                setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
                        me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout_effect"))));
                                e.addValue(e, ZCTX(_("EF^None")),  "0");
-                               e.addValue(e, _("Slide"), "1");
-                               e.addValue(e, _("Alpha"), "2");
+                               e.addValue(e, _("Alpha"), "1");
+                               e.addValue(e, _("Slide"), "2");
                                e.addValue(e, ZCTX(_("EF^Both")),  "3");
                                e.configureXonoticTextSliderValues(e);
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
index fe91b0650a0888a911f828c3d371395f1e0c6d6c..c37481b9763763ea066f942639a01604a7f0e050 100644 (file)
@@ -167,7 +167,6 @@ void XonoticMapList_drawListBoxItem(entity me, float i, vector absSize, float is
 {
        // layout: Ping, Map name, Map name, NP, TP, MP
        string s;
-       float p;
        float theAlpha;
        float included;
 
index 44988597476904b8d6a866741a5993dcc3b26d48..e80bf30e4e410b183ca23dc487b6f15afd1ae5b1 100644 (file)
@@ -473,7 +473,6 @@ void postMenuDraw()
 {
        if(autocvar_menu_watermark != "")
        {
-               vector fs = '48 48 0';
                draw_CenterText('0.5 0.1 0', sprintf(_("^1%s TEST BUILD"), autocvar_menu_watermark), globalToBoxSize('32 32 0', draw_scale), '1 1 1', 0.05, 1);
        }
 }
index 9d52dd79941e614edbe3d33f2d8389223b4d080a..64ce307000104472d82148af6fc67d685f299fe3 100644 (file)
@@ -868,7 +868,6 @@ string autocvar_g_hitplots_individuals;
 float autocvar_g_jetpack_acceleration_side;
 float autocvar_g_jetpack_acceleration_up;
 float autocvar_g_jetpack_antigravity;
-float autocvar_g_jetpack_attenuation;
 float autocvar_g_jetpack_fuel;
 float autocvar_g_jetpack_maxspeed_side;
 float autocvar_g_jetpack_maxspeed_up;
@@ -1230,6 +1229,7 @@ float autocvar_sv_vote_singlecount;
 float autocvar_sv_vote_stop;
 float autocvar_sv_vote_timeout;
 float autocvar_sv_vote_wait;
+float autocvar_sv_vote_gamestart;
 float autocvar_sv_warsowbunny_accel;
 float autocvar_sv_warsowbunny_airforwardaccel;
 float autocvar_sv_warsowbunny_backtosideratio;
index bdcfe864e4e43666a60901933d549893f513a543..3781077ebc01d7efda4abe15c2c1106d6a7873bc 100644 (file)
@@ -45,7 +45,7 @@ void bot_think()
 
        if (autocvar_g_campaign && !campaign_bots_may_start)
        {
-               self.nextthink = time + 0.5;
+               self.bot_nextthink = time + 0.5;
                return;
        }
 
@@ -85,7 +85,7 @@ void bot_think()
        {
                // block the bot during the countdown to game start
                self.movement = '0 0 0';
-               self.nextthink = game_starttime;
+               self.bot_nextthink = game_starttime;
                return;
        }
 
@@ -393,7 +393,7 @@ void bot_clientconnect()
        self.bot_nextthink = time - random();
        self.lag_func = bot_lagfunc;
        self.isbot = TRUE;
-       self.createdtime = self.nextthink;
+       self.createdtime = self.bot_nextthink;
 
        if(!self.bot_config_loaded) // This is needed so team overrider doesn't break between matches
                bot_setnameandstuff();
index 775374baeacb2d5bcd55166ee4be9821a35623f1..81d218271460b17f1a5951c93f71e0d525dd3c27 100644 (file)
@@ -1547,8 +1547,6 @@ void ClientConnect (void)
        if(!sv_foginterval && world.fog != "")
                stuffcmd(self, strcat("\nfog ", world.fog, "\nr_fog_exp2 0\nr_drawfog 1\n"));
 
-       SoundEntity_Attach(self);
-
        if(autocvar_g_hitplots || strstrofs(strcat(" ", autocvar_g_hitplots_individuals, " "), strcat(" ", self.netaddress, " "), 0) >= 0)
        {
                self.hitplotfh = fopen(strcat("hits-", matchid, "-", self.netaddress, "-", ftos(self.playerid), ".plot"), FILE_WRITE);
@@ -1644,8 +1642,6 @@ void ClientDisconnect (void)
        bprint ("^4",self.netname);
        bprint ("^4 disconnected\n");
 
-       SoundEntity_Detach(self);
-
        DropAllRunes(self);
        MUTATOR_CALLHOOK(ClientDisconnect);
 
@@ -1791,15 +1787,9 @@ void player_powerups (void)
        olditems = self.items;
 
        if((self.items & IT_USING_JETPACK) && !self.deadflag)
-       {
-               SoundEntity_StartSound(self, CH_TRIGGER_SINGLE, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
                self.modelflags |= MF_ROCKET;
-       }
        else
-       {
-               SoundEntity_StopSound(self, CH_TRIGGER_SINGLE);
                self.modelflags &~= MF_ROCKET;
-       }
 
        self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
 
index eae71b045c82845688d653b999d705f07854ac68..53ad41d3551d0d7de500622a31f224ec87b52ef1 100644 (file)
@@ -572,7 +572,7 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAN
                                {                                       
                                        if(caller) { caller.allowed_timeouts -= 1; }
                                        
-                                       bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : string_null), "!\n"); // write a bprint who started the timeout (and how many they have left)
+                                       bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : ""), "!\n"); // write a bprint who started the timeout (and how many they have left)
                                        
                                        timeout_status = TIMEOUT_LEADTIME;
                                        timeout_caller = caller;
@@ -614,7 +614,7 @@ void CommonCommand_who(float request, entity caller, float argc)
                        string separator = strreplace("%", " ", strcat((argv(1) ? argv(1) : " "), "^7"));
                        string tmp_netaddress, tmp_crypto_idfp;
                        
-                       print_to(caller, strcat("List of client information", (privacy ? " (some data is hidden for privacy)" : string_null), ":"));
+                       print_to(caller, strcat("List of client information", (privacy ? " (some data is hidden for privacy)" : ""), ":"));
                        print_to(caller, sprintf(strreplace(" ", separator, " %-4s %-20s %-5s %-3s %-9s %-16s %s "), 
                                "ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
                        
index dd22d4b13018c149440c1786c9351e6c6b34a7ae..e44ec091085bcb4487d46769ea35b71f228313e1 100644 (file)
@@ -830,8 +830,6 @@ void GameCommand_animbench(float request, float argc)
                case CMD_REQUEST_COMMAND:
                {
                        entity tmp_entity;
-                       float i;
-                       vector v;
 
                        if(argc >= 4)
                        {
index e4564753008b889303ab4992bb4afbfd2f71edbd..34446fdfcfddf0e3a6b78fa5d68967239b2737a9 100644 (file)
@@ -172,7 +172,7 @@ void VoteSpam(float notvoters, float mincount, string result)
                strcat("^2:^1", ftos(vote_reject_count)),
                ((mincount >= 0) ? strcat("^2 (^1", ftos(mincount), "^2 needed)") : "^2"),
                strcat(", ^1", ftos(vote_abstain_count), "^2 didn't care"),
-               strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? string_null : "have to "), "vote\n"))));
+               strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? "" : "have to "), "vote\n"))));
        
        if(autocvar_sv_eventlog)
        {
@@ -694,6 +694,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
                        vote_command = VoteCommand_extractcommand(vote_command, 2, argc);
                        
                        if not(autocvar_sv_vote_call || !caller) { print_to(caller, "^1Vote calling is not allowed."); }
+                       else if(!autocvar_sv_vote_gamestart && time < game_starttime) { print_to(caller, "^1Vote calling is not allowed before the match has started."); }
                        else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
                        else if(!spectators_allowed && (caller && (caller.classname != "player"))) { print_to(caller, "^1Only players can call a vote."); }
                        else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
index 0c38a2124e2982fc08b3f038051c67b92d2b0fe0..60191b5bf38f00935be98358e1b09bffd944abc1 100644 (file)
@@ -625,7 +625,7 @@ string deathmessage;
 #define ACTIVE_BUSY    2
 #define ACTIVE_TOGGLE  3
 .float active;
-.float (float act_state) setactive;
+.void (float act_state) setactive;
 .entity realowner;
 
 .float nex_charge;
index d7fb5e7b052ab604763a3b0b2c40a64eb61ea016..3807e7ed9dbe97ee17a9172d4313f79fd046a4cc 100644 (file)
@@ -377,7 +377,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
 
        // Declarations
        string  s, a, msg;
-       float w, type;
+       float type;
 
        string s1 = NO_STR_ARG, s2 = NO_STR_ARG;
        float f1 = NO_FL_ARG, f2 = NO_FL_ARG, f3 = NO_FL_ARG;
index 36885d95acb6029fcc0200462e87a2535e419052..1862ba8cb92a214e7ff656638d8d5c864865226e 100644 (file)
@@ -1617,6 +1617,8 @@ void NextLevel()
        if(autocvar_g_campaign)
                CampaignPreIntermission();
 
+       MUTATOR_CALLHOOK(MatchEnd);
+
        localcmd("\nsv_hook_gameend\n");
 }
 
index 89e35d3242d175eb3e4d4ebd800ddc52cc97e708..e0f899486a450d3a17125dc57e65c4d03d5ebd73 100644 (file)
@@ -1518,9 +1518,6 @@ void precache()
     precache_sound ("player/lava.wav");
     precache_sound ("player/slime.wav");
 
-    if (g_jetpack)
-        precache_sound ("misc/jetpack_fly.wav");
-
     precache_model ("models/sprites/0.spr32");
     precache_model ("models/sprites/1.spr32");
     precache_model ("models/sprites/2.spr32");
@@ -1715,7 +1712,7 @@ void InitializeEntitiesRun()
             self = e_old;
         }
         //dprint("Delayed initialization: ", self.classname, "\n");
-        if(func != func_null)
+        if(func)
             func();
         else
         {
@@ -1741,7 +1738,7 @@ void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer)
 {
     e.customizeentityforclient = customizer;
     e.uncustomizeentityforclient = uncustomizer;
-    e.uncustomizeentityforclient_set = (uncustomizer != func_null);
+    e.uncustomizeentityforclient_set = !!uncustomizer;
 }
 
 .float nottargeted;
@@ -2419,43 +2416,6 @@ vector gettaginfo_relative(entity e, float tag)
     return gettaginfo(gettaginfo_relative_ent, tag);
 }
 
-void SoundEntity_StartSound(entity pl, float chan, string samp, float vol, float attn)
-{
-    float p;
-    p = pow(2, chan);
-    if (pl.soundentity.cnt & p)
-        return;
-    soundtoat(MSG_ALL, pl.soundentity, gettaginfo(pl.soundentity, 0), chan, samp, vol, attn);
-    pl.soundentity.cnt |= p;
-}
-
-void SoundEntity_StopSound(entity pl, float chan)
-{
-    float p;
-    p = pow(2, chan);
-    if (pl.soundentity.cnt & p)
-    {
-        stopsoundto(MSG_ALL, pl.soundentity, chan);
-        pl.soundentity.cnt &~= p;
-    }
-}
-
-void SoundEntity_Attach(entity pl)
-{
-    pl.soundentity = spawn();
-    pl.soundentity.classname = "soundentity";
-    pl.soundentity.owner = pl;
-    setattachment(pl.soundentity, pl, "");
-    setmodel(pl.soundentity, "null");
-}
-
-void SoundEntity_Detach(entity pl)
-{
-    float i;
-    for (i = 0; i <= 7; ++i)
-        SoundEntity_StopSound(pl, i);
-}
-
 .float scale2;
 
 float modeleffect_SendEntity(entity to, float sf)
index e3be6096d592f0950dce340d8d684b094c77b51c..e8fa4639b888ef90c53ba6ca5b4a3061e1a7e69e 100644 (file)
@@ -1986,7 +1986,7 @@ MUTATOR_HOOKFUNCTION(ctf_MatchEnd)
                                flag.solid = SOLID_NOT;
                                flag.nextthink = FALSE; // stop thinking
                                
-                               print("stopping the ", flag.netname, " from moving.\n");
+                               //dprint("stopping the ", flag.netname, " from moving.\n");
                                break;
                        }
                        
index c115dca36c07474e75e439178c2118c16864d080..6fcb8647bbe97114d2fa6cc46f303095193f2c4f 100644 (file)
@@ -774,14 +774,13 @@ void W_Nexball_Attack2(void)
        missile.flags = FL_PROJECTILE;
 }
 
-var const float() nullfunc;
 float ball_customize()
 {
        if(!self.owner)
        {
                self.effects &~= EF_FLAME;
                self.scale = 1;
-               self.customizeentityforclient = nullfunc;
+               self.customizeentityforclient = func_null;
                return TRUE;
        }               
        
index ce4c2b4b8d74a40c13455b05d9020f05473e7cfc..3cb4ca750ee15f971eb5a9a59b772b0c9445d83a 100644 (file)
@@ -214,7 +214,7 @@ float edge_show(vector point,float fsize)
 #endif
 
 var vector pathlib_movenode(vector start,vector end,float doedge);
-vector pathlib_wateroutnode(vector start,vector end)
+vector pathlib_wateroutnode(vector start,vector end,float doedge)
 {
     vector surface;
 
@@ -248,7 +248,7 @@ vector pathlib_wateroutnode(vector start,vector end)
     return end;
 }
 
-vector pathlib_swimnode(vector start,vector end)
+vector pathlib_swimnode(vector start,vector end,float doedge)
 {
     pathlib_movenode_goodnode = 0;
 
index 9369fb4d69f2a179ff47ac74c8677e49349a1449..c45ac0dee4bb266fc1f36552037dffc94b625198 100644 (file)
@@ -1,4 +1,4 @@
-vector pathlib_wateroutnode(vector start,vector end)
+vector pathlib_wateroutnode(vector start,vector end, float doedge)
 {
     vector surface;
 
@@ -32,7 +32,7 @@ vector pathlib_wateroutnode(vector start,vector end)
     return end;
 }
 
-vector pathlib_swimnode(vector start,vector end)
+vector pathlib_swimnode(vector start,vector end, float doedge)
 {
     pathlib_movenode_goodnode = 0;
 
@@ -43,7 +43,7 @@ vector pathlib_swimnode(vector start,vector end)
     end_y = fsnap(end_y, pathlib_gridsize);
 
     if(pointcontents(end) == CONTENT_EMPTY)
-        return pathlib_wateroutnode( start, end);
+        return pathlib_wateroutnode( start, end, doedge);
 
     tracebox(start, movenode_boxmin,movenode_boxmax, end, MOVE_WORLDONLY, self);
     if(trace_fraction == 1)
@@ -52,7 +52,7 @@ vector pathlib_swimnode(vector start,vector end)
     return end;
 }
 
-vector pathlib_flynode(vector start,vector end)
+vector pathlib_flynode(vector start,vector end, float doedge)
 {
     pathlib_movenode_goodnode = 0;
 
index 71d13caa4e084660b568389f7f96031e54bfafc1..d1b6667d715f4a6075f992f999ceb846a608e339 100644 (file)
@@ -75,9 +75,9 @@ vector movenode_boxmax;
 vector movenode_boxmin;
 float  pathlib_movenode_goodnode;
 
-vector     pathlib_wateroutnode(vector start, vector end);
-vector     pathlib_swimnode(vector start, vector end);
-vector     pathlib_flynode(vector start, vector end);
+vector     pathlib_wateroutnode(vector start, vector end, float doedge);
+vector     pathlib_swimnode(vector start, vector end, float doedge);
+vector     pathlib_flynode(vector start, vector end, float doedge);
 vector     pathlib_walknode(vector start, vector end, float doedge);
 var vector pathlib_movenode(vector start, vector end, float doedge);
 
index a95eed67ad7fa0ce4b970394cd08cf5473d0b849..41af3015798d5fc167e97d36c257df040299e3d7 100644 (file)
@@ -377,8 +377,14 @@ void PlayerStats_EndMatch(float finished)
                if((g_arena || g_lms || g_ca) && (p.alivetime <= 0)) { continue; }
                else if(p.classname != "player") { continue; }
 
-               float latency = (p.latency_sum / p.latency_cnt);
-               if(latency) { PlayerStats_Event(p, PLAYERSTATS_AVGLATENCY, latency); }
+               if(clienttype(p) == CLIENTTYPE_REAL)
+               {
+                       if(p.latency_cnt)
+                       {
+                               float latency = (p.latency_sum / p.latency_cnt);
+                               if(latency) { PlayerStats_Event(p, PLAYERSTATS_AVGLATENCY, latency); }
+                       }
+               }
                
                PlayerScore_PlayerStats(p);
                PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_VALID, 1);
index 7c21c4e2e396158ffa18f8e46a639fe82ce8e7e3..df511c63795d611068e2b74d2fc85ba896f91383 100644 (file)
@@ -1615,7 +1615,6 @@ float SECRET_1ST_DOWN = 4;                // 1st move is down from arrow
 float SECRET_NO_SHOOT = 8;             // only opened by trigger
 float SECRET_YES_SHOOT = 16;   // shootable even if targeted
 
-
 void fd_secret_use()
 {
        float temp;
@@ -1666,6 +1665,11 @@ void fd_secret_use()
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
 }
 
+void fd_secret_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+{
+       fd_secret_use();
+}
+
 // Wait after first movement...
 void fd_secret_move1()
 {
@@ -1822,7 +1826,7 @@ void spawnfunc_func_door_secret()
        {
                self.health = 10000;
                self.takedamage = DAMAGE_YES;
-               self.event_damage = fd_secret_use;
+               self.event_damage = fd_secret_damage;
        }
        self.oldorigin = self.origin;
        if (!self.wait)
index ad7bd2dcf0919f93519329b3124aaaa59156052f..93b27df9756a0deb3ef6452ebfc77e6df2878252 100644 (file)
@@ -74,7 +74,7 @@ float autocvar_g_vehicle_racer_bouncestop;
 vector autocvar_g_vehicle_racer_bouncepain;
 
 var vector racer_force_from_tag(string tag_name, float spring_length, float max_power);
-void racer_spawn(float _spawnflag);
+void racer_spawn_default();
 
 void racer_align4point(float _delta)
 {
@@ -545,7 +545,7 @@ void racer_blowup()
                                        DEATH_WAKIBLOWUP, world);
 
     self.nextthink  = time + autocvar_g_vehicle_racer_respawntime;
-    self.think      = racer_spawn;
+    self.think      = racer_spawn_default;
     self.movetype   = MOVETYPE_NONE;
     self.effects    = EF_NODRAW;
 
@@ -554,8 +554,6 @@ void racer_blowup()
     self.velocity  = '0 0 0';
 
     setorigin(self, self.pos1);
-       self.think     = racer_spawn;
-       self.nextthink = time + autocvar_g_vehicle_racer_respawntime;
 }
 
 void racer_deadtouch()
@@ -626,6 +624,10 @@ void racer_spawn(float _spawnflag)
     self.damageforcescale = 0.5;
     //self.destvec = autocvar_g_vehicle_racer_bouncepain;
 }
+void racer_spawn_default()
+{
+       racer_spawn(0);
+}
 
 
 
index ebd74754f96abc2144f2818aa775f870e5cb9333..9bbdd096a259e609b5aa3bfdb46cc485f7393569 100644 (file)
@@ -286,7 +286,6 @@ void spiderbot_rocket_do()
                                    DEATH_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
             
             crosshair_trace(self.owner);
-            vector _ct_end = trace_endpos + trace_plane_normal;
             
             rocket.pos1       = trace_endpos + randomvec() * (0.75 * autocvar_g_vehicle_spiderbot_rocket_radius);
             rocket.pos1_z       = trace_endpos_z;
index 834e6516787ba0411677ea34075cf769adb1bda3..f1d3890447140399b4206ac232694483aa42c1b1 100644 (file)
@@ -62,7 +62,6 @@ var .void() vehicle_die;    /// Vehicles custom function to be executed when veh
 #define VHSF_NORMAL 0
 #define VHSF_FACTORY 2
 var .void(float _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
-const var .float(float _imp) vehicles_impusle_null;
 var .float(float _imp) vehicles_impusle;
 .float vehicle_weapon2mode = volly_counter;
 
index 34788cdcecb183de1b6ac46ded93a0bdc405eebd..b4b79abb832363bfea7fcd11d775bb0c8eb84554 100644 (file)
@@ -351,7 +351,7 @@ float w_hagar(float req)
        else if (req == WR_THINK)
        {
                float loadable_secondary;
-               loadable_secondary = autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary;
+               loadable_secondary = (autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary);
 
                if (loadable_secondary)
                        W_Hagar_Attack2_Load(); // must always run each frame
index e261b97fc6d66c9321ff4002624c193385ffa9ef..13c010f2a13010937f6d7a2a37fa8e2f426ba107 100644 (file)
@@ -495,8 +495,8 @@ void Seeker_Fire_Tag()
        missile.solid           = SOLID_BBOX;
 
        missile.takedamage       = DAMAGE_YES;
-       missile.event_damage    = Seeker_Tag_Explode;
-       missile.health          = autocvar_g_balance_seeker_tag_health;
+       missile.event_damage     = Seeker_Tag_Damage;
+       missile.health           = autocvar_g_balance_seeker_tag_health;
        missile.damageforcescale = autocvar_g_balance_seeker_tag_damageforcescale;
 
        setorigin (missile, w_shotorg);
index e7cf23908eda0198025a0c5ebaf437b1eb890757..c79ee95d6e02d2d2062b8a35a987de07f0aca3cb 100644 (file)
@@ -27,7 +27,7 @@ void WarpZone_MakeAllOther();
 #define MOVE_NOTHING -1
 entity WarpZone_trace_forent; // temp, callback is allowed to change it
 typedef void(vector start, vector hit, vector end) WarpZone_trace_callback_t; // called on every elementary trace
-const var WarpZone_trace_callback_t WarpZone_trace_callback_t_null;
+var WarpZone_trace_callback_t WarpZone_trace_callback_t_null;
 entity WarpZone_trace_transform; // transform accumulator during a trace
 entity WarpZone_trace_firstzone; // first warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone, the trace is aborted then)
 entity WarpZone_trace_lastzone; // first warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone, the trace is aborted then)