]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'terencehill/cl_eventchase_death_2' into 'master'
authorMartin Taibr <taibr.martin@gmail.com>
Sun, 29 Mar 2020 06:16:11 +0000 (06:16 +0000)
committerMartin Taibr <taibr.martin@gmail.com>
Sun, 29 Mar 2020 06:16:11 +0000 (06:16 +0000)
cl_eventchase_death 2 by default

* cl_eventchase_death 2 by default
* make the cl_eventchase_death checkbox toggle between 0 and 2

For a quick reference: 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"

See merge request xonotic/xonotic-data.pk3dir!787

.tx/merge-base
common.ast.po
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh
qcsrc/lib/warpzone/mathlib.qc

index 803036b6a9ca294200d18ad67bfe918459f45c82..6b9bef88e8973e712d8c855c7bfa7228018d7e95 100644 (file)
@@ -1 +1 @@
-Fri Mar  6 07:24:27 CET 2020
+Sun Mar 29 07:24:37 CEST 2020
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 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 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);