]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
cl_gentle split into cl_gentle_gibs and cl_gentle_messages, cl_gentle left in as...
authorFruitieX <rasse@rasse-lappy.localdomain>
Wed, 7 Jul 2010 17:01:04 +0000 (20:01 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Wed, 7 Jul 2010 17:01:04 +0000 (20:01 +0300)
defaultXonotic.cfg
qcsrc/client/autocvars.qh
qcsrc/client/gibs.qc
qcsrc/client/hud.qc

index e9624f6cf963ef43fa8595304fcb97aad3265dcd..9a6509cf37bcc9b60b907a7bcacb218890ace1c4 100644 (file)
@@ -1640,8 +1640,10 @@ set camera_look_attenuation      8       "Attenuation of \"looking\" movements, only if ca
 set camera_forward_follows     1       "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking"
 
 // "Gentle mode": show no blood
-seta sv_gentle 0       "force gentle mode for everyone, also remove references to acts of killing from the messages"
-seta cl_gentle 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 sv_gentle 0               "force gentle mode for everyone, also remove references to acts of killing from the messages"
+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_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 a686ac5dcda740cff7787a4c806ad35aa7bf763a..f12d5bbcfe16061d192352d49073e7c854b359d0 100644 (file)
@@ -6,6 +6,10 @@ 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;
+var float autocvar_cl_gentle_gibs;
+var float autocvar_cl_gentle_messages;
+
 var float autocvar__menu_alpha;
 
 var float autocvar__hud_configure;
index a92567e61928f90ff8f4c74916430234f4768f3d..f395fb6a7ba99cc8f07df85034c4a0126bfb366a 100644 (file)
@@ -151,16 +151,16 @@ void Ent_GibSplash(float isNew)
        org_z = ReadShort() * 4 + 2;
        vel = decompressShortVector(ReadShort());
 
-       if(cvar("cl_gentle"))
+       if(cvar("cl_gentle_gibs") || cvar("cl_gentle"))
                type |= 0x80; // set gentle bit
 
        if(type & 0x80)
        {
-               if(cvar("cl_gentle") == 2)
+               if(cvar("cl_gentle_gibs") == 2)
                        gentle_prefix = "";
-               else if(cvar("cl_gentle") == 3) 
+               else if(cvar("cl_gentle_gibs") == 3) 
                        gentle_prefix = "happy_";
-               else if(cvar("cl_gentle"))
+               else
                        gentle_prefix = "morphed_";
        }
        else if(cvar("cl_particlegibs"))
@@ -169,7 +169,7 @@ void Ent_GibSplash(float isNew)
                gentle_prefix = "particlegibs_";
        }
 
-       if not(cvar("cl_gentle"))
+       if not(cvar("cl_gentle_gibs") || cvar("cl_gentle"))
                amount *= 1 - cvar("cl_nogibs");
 
        if(cvar("ekg"))
index 701c18b47b416dfdeebe8f433dd5a230b753f7a2..e5f74735038915ad0ac77b5197cdf40d86572dbe 100644 (file)
@@ -2297,8 +2297,9 @@ void HUD_KillNotify_Push(string attacker, string victim, float actiontype, float
 void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
 {
        float w;
-       float alsoprint;
+       float alsoprint, gentle;
        alsoprint = (autocvar_hud_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
+       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
        
        if(msg == MSG_SUICIDE) {
                // TODO: cl_gentle
@@ -2354,20 +2355,20 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, s2, 1, type);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle")) {
+                               if(gentle) {
                                        print ("^1", s1, "^1 took action against a team mate\n");
                                } else {
                                        print ("^1", s1, "^1 mows down a team mate\n");
                                }
                        }
                        if (stof(s2) > 2 && type == KILL_TEAM_SPREE) {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1,"^1 ended a ",s3," scoring spree by going against a team mate\n");
                                else
                                        print ("^1",s1,"^1 ended a ",s3," kill spree by killing a team mate\n");
                        }
                        else if (stof(s2) > 2) {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1,"'s ^1",s3," scoring spree was ended by a team mate!\n");
                                else
                                        print ("^1",s1,"'s ^1",s3," kill spree was ended by a team mate!\n");
@@ -2468,47 +2469,47 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                }
        } else if(msg == MSG_SPREE) {
                if(type == KILL_END_SPREE) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print ("^1",s1,"'s ^1", s2, " scoring spree was ended by ", s3, "\n");
                        else
                                print ("^1",s1,"'s ^1", s2, " kill spree was ended by ", s3, "\n");
                } else if(type == KILL_SPREE) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print ("^1",s1,"^1 made ",s2," scores in a row\n");
                        else
                                print ("^1",s1,"^1 has ",s2," frags in a row\n");
                } else if(type == KILL_SPREE_3) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 made a ^1TRIPLE SCORE\n");
                        else
                                print (s1,"^7 made a ^1TRIPLE FRAG\n");
                } else if(type == KILL_SPREE_5) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 unleashes ^1SCORING RAGE\n");
                        else
                                print (s1,"^7 unleashes ^1RAGE\n");
                } else if(type == KILL_SPREE_10) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 made ^1TEN SCORES IN A ROW!\n");
                        else
                                print (s1,"^7 starts the ^1MASSACRE!\n");
                } else if(type == KILL_SPREE_15) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 made ^1FIFTEEN SCORES IN A ROW!\n");
                        else
                                print (s1,"^7 executes ^1MAYHEM!\n");
                } else if(type == KILL_SPREE_20) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 made ^1TWENTY SCORES IN A ROW!\n");
                        else
                                print (s1,"^7 is a ^1BERSERKER!\n");
                } else if(type == KILL_SPREE_25) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 made ^1TWENTY FIFE SCORES IN A ROW!\n");
                        else
                                print (s1,"^7 inflicts ^1CARNAGE!\n");
                } else if(type == KILL_SPREE_30) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                print (s1,"^7 made ^1THIRTY SCORES IN A ROW!\n");
                        else
                                print (s1,"^7 unleashes ^1ARMAGEDDON!\n");
