]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/tzork/turrets-assualt-fix'
authorRudolf Polzer <divVerent@xonotic.org>
Fri, 19 Nov 2010 11:42:47 +0000 (12:42 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 19 Nov 2010 11:42:47 +0000 (12:42 +0100)
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceTest.cfg
balanceXonotic.cfg
balancetZork.cfg
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/server/w_crylink.qc

index 9ca249253593162976f5a0badcba4ecfaacd8783..a5d3b68f10739859db58f0a2a57511ccfa538f7e 100644 (file)
@@ -406,7 +406,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
 set g_balance_crylink_primary_joinexplode_damage 0
@@ -433,7 +433,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index 97fd210cc8f94bad17a41c777bab56fcc0f4a033..ade867648f67a9093f79e9c2eb791db1d1aba901 100644 (file)
@@ -417,7 +417,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.30008
 set g_balance_crylink_primary_ammo 3
 set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
 set g_balance_crylink_primary_joinexplode_damage 0
@@ -444,7 +444,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index 5108942388101cc2da3e673419226778649e6c99..23ab6944986e7a50ea2f05c82a69aa143f961382 100644 (file)
@@ -405,7 +405,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
 set g_balance_crylink_primary_joinexplode_damage 0
@@ -432,7 +432,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index 76b46fd652ceee6060fea45bccd191c284d985c7..2935a2cca0b687624298f154419e80dc7ed29256 100644 (file)
@@ -406,7 +406,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
 set g_balance_crylink_primary_joinexplode_damage 0
@@ -433,7 +433,7 @@ set g_balance_crylink_secondary_refire 0.2
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index 91cfe1f3c19f49348e61af9224d0ae1ed3a255a9..fa4f521cf4ac5e3af0eb1048b1c774919f6b92f4 100644 (file)
@@ -406,7 +406,7 @@ set g_balance_crylink_primary_refire 1
 set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 300
+set g_balance_crylink_primary_joinspread 0.2
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
 set g_balance_crylink_primary_joinexplode_damage 100   //Max demage (Determined by % of _primary_shots that joins)
@@ -433,7 +433,7 @@ set g_balance_crylink_secondary_refire 0.15
 set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index 0d79340641ec5db2d392f83465fea5cd06483cb0..0a4238ea6633e13d468c3a4d4050c7d16599c087 100644 (file)
@@ -406,7 +406,7 @@ set g_balance_crylink_primary_refire 0.8
 set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 250
+set g_balance_crylink_primary_joinspread 0.2
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
 set g_balance_crylink_primary_joinexplode_damage 0
@@ -433,7 +433,7 @@ set g_balance_crylink_secondary_refire 0.15
 set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index c4a766a3590491feb8a47b08c245245165dfae03..58b3e3c276a4c1eb2d0b466b99c8925850efe6c9 100644 (file)
@@ -428,7 +428,7 @@ set g_balance_crylink_primary_refire 1
 set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 150
+set g_balance_crylink_primary_joinspread 0.1
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
 set g_balance_crylink_primary_joinexplode_damage 100   //Max demage (Determined by % of _primary_shots that joins)
@@ -454,7 +454,7 @@ set g_balance_crylink_secondary_refire 0.15
 set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
 set g_balance_crylink_secondary_joinexplode_damage 0   
index 1da4d94354457a12a2e53710f48ff1d7c2807c82..72a1ded11efc7d975ac1693cb205fae2f9497ccb 100644 (file)
@@ -1368,15 +1368,17 @@ seta hud_showbinds 1    "the way to show the keys to press in HUD messages: 0 displ
 seta hud_showbinds_limit 2     "maximum number of bound keys to show for a command. 0 for unlimited"
 
 seta hud_damage 1 "an improved version of gl_polyblend, draw an image instead when hurt"
+seta hud_damage_gentle_alpha_multiplier 0.25 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
+seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version"
 seta hud_damage_color "1 0 0" "color of flash"
-seta hud_damage_factor 0.05 "(damage * factor) = how much to add to the alpha value"
+seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
 seta hud_damage_fade_rate 1 "how much to subtract from the alpha value each second"
 seta hud_damage_maxalpha 2 "how much to limit the alpha value to"
-seta hud_damage_pain_treshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
-seta hud_damage_pain_treshold_lower 1 "how much we lower pain_treshold with when nearing 0 health (if pain_treshold gets negative then we always draw a flash at alpha = fabs(pain_treshold)"
-seta hud_damage_pain_treshold_lower_health 50 "at which health we start lowering pain_treshold"
-seta hud_damage_pain_treshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"
-seta hud_damage_pain_treshold_pulsating_period 0.8 "one pulse every X seconds"
+seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
+seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
+seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
+seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"
+seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"
 
 // scoreboard
 seta scoreboard_columns default
@@ -1682,6 +1684,7 @@ seta sv_gentle 0          "force gentle mode for everyone, also remove references to act
 seta cl_gentle 0               "client side gentle mode, master switch for removing both gibs and messages"
 seta cl_gentle_gibs 0          "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
 seta cl_gentle_messages 0      "client side gentle mode (only replaces frag messages/centerprints)"
+seta cl_gentle_damage 0                "client side gentle mode (only replaces damage flash); when set to 1, a white flash replaces the blood image, when set to 2, a randomily colored flash is used instead"
 
 seta cl_racetimer_position 0.25 "Y-axis positioning of the race timer (from 0 to 1)"
 seta cl_showpressedkeys        0       "Show which movement keys someone is pressing: 1 for spectating, 2 for always"
index e417ddbed9d136ba018547a368ca78afa6d57803..82a45b7138f707cac89ca81e89054827505b6bbf 100644 (file)
@@ -355,6 +355,8 @@ float use_nex_charge_pool;
 float myhealth, myhealth_prev;
 float myhealth_flash;
 
+vector myhealth_gentlergb;
+
 void CSQC_UpdateView(float w, float h)
 {
        entity e;
@@ -665,6 +667,7 @@ void CSQC_UpdateView(float w, float h)
        }
 
        // improved polyblend
+       vector rgb;
        if(cvar("hud_damage"))
        {
                float myhealth_flash_temp;
@@ -675,17 +678,17 @@ void CSQC_UpdateView(float w, float h)
                // add new damage
                myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * cvar("hud_damage_factor"), cvar("hud_damage_maxalpha"));
 
-               float pain_treshold, pain_treshold_lower, pain_treshold_lower_health;
-               pain_treshold = cvar("hud_damage_pain_treshold");
-               pain_treshold_lower = cvar("hud_damage_pain_treshold_lower");
-               pain_treshold_lower_health = cvar("hud_damage_pain_treshold_lower_health");
+               float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
+               pain_threshold = cvar("hud_damage_pain_threshold");
+               pain_threshold_lower = cvar("hud_damage_pain_threshold_lower");
+               pain_threshold_lower_health = cvar("hud_damage_pain_threshold_lower_health");
 
-               if(pain_treshold_lower && myhealth < pain_treshold_lower_health)
+               if(pain_threshold_lower && myhealth < pain_threshold_lower_health)
                {
-                       pain_treshold = pain_treshold - max(cvar("hud_damage_pain_treshold_pulsating_min"), fabs(sin(M_PI * time / cvar("hud_damage_pain_treshold_pulsating_period")))) * pain_treshold_lower * (1 - max(0, myhealth)/pain_treshold_lower_health);
+                       pain_threshold = pain_threshold - max(cvar("hud_damage_pain_threshold_pulsating_min"), fabs(sin(M_PI * time / cvar("hud_damage_pain_threshold_pulsating_period")))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
                }
 
-               myhealth_flash_temp = bound(0, myhealth_flash - pain_treshold, 1);
+               myhealth_flash_temp = bound(0, myhealth_flash - pain_threshold, 1);
 
                if(myhealth_prev < 1)
                {
@@ -708,7 +711,22 @@ void CSQC_UpdateView(float w, float h)
 
                myhealth_prev = myhealth;
 
-               drawpic(reticle_pos, "gfx/blood", reticle_size, stov(cvar_string("hud_damage_color")), bound(0, myhealth_flash_temp, 1), DRAWFLAG_NORMAL);
+               if(autocvar_cl_gentle_damage || cvar("cl_gentle"))
+               {
+                       if(autocvar_cl_gentle_damage == 2)
+                       {
+                               if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
+                               {
+                                       myhealth_gentlergb = eX * random() + eY * random() + eZ * random();
+                               }
+                       }
+                       else
+                               myhealth_gentlergb = stov(cvar_string("hud_damage_gentle_color"));
+
+                       drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, cvar("hud_damage_gentle_alpha_multiplier") * bound(0, myhealth_flash_temp, 1), DRAWFLAG_NORMAL);
+               }
+               else
+                       drawpic(reticle_pos, "gfx/blood", reticle_size, stov(cvar_string("hud_damage_color")), bound(0, myhealth_flash_temp, 1), DRAWFLAG_NORMAL);
        }
 
        // Draw the mouse cursor
@@ -922,7 +940,6 @@ void CSQC_UpdateView(float w, float h)
                        }
                        else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
                        {
-                               vector rgb;
                                if(nex_charge_pool || use_nex_charge_pool)
                                {
                                        use_nex_charge_pool = 1;
index 28340719323309f095a63751e6c9e423332151fa..873df14a358e435d0b68d3e8e0634028575b6f94 100644 (file)
@@ -6,6 +6,8 @@ var float autocvar_cl_gibs_sloppy = 1;
 var float autocvar_cl_casings_ticrate = 0.1;
 var float autocvar_cl_casings_sloppy = 1;
 
+var float autocvar_cl_gentle_damage;
+
 var float autocvar_scoreboard_color_bg_team;
 
 var float autocvar__menu_alpha;
index 4891bc2b9c00188fa63100caa90fb147499690c4..07100c7784966e13e672a250b55dbb1dde0708d5 100644 (file)
@@ -485,7 +485,7 @@ float w_crylink(float req)
                        {
                                W_Crylink_Attack();
                                weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_crylink_primary_animtime"), w_ready);
-                               if(cvar("g_balance_crylink_primary_joinspeed") != 0 || cvar("g_balance_crylink_primary_jointime") != 0)
+                               if(cvar("g_balance_crylink_primary_joinspread") != 0 || cvar("g_balance_crylink_primary_jointime") != 0)
                                        self.crylink_waitrelease = 1;
                        }
                }
@@ -496,7 +496,7 @@ float w_crylink(float req)
                        {
                                W_Crylink_Attack2();
                                weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
-                               if(cvar("g_balance_crylink_secondary_joinspeed") != 0 || cvar("g_balance_crylink_secondary_jointime") != 0)
+                               if(cvar("g_balance_crylink_secondary_joinspread") != 0 || cvar("g_balance_crylink_secondary_jointime") != 0)
                                        self.crylink_waitrelease = 2;
                        }
                }
@@ -513,12 +513,12 @@ float w_crylink(float req)
                                        
                                        if(self.crylink_waitrelease == 1)
                                        {
-                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"), cvar("g_balance_crylink_primary_jointime"));
+                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspread") * cvar("g_balance_crylink_primary_speed"), cvar("g_balance_crylink_primary_jointime"));
                                                
                                        }
                                        else
                                        {
-                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"), cvar("g_balance_crylink_secondary_jointime"));
+                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspread") * cvar("g_balance_crylink_secondary_speed"), cvar("g_balance_crylink_secondary_jointime"));
                                        }
                                        
                                        linkjoineffect = spawn();