-Fri Mar 6 07:24:27 CET 2020
+Sun Mar 29 07:24:37 CEST 2020
#
# 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 ""
{
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)
{
return false;
}
+MUTATOR_HOOKFUNCTION(ft, Scores_CountFragsRemaining)
+{
+ // announce remaining frags
+ return true;
+}
+
void freezetag_Initialize()
{
freezetag_teams = autocvar_g_freezetag_teams_override;
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);
});
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)
}
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)).
{
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);