]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/bot_ai
authorterencehill <piuntn@gmail.com>
Sun, 29 Mar 2020 15:13:36 +0000 (17:13 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 29 Mar 2020 15:13:36 +0000 (17:13 +0200)
44 files changed:
.tx/merge-base
_hud_descriptions.cfg
common.ast.po
gamemodes-server.cfg
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
mutators.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud/hud_config.qc
qcsrc/client/hud/panel/healtharmor.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/miscfunctions.qh
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/ctf/cl_ctf.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh
qcsrc/common/gamemodes/gamemode/keepaway/cl_keepaway.qc
qcsrc/common/mutators/mutator/campcheck/sv_campcheck.qc
qcsrc/common/mutators/mutator/itemstime/itemstime.qc
qcsrc/common/mutators/mutator/pinata/sv_pinata.qc
qcsrc/common/state.qc
qcsrc/common/stats.qh
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/lib/csqcmodel/cl_player.qh
qcsrc/lib/string.qh
qcsrc/lib/warpzone/mathlib.qc
qcsrc/menu/xonotic/dialog_settings_game_view.qc
qcsrc/menu/xonotic/dialog_settings_video.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/ipban.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/sv_main.qc
qcsrc/server/weapons/weaponsystem.qc
xonotic-client.cfg
xonotic-server.cfg

index 803036b6a9ca294200d18ad67bfe918459f45c82..6b9bef88e8973e712d8c855c7bfa7228018d7e95 100644 (file)
@@ -1 +1 @@
-Fri Mar  6 07:24:27 CET 2020
+Sun Mar 29 07:24:37 CEST 2020
index 30e5a8bee9a8756fe9fafe883306260e1e4025aa..9bb1b84a620f61cc2672d4d85a52817d384b21a1 100644 (file)
@@ -21,6 +21,7 @@ seta hud_progressbar_shield_color "" "R G B vector of the progress bar backgroun
 seta hud_progressbar_health_color "" "R G B vector of the progress bar background color"
 seta hud_progressbar_armor_color "" "R G B vector of the progress bar background color"
 seta hud_progressbar_fuel_color "" "R G B vector of the progress bar background color"
+seta hud_progressbar_oxygen_color "" "R G B vector of the progress bar background color"
 seta hud_progressbar_nexball_color "" "R G B vector of the progress bar background color"
 seta hud_progressbar_speed_color "" "R G B vector of the progress bar background color"
 seta hud_progressbar_acceleration_color "" "R G B vector of the progress bar background color"
index 68a14f48f61f05c0570a6149e46ceb12adb602a3..1577aa0dc02ff9d09b2e89d551a01259cca05fdd 100644 (file)
@@ -4,8 +4,8 @@
 #
 # Translators:
 # Ximielga <dorian@openmailbox.org>, 2014-2015
-# Ḷḷumex03 <tornes@opmbx.org>, 2014
-# Ḷḷumex03 <tornes@opmbx.org>, 2014-2015
+# Ḷḷumex03, 2014
+# Ḷḷumex03, 2014-2015
 # Tornes Ḷḷume <tornes.llume@openmailbox.org>, 2015-2017
 # Ximielga <dorian@openmailbox.org>, 2014
 msgid ""
index 501f07f035d6ce675f4f4fe5ca28b72a7de8d280..b1631b2333f56e6ba6ad1d9290fd89f0f77cddb8 100644 (file)
@@ -76,7 +76,7 @@ alias sv_vote_gametype_hook_duel
 // ===========
 // this means that timelimit can be overidden globally and fraglimit can be overidden for each game mode: DM/TDM, Domination, CTF, and Runematch.
 set leadlimit 0
-set leadlimit_and_fraglimit 0 "if set, leadlimit is ANDed with fraglimit (otherwise ORed)"
+set leadlimit_and_fraglimit 0 "both leadlimit AND fraglimit must be reached"
 set timelimit_override -1      "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set fraglimit_override -1      "Frag limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set leadlimit_override -1      "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
index 813ecbaef0df64396789d8115bce2c758deaec4d..84e73404d078d1daef56af39b2bbb46661081975 100644 (file)
@@ -22,6 +22,7 @@ seta hud_progressbar_shield_color "0.36 1 0.07"
 seta hud_progressbar_health_color "0.83 0.12 0"
 seta hud_progressbar_armor_color "0.28 0.8 0"
 seta hud_progressbar_fuel_color "0.77 0.67 0"
+seta hud_progressbar_oxygen_color "0.1 1 1"
 seta hud_progressbar_nexball_color "0.2 0.65 0.93"
 seta hud_progressbar_speed_color "0.77 0.67 0"
 seta hud_progressbar_acceleration_color "0.2 0.65 0.93"
index c5cfe4ac548fdc62e070ac1cda9ed08d4a9c3524..2b0d14a2735052c1d61a690b9a72963dc460a947 100644 (file)
@@ -22,6 +22,7 @@ seta hud_progressbar_shield_color "0.6 0 0.6"
 seta hud_progressbar_health_color "0.6 0 0"
 seta hud_progressbar_armor_color "0 0.6 0"
 seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_oxygen_color "0 1 1"
 seta hud_progressbar_nexball_color "0.7 0.1 0"
 seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1"
index b7282584637aba28087bec61f8c071f5ac97df68..be4a87ae29967cb03d7ed11664abb48f161617a4 100644 (file)
@@ -22,6 +22,7 @@ seta hud_progressbar_shield_color "0.6 0 0.6"
 seta hud_progressbar_health_color "0.6 0 0"
 seta hud_progressbar_armor_color "0 0.6 0"
 seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_oxygen_color "0 1 1"
 seta hud_progressbar_nexball_color "0.7 0.1 0"
 seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1"
index 3bfd694b19cf2f0977c36c437ed7ee5c8220d5f9..db0fc51c6e18bbd47eb8d8ccab963150668b1cdd 100644 (file)
@@ -22,6 +22,7 @@ seta hud_progressbar_shield_color "0.6 0 0.6"
 seta hud_progressbar_health_color "0.6 0 0"
 seta hud_progressbar_armor_color "0 0.6 0"
 seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_oxygen_color "0 1 1"
 seta hud_progressbar_nexball_color "0.7 0.1 0"
 seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1"
index c808f62fb5b10ca9f430153f3260821fc0280ff9..4baea48523d4579afcd2cd94f39afb06f14ceefe 100644 (file)
@@ -22,6 +22,7 @@ seta hud_progressbar_shield_color "0.6 0 0.6"
 seta hud_progressbar_health_color "0.6 0 0"
 seta hud_progressbar_armor_color "0 0.6 0"
 seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_oxygen_color "0 1 1"
 seta hud_progressbar_nexball_color "0.7 0.1 0"
 seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1"
index b0b02d080c6e6517407ca8706a8315bca9160f46..726620501f0635cca1e0384257bac0bf274069dd 100644 (file)
@@ -22,6 +22,7 @@ seta hud_progressbar_shield_color "0.6 0 0.6"
 seta hud_progressbar_health_color "0.6 0 0"
 seta hud_progressbar_armor_color "0 0.6 0"
 seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_oxygen_color "0 1 1"
 seta hud_progressbar_nexball_color "0.7 0.1 0"
 seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1"
index b6ad3468e0be9708d071c1abdb581e3175aa25ed..f3ed5e07690c3bd5599d767159e290b23b0c16bc 100644 (file)
@@ -290,6 +290,7 @@ set g_campcheck 0 "damages campers every few seconds"
 set g_campcheck_interval 10
 set g_campcheck_damage 100
 set g_campcheck_distance 1800
+set g_campcheck_typecheck 0 "damage campers who are typing"
 
 
 // ==========
@@ -522,3 +523,9 @@ set g_smneg_cooldown_factor 0.25 "Stale-move negation: penalty cooldown factor"
 set g_random_items 0 "Whether to enable random items."
 set g_random_loot 0 "Whether to enable random loot."
 exec randomitems-xonotic.cfg
+
+// ===============
+//  pinata
+// ===============
+set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
+set g_pinata_offhand 0 "if enabled, the second weapon will drop as well while dual wielding"
index f87b94e8e37fc132f02d81be3d33075c1ac6e9a9..234f9b0a9a4d9c2883fc8ec124955a9104a6d364 100644 (file)
@@ -363,6 +363,7 @@ vector autocvar_hud_progressbar_acceleration_neg_color;
 float autocvar_hud_progressbar_alpha;
 vector autocvar_hud_progressbar_armor_color;
 vector autocvar_hud_progressbar_fuel_color;
+vector autocvar_hud_progressbar_oxygen_color = '0.1 1 1';
 vector autocvar_hud_progressbar_health_color;
 vector autocvar_hud_progressbar_nexball_color;
 vector autocvar_hud_progressbar_shield_color;
@@ -415,7 +416,7 @@ float autocvar_cl_hitsound_nom_damage = 25;
 float autocvar_cl_hitsound_antispam_time;
 bool autocvar_cl_eventchase_spectated_change = false;
 float autocvar_cl_eventchase_spectated_change_time = 1;
-int autocvar_cl_eventchase_death = 1;
+int autocvar_cl_eventchase_death = 2;
 float autocvar_cl_eventchase_distance = 140;
 bool autocvar_cl_eventchase_frozen = false;
 float autocvar_cl_eventchase_speed = 1.3;
index a6c22c74eee9bf113f4d71570b90ec57f7a33938..27a33c408b50de484b40dbbd9722b47972756e4e 100644 (file)
@@ -45,6 +45,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                HUD_Write_Cvar("hud_progressbar_health_color");
                HUD_Write_Cvar("hud_progressbar_armor_color");
                HUD_Write_Cvar("hud_progressbar_fuel_color");
+               HUD_Write_Cvar("hud_progressbar_oxygen_color");
                HUD_Write_Cvar("hud_progressbar_nexball_color");
                HUD_Write_Cvar("hud_progressbar_speed_color");
                HUD_Write_Cvar("hud_progressbar_acceleration_color");
index 1e124dd94243fa63af52906cd410d927933d83f8..1a61a96d3d1c90bad00b39a7f0fa79ddf9a181c8 100644 (file)
@@ -9,7 +9,7 @@
 
 void HUD_HealthArmor()
 {
-       int armor, health, fuel;
+       int armor, health, fuel, air_time;
        if(!autocvar__hud_configure)
        {
                if((!autocvar_hud_panel_healtharmor) || (spectatee_status == -1))
@@ -52,12 +52,14 @@ void HUD_HealthArmor()
                        prev_armor = 0;
                }
                fuel = STAT(FUEL);
+               air_time = bound(0, STAT(AIR_FINISHED) - time, 10);
        }
        else
        {
                health = 150;
                armor = 75;
                fuel = 20;
+               air_time = 6;
        }
 
        HUD_Panel_LoadCvars();
@@ -79,6 +81,13 @@ void HUD_HealthArmor()
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
+       float air_alpha = 1;
+       if (STAT(AIR_FINISHED) && time > STAT(AIR_FINISHED))
+       {
+               air_alpha = blink_synced(0.5, 0.5, 7, STAT(AIR_FINISHED), -1);
+               air_time = 10;
+       }
+
        int baralign = autocvar_hud_panel_healtharmor_baralign;
        int iconalign = autocvar_hud_panel_healtharmor_iconalign;
 
@@ -112,6 +121,8 @@ void HUD_HealthArmor()
 
                if(fuel)
                        HUD_Panel_DrawProgressBar(pos, vec2(mySize.x, 0.2 * mySize.y), "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+               if(air_time)
+                       HUD_Panel_DrawProgressBar(pos + eY * 0.8 * mySize.y, vec2(mySize.x, 0.2 * mySize.y), "progressbar", air_time / 10, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_oxygen_color, air_alpha * panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
        }
        else
        {
@@ -135,13 +146,13 @@ void HUD_HealthArmor()
                                armor_offset.y = mySize.y;
                }
 
-               bool health_baralign, armor_baralign, fuel_baralign;
+               bool health_baralign, armor_baralign, fuel_baralign, air_align;
                bool health_iconalign, armor_iconalign;
                if (autocvar_hud_panel_healtharmor_flip)
                {
                        armor_baralign = (autocvar_hud_panel_healtharmor_baralign == 2 || autocvar_hud_panel_healtharmor_baralign == 1);
                        health_baralign = (autocvar_hud_panel_healtharmor_baralign == 3 || autocvar_hud_panel_healtharmor_baralign == 1);
-                       fuel_baralign = health_baralign;
+                       air_align = fuel_baralign = health_baralign;
                        armor_iconalign = (autocvar_hud_panel_healtharmor_iconalign == 2 || autocvar_hud_panel_healtharmor_iconalign == 1);
                        health_iconalign = (autocvar_hud_panel_healtharmor_iconalign == 3 || autocvar_hud_panel_healtharmor_iconalign == 1);
                }
@@ -149,7 +160,7 @@ void HUD_HealthArmor()
                {
                        health_baralign = (autocvar_hud_panel_healtharmor_baralign == 2 || autocvar_hud_panel_healtharmor_baralign == 1);
                        armor_baralign = (autocvar_hud_panel_healtharmor_baralign == 3 || autocvar_hud_panel_healtharmor_baralign == 1);
-                       fuel_baralign = armor_baralign;
+                       air_align = fuel_baralign = armor_baralign;
                        health_iconalign = (autocvar_hud_panel_healtharmor_iconalign == 2 || autocvar_hud_panel_healtharmor_iconalign == 1);
                        armor_iconalign = (autocvar_hud_panel_healtharmor_iconalign == 3 || autocvar_hud_panel_healtharmor_iconalign == 1);
                }
@@ -197,10 +208,7 @@ void HUD_HealthArmor()
 
                                        if (health <= autocvar_hud_panel_healtharmor_progressbar_gfx_lowhealth)
                                        {
-                                               float BLINK_FACTOR = 0.15;
-                                               float BLINK_BASE = 0.85;
-                                               float BLINK_FREQ = 9;
-                                               pain_health_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
+                                               pain_health_alpha = blink(0.85, 0.15, 9);
                                        }
                                }
                                HUD_Panel_DrawProgressBar(pos + health_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_health, p_health/maxhealth, is_vertical, health_baralign, autocvar_hud_progressbar_health_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * pain_health_alpha, DRAWFLAG_NORMAL);
@@ -256,7 +264,8 @@ void HUD_HealthArmor()
                                DrawNumIcon(pos + armor_offset, mySize, armor, "armor", is_vertical, armor_iconalign, HUD_Get_Num_Color(armor, maxarmor), 1);
                }
 