@@ -2518,7 +2519,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, "", 0, DEATH_DROWN);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1, "^1 was in the water for too long\n");
                                else
                                        print ("^1",s1, "^1 drowned\n");
@@ -2531,7 +2532,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, "", 0, DEATH_LAVA);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1, "^1 found a hot place\n");
                                else
                                        print ("^1",s1, "^1 turned into hot slag\n");
@@ -2540,7 +2541,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1, "^1 tested gravity (and it worked)\n");
                                else
                                        print ("^1",s1, "^1 hit the ground with a crunch\n");
@@ -2553,7 +2554,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1, "^1 discovered a swamp\n");
                                else
                                        print ("^1",s1, "^1 is now conserved for centuries to come\n");
@@ -2582,7 +2583,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1, "^1 felt a little hot\n");
                                else
                                        print ("^1",s1, "^1 burnt to death\n");
@@ -2591,14 +2592,14 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
                        if(alsoprint)
                        {
-                               if(cvar("cl_gentle"))
+                               if(gentle)
                                        print ("^1",s1, "^1 needs a restart\n");
                                else
                                        print ("^1",s1, "^1 died\n");
                        }
                }
        } else if(msg == MSG_KILL_ACTION_SPREE) {
-               if(cvar("cl_gentle"))
+               if(gentle)
                        print ("^1",s1,"^1 needs a restart after a ",s2," scoring spree\n");
                else
                        print ("^1",s1,"^1 died with a ",s2," kill spree\n");
@@ -2623,78 +2624,80 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
 
 void HUD_Centerprint(string s1, string s2, float type, float msg)
 {
+       float gentle;
+       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
        if(msg == MSG_SUICIDE) {
                if (type == DEATH_TEAMCHANGE) {
                        centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1));
                } else if (type == DEATH_AUTOTEAMCHANGE) {
                        centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You have been moved into a different team to improve team balance\nYou are now on: ", s1));
                } else if (type == DEATH_CAMP) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Reconsider your tactics, camper!"));
                        else
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Die camper!"));
                } else if (type == DEATH_NOAMMO) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You are reinserted into the game for running out of ammo..."));
                        else
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were killed for running out of ammo..."));
                } else if (type == DEATH_ROT) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to preserve your health"));
                        else
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You grew too old without taking your medicine"));
                } else if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't go against team mates!"));
                        else
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't shoot your team mates!"));
                } else if (type == DEATH_QUIET) {
                        // do nothing
                } else if (type == DEATH_KILL) {
-                       if(cvar("cl_gentle"))
+                       if(gentle)
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to be more careful!"));
                        else
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You killed your own dumb self!"));
                }
        } else if(msg == MSG_KILL) {
                if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You went against", s1, ",a team mate!"));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You fragged ", s1, ", a team mate!"));
                        }
                } else if (type == KILL_FIRST_BLOOD) {
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First score"));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First blood"));
                        }
                } else if (type == KILL_FIRST_VICTIM) {
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First casualty"));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First victim"));
                        }
                } else if (type == KILL_TYPEFRAG) { // s2 contains "advanced kill messages" such as ping, handicap...
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You scored against ^7", s1, "^1 who was typing!", s2));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You typefragged ^7", s1, s2));
                        }
                } else if (type == KILL_TYPEFRAGGED) {
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were scored against by ^7", s1, "^1 while you were typing!", s2));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were typefragged by ^7", s1, s2));
                        }
                } else if (type == KILL_FRAG) {
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^4You scored against ^7", s1, s2));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^4You fragged ^7", s1, s2));
                        }
                } else if (type == KILL_FRAGGED) {
-                       if(cvar("cl_gentle")) {
+                       if(gentle) {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were scored against by ^7", s1, s2));
                        } else {
                                centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were fragged by ^7", s1, s2));