-               if(fuel)
+               vector cell_size = mySize;
+               if (fuel || air_time)
                {
                        if (is_vertical)
                                mySize.x *= 0.2 / 2; //if vertical always halve x to not cover too much numbers with 3 digits
@@ -266,7 +275,20 @@ void HUD_HealthArmor()
                                mySize.x *= 2; //restore full panel size
                        else if (panel_ar < 1/4)
                                mySize.y *= 2; //restore full panel size
-                       HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+                       if (fuel)
+                               HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+                       if (air_time)
+                       {
+                               if (panel_ar > 1 && panel_ar < 4)
+                                       pos.y += cell_size.y;
+                               else if (panel_ar > 1/4 && panel_ar <= 1)
+                                       pos.x += cell_size.x;
+                               if (is_vertical)
+                                       pos.x += cell_size.x - mySize.x;
+                               else
+                                       pos.y += cell_size.y - mySize.y;
+                               HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", air_time / 10, is_vertical, air_align, autocvar_hud_progressbar_oxygen_color, air_alpha * panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+                       }
                }
        }
 
index bb0bfe12c7642bc09bc595d4982a80fb9913e581..d801ceabd7d7ccde6edf099e3aacd4b6f67b1a44 100644 (file)
@@ -214,6 +214,28 @@ vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float b
        return boxsize * (0.5 * (1 - sz));
 }
 
+// NOTE base is the central value
+// freq: circle frequency, = 2*pi*frequency in hertz
+// start_pos:
+//  -1 start from the lower value
+//   0 start from the base value
+//   1 start from the higher value
+float blink_synced(float base, float range, float freq, float start_time, int start_pos)
+{
+       // note:
+       //   RMS = sqrt(base^2 + 0.5 * range^2)
+       // thus
+       //   base = sqrt(RMS^2 - 0.5 * range^2)
+       // ensure RMS == 1
+
+       return base + range * sin((time - start_time - (M_PI / 2) * start_pos) * freq);
+}
+
+float blink(float base, float range, float freq)
+{
+       return blink_synced(base, range, freq, 0, 0);
+}
+
 void drawborderlines(float thickness, vector pos, vector dim, vector color, float theAlpha, float drawflag)
 {
        vector line_dim = '0 0 0';
index d259efe66036ed21404fac890ca60b32b9d28787..3397ab7059133106f8f8a2008a44c619ac7dbafe 100644 (file)
@@ -52,6 +52,9 @@ float expandingbox_sizefactor_from_fadelerp(float fadelerp);
 
 vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor);
 
+float blink_synced(float base, float range, float freq, float start_time, int start_blink);
+float blink(float base, float range, float freq);
+
 void drawborderlines(float thickness, vector pos, vector dim, vector color, float theAlpha, float drawflag);
 
 void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag);
index eb341d58cd431e4e00f5183b524c44f1ce82773b..57cd15a78bd7fd68cac6454b13232d56a4b1d1c4 100644 (file)
@@ -1420,10 +1420,10 @@ void HUD_Crosshair(entity this)
                                }
 
                                if (autocvar_crosshair_ring_inner && ring_inner_value) // lets draw a ring inside a ring so you can ring while you ring
-                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, wcross_alpha * ring_inner_alpha, DRAWFLAG_ADDITIVE);
+                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * wcross_resolution * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, wcross_alpha * ring_inner_alpha, DRAWFLAG_ADDITIVE);
 
                                if (ring_value)
-                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
+                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * wcross_resolution * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
                        }
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
index c82e0bce9310b978ea4e943fe1b34e88e0183a53..cbbe9afb7efd5545b4967b16c96ce445df078d02 100644 (file)
@@ -69,15 +69,6 @@ void HUD_Mod_CTF(vector pos, vector mySize)
     X(neutral);
     #undef X
 
-    const float BLINK_FACTOR = 0.15;
-    const float BLINK_BASE = 0.85;
-    // note:
-    //   RMS = sqrt(BLINK_BASE^2 + 0.5 * BLINK_FACTOR^2)
-    // thus
-    //   BLINK_BASE = sqrt(RMS^2 - 0.5 * BLINK_FACTOR^2)
-    // ensure RMS == 1
-    const float BLINK_FREQ = 5; // circle frequency, = 2*pi*frequency in hertz
-
     #define X(team, cond) \
     string team##_icon = string_null, team##_icon_prevstatus = string_null; \
     int team##_alpha, team##_alpha_prevstatus; \
@@ -86,7 +77,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
         switch (team##flag) { \
             case 1: team##_icon = "flag_" #team "_taken"; break; \
             case 2: team##_icon = "flag_" #team "_lost"; break; \
-            case 3: team##_icon = "flag_" #team "_carrying"; team##_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; \
+            case 3: team##_icon = "flag_" #team "_carrying"; team##_alpha = blink(0.85, 0.15, 5); break; \
             default: \
                 if ((stat_items & CTF_SHIELDED) && (cond)) { \
                     team##_icon = "flag_" #team "_shielded"; \
@@ -98,7 +89,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
         switch (team##flag_prevstatus) { \
             case 1: team##_icon_prevstatus = "flag_" #team "_taken"; break; \
             case 2: team##_icon_prevstatus = "flag_" #team "_lost"; break; \
-            case 3: team##_icon_prevstatus = "flag_" #team "_carrying"; team##_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; \
+            case 3: team##_icon_prevstatus = "flag_" #team "_carrying"; team##_alpha_prevstatus = blink(0.85, 0.15, 5); break; \
             default: \
                 if (team##flag == 3) { \
                     team##_icon_prevstatus = "flag_" #team "_carrying"; /* make it more visible */\
index 89060694a6e365292951cedd4e885d50a876b10b..eaa60f82715cb73d70e1e66c28a8f0ac95275b5e 100644 (file)
@@ -130,7 +130,7 @@ bool freezetag_CheckWinner()
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
-               TeamScore_AddToTeam(winner_team, ST_SCORE, +1);
+               TeamScore_AddToTeam(winner_team, ST_FT_ROUNDS, +1);
        }
        else if(winner_team == -1)
        {
@@ -620,6 +620,12 @@ MUTATOR_HOOKFUNCTION(ft, SV_ParseServerCommand)
        return false;
 }
 
+MUTATOR_HOOKFUNCTION(ft, Scores_CountFragsRemaining)
+{
+       // announce remaining frags
+       return true;
+}
+
 void freezetag_Initialize()
 {
        freezetag_teams = autocvar_g_freezetag_teams_override;
@@ -628,6 +634,7 @@ void freezetag_Initialize()
 
        freezetag_teams = BITS(bound(2, freezetag_teams, 4));
        GameRules_scoring(freezetag_teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, {
+               field_team(ST_FT_ROUNDS, "rounds", SFL_SORT_PRIO_PRIMARY);
                field(SP_FREEZETAG_REVIVALS, "revivals", 0);
        });
 
index 3eb753020b35a857da4cde61e2b9b95879727c47..b77318ca2e808d8929caa9996e184e293b3b6be5 100644 (file)
@@ -8,6 +8,8 @@ int autocvar_g_freezetag_point_leadlimit;
 bool autocvar_g_freezetag_team_spawns;
 string autocvar_g_freezetag_weaponarena = "most_available";
 
+const int ST_FT_ROUNDS = 1;
+
 void freezetag_Initialize();
 
 REGISTER_MUTATOR(ft, false)
index b2d08742854e6cf04f2f68e6cbc346c5b9e77934..660a5511ec551f9f2e57ef7bc2a2a8a9a3e76f59 100644 (file)
@@ -13,10 +13,7 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
 {
        mod_active = 1; // keepaway should always show the mod HUD
 
-       float BLINK_FACTOR = 0.15;
-       float BLINK_BASE = 0.85;
-       float BLINK_FREQ = 5;
-       float kaball_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
+       float kaball_alpha = blink(0.85, 0.15, 5);
 
        int stat_items = STAT(ITEMS);
        int kaball = (stat_items/IT_KEY1) & 1;
index 97e63161d54a062a771fd8129a9884ebff34cd52..f53d8c356a5bac8c59f0f2e5682c65fb0d5b00cc 100644 (file)
@@ -4,6 +4,7 @@ string autocvar_g_campcheck;
 float autocvar_g_campcheck_damage;
 float autocvar_g_campcheck_distance;
 float autocvar_g_campcheck_interval;
+bool autocvar_g_campcheck_typecheck;
 
 REGISTER_MUTATOR(campcheck, expr_evaluate(autocvar_g_campcheck));
 
@@ -24,9 +25,7 @@ MUTATOR_HOOKFUNCTION(campcheck, Damage_Calculate)
        entity frag_attacker = M_ARGV(1, entity);
        entity frag_target = M_ARGV(2, entity);
 
-       if(IS_PLAYER(frag_target))
-       if(IS_PLAYER(frag_attacker))
-       if(frag_attacker != frag_target)
+       if(frag_attacker != frag_target && IS_PLAYER(frag_target) && IS_PLAYER(frag_attacker))
        {
                frag_target.campcheck_traveled_distance = autocvar_g_campcheck_distance;
                frag_attacker.campcheck_traveled_distance = autocvar_g_campcheck_distance;
@@ -40,11 +39,9 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
 
        if(autocvar_g_campcheck_interval)
        if(!game_stopped && !warmup_stage && time >= game_starttime)
-       if(IS_PLAYER(player))
-       if(!IS_DEAD(player))
-       if(!STAT(FROZEN, player))
-       if(!PHYS_INPUT_BUTTON_CHAT(player))
-       if(IS_REAL_CLIENT(player)) // bots may camp, but that's no reason to constantly kill them
+       if(IS_PLAYER(player) && !IS_DEAD(player) && !STAT(FROZEN, player))
+       if(autocvar_g_campcheck_typecheck || !PHYS_INPUT_BUTTON_CHAT(player))
+       if(IS_REAL_CLIENT(player)) // only apply to real clients (bots may "camp" due to missing waypoints in the map, but that's no reason to constantly kill them, clones can't move)
        if(!weaponLocked(player))
        {
                // calculate player movement (in 2 dimensions only, so jumping on one spot doesn't count as movement)
index 8d2bb318f0f2443f1200545a675f23b1d31d433c..5add006c3d2c6bc7082ff8f7cc59294652f9dcef 100644 (file)
@@ -194,12 +194,7 @@ void DrawItemsTimeItem(vector myPos, vector mySize, float ar, string item_icon,
     if (autocvar_hud_panel_itemstime_hidespawned == 2)
         picalpha = 1;
     else if (item_available)
-    {
-        float BLINK_FACTOR = 0.15;
-        float BLINK_BASE = 0.85;
-        float BLINK_FREQ = 5;
-        picalpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
-    }
+        picalpha = blink(0.85, 0.15, 5);
     else
         picalpha = 0.5;
     t = floor(item_time - time + 0.999);
index 779e562b4a4286235891a56c8e43e43cfd0fb716..fa8045101e55b3b94f83f83e5437390ce8f213dc 100644 (file)
@@ -1,6 +1,7 @@
 #include "sv_pinata.qh"
 
 string autocvar_g_pinata;
+bool autocvar_g_pinata_offhand;
 REGISTER_MUTATOR(pinata, expr_evaluate(autocvar_g_pinata) && !MUTATOR_IS_ENABLED(mutator_instagib) && !MUTATOR_IS_ENABLED(ok));
 
 MUTATOR_HOOKFUNCTION(pinata, PlayerDies)
@@ -14,6 +15,9 @@ MUTATOR_HOOKFUNCTION(pinata, PlayerDies)
                if(frag_target.(weaponentity).m_weapon == WEP_Null)
                        continue;
 
+               if(slot > 0 && !autocvar_g_pinata_offhand)
+                       break;
+
                FOREACH(Weapons, it != WEP_Null, {
                        if(STAT(WEAPONS, frag_target) & WepSet_FromWeapon(it))
                        if(frag_target.(weaponentity).m_weapon != it)
index 0f40acfc6856b65ad68446091b5a9142d3d16e13..14b22e991cceed2ad0bccdd2222ee899fbcab040 100644 (file)
@@ -5,7 +5,7 @@ void Inventory_delete(entity this);
 
 void PlayerState_attach(entity this)
 {
-       if (PS(this))
+       if (PS(this) && PS(this).m_client == this)
                return;
 
        this._ps = NEW(PlayerState, this);
index ed37073fbeec0867b2b54e587204ca693ecb7126..612e5b6cde29b84add48892088141f3a636544d3 100644 (file)
@@ -92,6 +92,7 @@ REGISTER_STAT(HIT_TIME, float)
 REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
 REGISTER_STAT(TYPEHIT_TIME, float)
 REGISTER_STAT(SUPERWEAPONS_FINISHED, float)
+REGISTER_STAT(AIR_FINISHED, float)
 REGISTER_STAT(VEHICLESTAT_HEALTH, int)
 REGISTER_STAT(VEHICLESTAT_SHIELD, int)
 REGISTER_STAT(VEHICLESTAT_ENERGY, int)
index b8d2428f3ff24ac9c30d6d1b26930bd2012a7b42..a8d1376d1d86b60781be17f990ff41f835f88996 100644 (file)
@@ -577,10 +577,10 @@ NET_HANDLE(wframe, bool isNew)
                vector a = '0 0 0';
                switch(fr)
                {
+                       default:
                        case WFRAME_IDLE: a = wepent.anim_idle; break;
                        case WFRAME_FIRE1: a = wepent.anim_fire1; break;
                        case WFRAME_FIRE2: a = wepent.anim_fire2; break;
-                       default:
                        case WFRAME_RELOAD: a = wepent.anim_reload; break;
                }
                a.z *= t;
index dbf24c7964d94ff229b30ac068d4a0d315a251ba..cfdbe7b7e933461e0566c9a053255fe9f418da22 100644 (file)
@@ -33,7 +33,6 @@ void Draw_VaporizerBeam_trace_callback(vector start, vector hit, vector end)
 }
 
 .vector vorg1, vorg2;
-.float spawn_time;
 void VaporizerBeam_Draw(entity this)
 {
        //draw either the old v2.3 beam or the new beam
index 04a3c2b74072e5391a198224b5a33a7658672e99..25fd5cdfa1d84874bf5bb70939ee35f027141e3b 100644 (file)
@@ -596,7 +596,6 @@ void CSQCPlayer_SetCamera()
                {
                        CSQCPlayer_CalcRefdef(view);
                }
-                       
        }
        else
        {
index 297e2e69d648c1826289fa21c95e389f5a61b5f2..92948dc5a92d119b34485fe649823fa67f0960a6 100644 (file)
@@ -35,7 +35,7 @@ const int PMF_JUMP_HELD = 1;
 //const int PMF_DUCKED = 4;
 //const int PMF_ONGROUND = 8;
 
-const int FL_DUCKED = 524288;
+const int FL_DUCKED = BIT(19);
 
 void CSQCPlayer_SetCamera();
 float CSQCPlayer_PreUpdate(entity this);
index c4b594d40fd846cf81b6e5e20de920abbb110642..a7508b8fb85c236f61619684dc1e692d5fec0859 100644 (file)
@@ -127,8 +127,6 @@ string autocvar_hud_colorset_background = "7";   // BG - White // neutral/unimpo
 /** color code replace, place inside of sprintf and parse the string */
 string CCR(string input)
 {
-       // See the autocvar declarations in util.qh for default values
-
        // foreground/normal colors
        input = strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), input);
        input = strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), input);
index cf86d97f9cb5e22e6a2123eaf6f7136630cd590e..2b1d00c2cccca49056f80f877d8574a483000cdf 100644 (file)
@@ -24,11 +24,12 @@ bool isinf(float e)
 }
 bool isnan(float e)
 {
-       // the sane way to detect NaN is broken because of a compiler bug
-       // (works with constants but breaks when assigned to variables)
-       // use conversion to string instead
-       //float f = e;
-       //return (e != f);
+       // The sane way to detect NaN is this:
+       // float f = e;
+       // return (e != f);
+       // but darkplaces used to be compiled with -ffinite-math-only which broke it.
+       // DP is fixed now but until all clients update (so after 0.8.3) we have to use the following workaround
+       // or they'd have issues when connecting to newer servers.
 
        // Negative NaN ("-nan") is much more common but plain "nan" can be created by negating *some* -nans so we need to check both.
        // DP's QCVM and GMQCC's QCVM behave differently - one needs ftos(-(0.0 / 0.0)), the other ftos(-sqrt(-1)).
@@ -225,7 +226,7 @@ float copysign(float e, float f)
 {
        return fabs(e) * ((f>0) ? 1 : -1);
 }
-/// Always use `isnan` function to compare because `float x = nan(); x == x;` gives true
+
 float nan(string tag)
 {
        return sqrt(-1);
index ed21eeae0b46d996abb396b337a54192532b7eb8..b4c170280c652febf3435542d8bd57073f81601f 100644 (file)
@@ -26,7 +26,7 @@ void XonoticGameViewSettingsTab_fill(entity me)
                me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_eventchase_death", _("Slide to third person upon death")));
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(2, 0, "cl_eventchase_death", _("Slide to third person upon death")));
                setDependent(e, "chase_active", -1, 0);
        me.TR(me);
                me.TDempty(me, 0.2);
index 305567b7d7b5b01a0a87dd6ca4a42ef5b3ebdc6a..77f2602a1958091fb55dec083089de4cbf973ddc 100644 (file)
@@ -125,16 +125,16 @@ void XonoticVideoSettingsTab_fill(entity me)
                        _("Brightness of white")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:")));
-                       setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
+                       setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "v_gamma",
                        _("Inverse gamma correction value, a brightness effect that does not affect white or black")));
-                       setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
+                       setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:")));
-                       setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
+                       setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 5.0, 0.1, "v_contrastboost",
                        _("By how much to multiply the contrast in dark areas")));
-                       setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
+                       setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:")));
                        setDependent(e, "vid_gl20", 1, 1);
@@ -157,11 +157,6 @@ void XonoticVideoSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)")));
                        e.applyButton = videoApplyButton;
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "v_glslgamma", _("Use GLSL to handle color control"),
-                       _("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot")));
-                       setDependent(e, "vid_gl20", 1, 1);
        if(cvar("developer") > 0)
        {
                me.TR(me);
index ffe2e72b42c98c212b6cb696ba47d04d613e7161..7b30b62dfabbd720111f6cafad9296c231ce7a66 100644 (file)
@@ -146,21 +146,7 @@ void bot_think(entity this)
 void bot_setnameandstuff(entity this)
 {
        string readfile, s;
-       float file, tokens, prio;
-
-       string bot_name, bot_model, bot_skin, bot_shirt, bot_pants;
-       string name, prefix, suffix;
-
-       if(autocvar_g_campaign)
-       {
-               prefix = "";
-               suffix = "";
-       }
-       else
-       {
-               prefix = autocvar_bot_prefix;
-               suffix = autocvar_bot_suffix;
-       }
+       int file, tokens, prio;
 
        file = fopen(autocvar_bot_config_file, FILE_READ);
 
@@ -231,6 +217,8 @@ void bot_setnameandstuff(entity this)
                fclose(file);
        }
 
+       string bot_name, bot_model, bot_skin, bot_shirt, bot_pants;
+
        tokens = tokenizebyseparator(readfile, "\t");
        if(argv(0) != "") bot_name = argv(0);
        else bot_name = "Bot";
@@ -289,13 +277,10 @@ void bot_setnameandstuff(entity this)
        setcolor(this, stof(bot_shirt) * 16 + stof(bot_pants));
        this.bot_preferredcolors = this.clientcolors;
 
-       // pick the name
-       if (autocvar_bot_usemodelnames)
-               name = bot_model;
-       else
-               name = bot_name;
+       string prefix = (autocvar_g_campaign ? "" : autocvar_bot_prefix);
+       string suffix = (autocvar_g_campaign ? "" : autocvar_bot_suffix);
+       string name = (autocvar_bot_usemodelnames ? bot_model : bot_name);
 
-       // number bots with identical names
        if (name == "")
        {
                name = ftos(etof(this));
@@ -303,6 +288,7 @@ void bot_setnameandstuff(entity this)
        }
        else
        {
+               // number bots with identical names
                int j = 0;
                FOREACH_CLIENT(IS_BOT_CLIENT(it), {
                        if(it.cleanname == name)
index dd906931176d48a4293b2792044ff4258da73496..dcddced84ffc39ba07b961850b1fa28cfca81fcb 100644 (file)
@@ -337,6 +337,7 @@ void PutObserverInServer(entity this)
        this.strength_finished = 0;
        this.invincible_finished = 0;
        this.superweapons_finished = 0;
+       this.air_finished_stat = 0;
        //this.dphitcontentsmask = 0;
        this.dphitcontentsmask = DPCONTENTS_SOLID;
        if (autocvar_g_playerclip_collisions)
@@ -647,7 +648,7 @@ void PutPlayerInServer(entity this)
        STAT(BUFFS, this) = 0;
        STAT(BUFF_TIME, this) = 0;
 
-       this.air_finished = time + 12;
+       this.air_finished = time + autocvar_g_balance_contents_drowndelay;
        this.waterlevel = WATERLEVEL_NONE;
        this.watertype = CONTENT_EMPTY;
 
@@ -1690,6 +1691,7 @@ void SpectateCopy(entity this, entity spectatee)
        this.strength_finished = spectatee.strength_finished;
        this.invincible_finished = spectatee.invincible_finished;
        this.superweapons_finished = spectatee.superweapons_finished;
+       this.air_finished_stat = spectatee.air_finished_stat;
        STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
        STAT(WEAPONS, this) = STAT(WEAPONS, spectatee);
        this.punchangle = spectatee.punchangle;
@@ -2617,6 +2619,7 @@ void DrownPlayer(entity this)
                if(this.air_finished < time)
                        PlayerSound(this, playersound_gasp, CH_PLAYER, VOL_BASE, VOICETYPE_PLAYERSOUND);
                this.air_finished = time + autocvar_g_balance_contents_drowndelay;
+               this.air_finished_stat = 0;
        }
        else if (this.air_finished < time)
        {       // drown!
@@ -2625,7 +2628,10 @@ void DrownPlayer(entity this)
                        Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_drowning * autocvar_g_balance_contents_damagerate, DEATH_DROWN.m_id, DMG_NOWEP, this.origin, '0 0 0');
                        this.pain_finished = time + 0.5;
                }
+               this.air_finished_stat = this.air_finished;
        }
+       else
+               this.air_finished_stat = this.air_finished;
 }
 
 .bool move_qcphysics;
index 29621f61d83ff80fc73163281d1a9bd0c33da6f8..9036ee22219f46aa4baf8724c5d2faee709a818a 100644 (file)
@@ -51,6 +51,7 @@ float server_is_dedicated;
 .float  crouch;        // Crouching or not?
 
 const .float superweapons_finished = _STAT(SUPERWEAPONS_FINISHED);
+const .float air_finished_stat = _STAT(AIR_FINISHED);
 
 .float cnt; // used in too many places
 .float count;
index 5ccfc97cc65fceb5cbac2ca9f0bcca40f208be63..fd8631f31a8657e82d664149f6ba16c83b729b7d 100644 (file)
@@ -1258,7 +1258,7 @@ void Maplist_Init()
                                break;
                }
        }
-       
+
        if (i == Map_Count)
        {
                bprint( "Maplist contains no usable maps!  Resetting it to default map list.\n" );
@@ -1705,7 +1705,9 @@ void ShuffleMaplist()
        cvar_set("g_maplist", shufflewords(autocvar_g_maplist));
 }
 
-float leaderfrags;
+float leaderscore;
+float secondscore;
+int fragsleft_last;
 float WinningCondition_Scores(float limit, float leadlimit)
 {
        float limitreached;
@@ -1741,18 +1743,42 @@ float WinningCondition_Scores(float limit, float leadlimit)
        if(MUTATOR_CALLHOOK(Scores_CountFragsRemaining))
        // these modes always score in increments of 1, thus this makes sense
        {
-               if(leaderfrags != WinningConditionHelper_topscore)
+               if (leaderscore != WinningConditionHelper_topscore ||
+                       secondscore != WinningConditionHelper_secondscore)
                {
-                       leaderfrags = WinningConditionHelper_topscore;
+                       int fragsleft = 0, leadingfragsleft = 0;
+
+                       leaderscore = WinningConditionHelper_topscore;
+                       secondscore = WinningConditionHelper_secondscore;
 
                        if (limit)
+                               fragsleft = limit - leaderscore;
+                       if (leadlimit)
+                               leadingfragsleft = secondscore + leadlimit - leaderscore;
+
+                       if (autocvar_leadlimit_and_fraglimit && leadlimit)
+                       {
+                               if (limit)
+                                       fragsleft = max(leadingfragsleft, fragsleft);
+                       }
+                       else if (leadlimit)
                        {
-                               if (leaderfrags == limit - 1)
+                               if (limit)
+                                       fragsleft = min(fragsleft, leadingfragsleft);
+                               else
+                                       fragsleft = leadingfragsleft;
+                       }
+
+                       if (fragsleft_last != fragsleft) // do not announce same remaining frags multiple times
+                       {
+                               if (fragsleft == 1)
                                        Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_1);
-                               else if (leaderfrags == limit - 2)
+                               else if (fragsleft == 2)
                                        Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_2);
-                               else if (leaderfrags == limit - 3)
+                               else if (fragsleft == 3)
                                        Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_3);
+
+                               fragsleft_last = fragsleft;
                        }
                }
        }
index 9d74477b4846525c3d84dc020a58340c75b2e11e..a7786f6b660eac467b1d7ea689dfb0f4dac98f92 100644 (file)
@@ -453,11 +453,16 @@ bool Ban_MaybeEnforceBan(entity client)
 {
        if (Ban_IsClientBanned(client, -1))
        {
-               string s = sprintf("^1NOTE:^7 banned client %s just tried to enter\n", client.netaddress);
+               if (!client.crypto_idfp)
+                       LOG_INFOF("^1NOTE:^7 banned client %s just tried to enter\n",
+                               client.netaddress);
+               else
+                       LOG_INFOF("^1NOTE:^7 banned client %s (%s) just tried to enter\n",
+                               client.netaddress, client.crypto_idfp);
+
                if(autocvar_g_ban_telluser)
                        sprint(client, "You are banned from this server.\n");
                dropclient(client);
-               bprint(s);
                return true;
        }
        return false;
@@ -489,7 +494,7 @@ string Ban_Enforce(float j, string reason)
                                        reason = strcat(reason, ", ");
                                reason = strcat(reason, it.netname);
                        }
-                       s = strcat(s, "^1NOTE:^7 banned client ", it.netaddress, "^7 has to go\n");
+                       s = strcat(s, "^1NOTE:^7 banned client ", it.netname, "^7 has to go\n");
                        dropclient(it);
                }
        });
index fc550fa636f029bd2f0b1e596c44dbd0b15a6a2e..4cb8a3806c6883f32cb8550abc9388eda50cef5a 100644 (file)
@@ -289,7 +289,7 @@ void pathlib_cleanup()
 
 float Cosine_Interpolate(float a, float b, float c)
 {
-       float ft = c * 3.1415927;
+       float ft = c * M_PI;
        float f = (1 - cos(ft)) * 0.5;
 
        return a*(1-f) + b*f;
index ea89794357517cb79b5a83887712579e067dfc6b..367cc99b7a64f3f45f25a2242b8ec0c350ba1219 100644 (file)
@@ -89,7 +89,7 @@ void CreatureFrame_Liquids(entity this)
                        this.flags &= ~FL_INWATER;
                        this.dmgtime = 0;
                }
-               this.air_finished = time + 12;
+               this.air_finished = time + autocvar_g_balance_contents_drowndelay;
        }
 }
 
index 59812425d674cbe83100c535b2e40b02a1d8dac7..5f4f6f8332deb1d0b4d171c31a839922b4267bd3 100644 (file)
@@ -366,6 +366,9 @@ void weapon_thinkf(entity actor, .entity weaponentity, WFRAME fr, float t, void(
        bool restartanim;
        if (fr == WFRAME_DONTCHANGE)
        {
+               // this can happen when the weapon entity is newly spawned, since it has a clear state and no previous weapon frame
+               if (this.wframe == WFRAME_DONTCHANGE)
+                       this.wframe = WFRAME_IDLE;
                fr = this.wframe;
                restartanim = false;
        }
index 29a49329a871d196532c91418f2cd9ecfa058079..f1335c9d29b185978c78baa09d773f5f74dd1043 100644 (file)
@@ -202,7 +202,7 @@ seta cl_hitsound_nom_damage 25 "damage amount at which hitsound bases pitch off"
 
 seta cl_eventchase_spectated_change 0 "camera goes into 3rd person mode for a moment when changing spectated player"
 seta cl_eventchase_spectated_change_time 1 "how much time the effect lasts when changing spectated player"
-seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
+seta cl_eventchase_death 2 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
 seta cl_eventchase_frozen 0 "camera goes into 3rd person mode when the player is frozen"
 seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
 seta cl_eventchase_distance 140 "final camera distance"
index 1e0e4ab3885e8bc9e96d7deff303477fb541a94b..0edaf7ea4cbff865ad8db7f75e1c3b61e23cbcff 100644 (file)
@@ -194,7 +194,6 @@ set g_antilag_nudge 0 "don't touch"
 set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
 set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
 set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
-set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
 set g_weapon_stay 0 "1: ghost weapons can be picked up but give no ammo, thrown guns have ammo 2: ghost weapons can be picked up and refill ammo to one pickup size, thrown guns have no ammo (to prevent infinite ammo abuse)"
 set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
 set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"