]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into sev/weapon_panel_retry
authorMario <zacjardine@y7mail.com>
Sat, 14 Feb 2015 13:02:54 +0000 (00:02 +1100)
committerMario <zacjardine@y7mail.com>
Sat, 14 Feb 2015 13:02:54 +0000 (00:02 +1100)
23 files changed:
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
balance-xonotic.cfg
balance-xpm.cfg
defaultXonotic.cfg
mutators.cfg
qcsrc/client/tuba.qc
qcsrc/client/tuba.qh
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/dpdefs/menudefs.qh
qcsrc/menu/item/modalcontroller.qc
qcsrc/menu/xonotic/dialog_multiplayer_create.qc
qcsrc/menu/xonotic/gametypelist.qc
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/util.qh
qcsrc/server/cl_client.qc
qcsrc/server/ipban.qc
qcsrc/warpzonelib/mathlib.qc
qcsrc/warpzonelib/mathlib.qh
xonotic-credits.txt

index 2e6d10e7b1d62b34202c7388d5c74979f0b051ad..1fa36d0c4985fbbb016e532453947a2a692e752c 100644 (file)
@@ -34,12 +34,12 @@ set g_balance_blaster_weaponthrowable 0
 // {{{ #2: Shotgun
 set g_balance_shotgun_primary_ammo 1
 set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_bullets 14
-set g_balance_shotgun_primary_damage 3.5
+set g_balance_shotgun_primary_bullets 12
+set g_balance_shotgun_primary_damage 4
 set g_balance_shotgun_primary_force 15
 set g_balance_shotgun_primary_refire 0.75
 set g_balance_shotgun_primary_solidpenetration 3.8
-set g_balance_shotgun_primary_spread 0.11
+set g_balance_shotgun_primary_spread 0.12
 set g_balance_shotgun_reload_ammo 0
 set g_balance_shotgun_reload_time 2
 set g_balance_shotgun_secondary 1
index 2e6d10e7b1d62b34202c7388d5c74979f0b051ad..1fa36d0c4985fbbb016e532453947a2a692e752c 100644 (file)
@@ -34,12 +34,12 @@ set g_balance_blaster_weaponthrowable 0
 // {{{ #2: Shotgun
 set g_balance_shotgun_primary_ammo 1
 set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_bullets 14
-set g_balance_shotgun_primary_damage 3.5
+set g_balance_shotgun_primary_bullets 12
+set g_balance_shotgun_primary_damage 4
 set g_balance_shotgun_primary_force 15
 set g_balance_shotgun_primary_refire 0.75
 set g_balance_shotgun_primary_solidpenetration 3.8
-set g_balance_shotgun_primary_spread 0.11
+set g_balance_shotgun_primary_spread 0.12
 set g_balance_shotgun_reload_ammo 0
 set g_balance_shotgun_reload_time 2
 set g_balance_shotgun_secondary 1
index 08ff39c0e700f843a9cc44e39c25829b9a5f625f..76ba515256438d98b65dbf5d694a78d121e64029 100644 (file)
@@ -155,7 +155,7 @@ set g_projectiles_damage -2
 // 0: only damage from contents (lava/slime) or exceptions
 // 1: only self damage or damage from contents or exceptions
 // 2: allow all damage to projectiles normally
-set g_projectiles_keep_owner 0
+set g_projectiles_keep_owner 1
 set g_projectiles_newton_style 0
 // possible values:
 // 0: absolute velocity projectiles (like Quake)
index c254bcdf8d5118efd4b5f1aec0d687c609c63388..e7855280edc2b2541c9895ecf5d6fd3a336279c7 100644 (file)
@@ -155,7 +155,7 @@ set g_projectiles_damage -2
 // 0: only damage from contents (lava/slime) or exceptions
 // 1: only self damage or damage from contents or exceptions
 // 2: allow all damage to projectiles normally
-set g_projectiles_keep_owner 0
+set g_projectiles_keep_owner 1
 set g_projectiles_newton_style 0
 // possible values:
 // 0: absolute velocity projectiles (like Quake)
index 034b3bb32d9df4fe1f3139dad707e1742af9c2c7..f66dc0128bdb87059cb2a4433fb81f8f7365c75a 100644 (file)
@@ -472,7 +472,7 @@ set g_botclip_collisions 1 "0 = disable collision testing against botclips, migh
 set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
 
 set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
-set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
+set g_spawn_furthest 1.0 "this amount of the spawns shall be far away from any players"
 set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
 // respawn delay
 set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
index be5af23f9c1ad9f6e2950369c28f5275abab9447..a803d8411011cb7e52f737bd6b0553eaa6cee958 100644 (file)
@@ -43,7 +43,7 @@ set g_overkill_100h_anyway 1
 set g_overkill_powerups_replace 1
 set g_overkill_superguns_respawn_time 20
 
-set g_overkill_ammo_charge 1
+set g_overkill_ammo_charge 0
 set g_overkill_ammo_charge_notice 1
 set g_overkill_ammo_charge_limit 1
 set g_overkill_ammo_charge_rate 0.5
index dec00043f9baf0300382d7867f0476a15ebf28c6..cd518e091d3c2ecdd3677aaf7c2ca50a5f6217aa 100644 (file)
@@ -1,98 +1,94 @@
 #include "tuba.qh"
 
-void tubasound(entity e, float restart)
+#define TUBA_STARTNOTE(i, n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
+
+const int TUBA_MIN = -18;
+const int TUBA_MAX = 27;
+const int TUBA_INSTRUMENTS = 3;
+
+.int note;
+.bool tuba_attenuate;
+.float tuba_volume;
+.float tuba_volume_initial;
+.int tuba_instrument;
+
+int Tuba_PitchStep;
+
+void tubasound(entity e, bool restart)
 {
-       string snd1;
-
-       snd1 = string_null;
-
-       if(Tuba_PitchStep)
-       {
-               string snd2;
-               float f1, f2;
-               float p1, p2;
-               float m;
-
-               f1 = 1;
-               p1 = 1;
-               snd2 = string_null;
-               f2 = 0;
-               p2 = 1;
-
-               m = e.note % Tuba_PitchStep;
-               if(m)
-               {
-                       if(e.note - m < TUBA_MIN)
-                       {
-                               if(restart)
+       string snd1 = string_null;
+       if (Tuba_PitchStep) {
+               float vol1 = 1;
+               float speed1 = 1;
+               string snd2 = string_null;
+               float vol2 = 0;
+               float speed2 = 1;
+
+               int m = pymod(e.note, Tuba_PitchStep);
+               if (m) {
+                       if (e.note - m < TUBA_MIN) {
+                               if (restart) {
                                        snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m + Tuba_PitchStep);
-                               p1 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
-                       }
-                       else if(e.note - m + Tuba_PitchStep > TUBA_MAX)
-                       {
-                               if(restart)
+                               }
+                               speed1 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
+                       } else if (e.note - m + Tuba_PitchStep > TUBA_MAX) {
+                               if (restart) {
                                        snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m);
-                               p1 = pow(2.0, m / 12.0);
-                       }
-                       else
-                       {
-                               if(restart)
+                               }
+                               speed1 = pow(2.0, m / 12.0);
+                       } else {
+                               if (restart) {
                                        snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m);
-                               f1 = cos(M_PI_2 * m / Tuba_PitchStep);
-                               p1 = pow(2.0, m / 12.0);
-                               if(restart)
+                               }
+                               vol1 = cos(M_PI_2 * m / Tuba_PitchStep);
+                               speed1 = pow(2.0, m / 12.0);
+                               if (restart) {
                                        snd2 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m + Tuba_PitchStep);
-                               f2 = sin(M_PI_2 * m / Tuba_PitchStep);
-                               p2 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
+                               }
+                               vol2 = sin(M_PI_2 * m / Tuba_PitchStep);
+                               speed2 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
                        }
-               }
-               else
-               {
-                       if(restart)
-                               snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
+               } else if (restart) {
+                       snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
                }
 
-               sound7(e, CH_TUBA_SINGLE, snd1, e.cnt * f1, e.attenuate * autocvar_g_balance_tuba_attenuation, 100 * p1, 0);
-               if(f2)
-                       sound7(e.enemy, CH_TUBA_SINGLE, snd2, e.cnt * f2, e.attenuate * autocvar_g_balance_tuba_attenuation, 100 * p2, 0);
-       }
-       else
-       {
-               if(restart)
+               sound7(e, CH_TUBA_SINGLE, snd1, e.tuba_volume * vol1, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation, 100 * speed1, 0);
+               if (vol2) {
+                       sound7(e.enemy, CH_TUBA_SINGLE, snd2, e.tuba_volume * vol2, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation, 100 * speed2, 0);
+               }
+       } else {
+               if (restart) {
                        snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
-               sound(e, CH_TUBA_SINGLE, snd1, e.cnt, e.attenuate * autocvar_g_balance_tuba_attenuation);
+               }
+               sound(e, CH_TUBA_SINGLE, snd1, e.tuba_volume, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation);
        }
 }
 
 void Ent_TubaNote_Think()
 {
-       float f;
-       f = autocvar_g_balance_tuba_fadetime;
-       if(f > 0)
-               self.cnt -= frametime * self.count / f;
-       else
-               self.cnt = 0;
+       float f = autocvar_g_balance_tuba_fadetime;
+       if (f > 0) {
+               self.tuba_volume -= frametime * self.tuba_volume_initial / f;
+       } else {
+               self.tuba_volume = 0;
+       }
        self.nextthink = time;
-       if(self.cnt <= 0)
-       {
+       if (self.tuba_volume <= 0) {
                sound(self, CH_TUBA_SINGLE, "misc/null.wav", 0, 0);
-               if(self.enemy)
-               {
+               if (self.enemy) {
                        sound(self.enemy, CH_TUBA_SINGLE, "misc/null.wav", 0, 0);
                        remove(self.enemy);
                }
                remove(self);
-       }
-       else
-       {
+       } else {
                tubasound(self, 0);
        }
 }
 
 void Ent_TubaNote_UpdateSound()
 {
-       self.enemy.cnt = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
-       self.enemy.count = self.enemy.cnt;
+       self.enemy.tuba_volume = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
+       self.enemy.tuba_volume_initial = self.enemy.tuba_volume;
        self.enemy.note = self.note;
        self.enemy.tuba_instrument = self.tuba_instrument;
        tubasound(self.enemy, 1);
@@ -104,57 +100,47 @@ void Ent_TubaNote_StopSound()
        self.enemy = world;
 }
 
-void Ent_TubaNote(float bIsNew)
+void Ent_TubaNote(bool isNew)
 {
-    int f, n, i;
-       float att, upd;
-       f = ReadByte();
-
-       upd = 0;
-
-       if(f & 1)
-       {
-               n = ReadChar();
-               i = ReadByte();
-               att = (i & 1);
-               i = floor(i / 2);
-
-               if(n != self.note || i != self.tuba_instrument || bIsNew)
-               {
-                       if(self.enemy)
+       bool upd = false;
+       int f = ReadByte();
+       if (f & 1) {
+               int n = ReadChar();
+               int i = ReadByte();
+               bool att = (i & 1);
+               i >>= 1;
+
+               if (self.enemy) {
+                       if (n != self.note || i != self.tuba_instrument || isNew) {
                                Ent_TubaNote_StopSound();
-               }
-
-               if(!self.enemy)
-               {
+                       }
+               } else {
                        self.enemy = spawn();
                        self.enemy.classname = "tuba_note";
-                       if(Tuba_PitchStep)
-                       {
+                       if (Tuba_PitchStep) {
                                self.enemy.enemy = spawn();
                                self.enemy.enemy.classname = "tuba_note_2";
                        }
-                       bIsNew = true;
+                       isNew = true;
                }
 
-               self.enemy.attenuate = att;
+               self.enemy.tuba_attenuate = att;
 
-               if(bIsNew)
-               {
+               if (isNew) {
                        self.note = n;
                        self.tuba_instrument = i;
-                       upd = 1;
+                       upd = true;
                }
        }
 
-       if(f & 2)
-       {
+       if (f & 2) {
                self.enemy.origin_x = ReadCoord();
                self.enemy.origin_y = ReadCoord();
                self.enemy.origin_z = ReadCoord();
                setorigin(self.enemy, self.enemy.origin);
-               if(self.enemy.enemy)
+               if (self.enemy.enemy) {
                        setorigin(self.enemy.enemy, self.enemy.origin);
+               }
        }
 
        self.think = Ent_TubaNote_StopSound;
@@ -162,29 +148,25 @@ void Ent_TubaNote(float bIsNew)
        self.enemy.think = Ent_TubaNote_Think;
        self.enemy.nextthink = time + 10;
 
-       if(upd)
+       if (upd) {
                Ent_TubaNote_UpdateSound();
+       }
 }
 
 void Tuba_Precache()
 {
-       float i;
-    int n;
        Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
-       if(Tuba_PitchStep)
-       {
-               if(!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7"))
-               {
+       if (Tuba_PitchStep) {
+               if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
                        print("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
                        Tuba_PitchStep = 0;
                }
        }
-       for(n = TUBA_MIN; n <= TUBA_MAX; ++n)
-       {
-               if(!Tuba_PitchStep || ((n % Tuba_PitchStep) == 0))
-               {
-                       for(i = 0; i < TUBA_INSTRUMENTS; ++i)
+       for (int n = TUBA_MIN; n <= TUBA_MAX; ++n) {
+               if (!Tuba_PitchStep || pymod(n, Tuba_PitchStep) == 0) {
+                       for (int i = 0; i < TUBA_INSTRUMENTS; ++i) {
                                precache_sound(TUBA_STARTNOTE(i, n));
+                       }
                }
        }
 }
index 81517b4e41bd7a452e0bb0360215ce17f41fdf9f..bdc1386eab666e352dd4d1ed9413a5d5fe237de3 100644 (file)
@@ -1,28 +1,5 @@
 #ifndef TUBA_H
 #define TUBA_H
-
-const float TUBA_MIN = -18;
-const float TUBA_MAX =  27;
-const float TUBA_INSTRUMENTS = 3;
-
-#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
-.int note; // note
-.float attenuate; // if set, attenuate it
-.float cnt; // current volume
-.float count; // initial volume
-.float tuba_instrument;
-
-int Tuba_PitchStep;
-
-void tubasound(entity e, float restart);
-
-void Ent_TubaNote_Think();
-
-void Ent_TubaNote_UpdateSound();
-
-void Ent_TubaNote_StopSound();
-
-void Ent_TubaNote(float bIsNew);
-
+void Ent_TubaNote(bool isNew);
 void Tuba_Precache();
 #endif
index 366f35ed6eddde8c36e5fb5d23b009d5a5897c0f..c3f15d1937e4963b06a1f6343c0d896c6ac44ce4 100644 (file)
@@ -1287,11 +1287,11 @@ float MapInfo_CheckMap(string s) // returns 0 if the map can't be played with th
        return r;
 }
 
-void MapInfo_SwitchGameType(float t)
+void MapInfo_SwitchGameType(int t)
 {
-       entity e;
-       for(e = MapInfo_Type_first; e; e = e.enemy)
+       for (entity e = MapInfo_Type_first; e; e = e.enemy) {
                cvar_set(e.netname, (t == e.items) ? "1" : "0");
+       }
 }
 
 void MapInfo_LoadMap(string s, float reinit)
index 6083350fa92028cf2be820c251875847a0927e9e..54255ec8d2aa153abfb6da7242d08b3635c40423 100644 (file)
@@ -152,7 +152,7 @@ float MapInfo_Type_FromString(string t);
 string MapInfo_Type_Description(float t);
 string MapInfo_Type_ToString(float t);
 string MapInfo_Type_ToText(float t);
-void MapInfo_SwitchGameType(float t);
+void MapInfo_SwitchGameType(int t);
 
 // to be called from worldspawn to set up cvars
 void MapInfo_LoadMapSettings(string s);
index 6f820c729f11af7ae494db7968b7bf7bc76b6f52..4effe6492446b65192b91d838bebd11da4828c1b 100644 (file)
@@ -1420,6 +1420,12 @@ void(float fh, entity e) writetofile = #606;
 float(string s) isfunction = #607;
 void(entity e, string s) parseentitydata = #608;
 
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
+
 // assorted builtins
 //const int STAT_MOVEVARS_TICRATE              = 240;
 //const int STAT_MOVEVARS_TIMESCALE            = 241;
index 26d351a209b80518c6295cc41b2d3d33ddee60ad..109e9195bb03cda7212ef627a29fbe8cd5785e4c 100644 (file)
@@ -437,7 +437,7 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach
 //darkplaces implementation: Blub\0
 //cvar definitions:
 //   utf8_enable: enable utf8 encoding
-//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc.,
+//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc., 
 //and count as 1 char for string functions like strlen, substring, etc.
 // note: utf8_enable is run-time cvar, could be changed during execution
 // note: beware that str2chr() could return value bigger than 255 once utf8 is enabled
@@ -499,7 +499,7 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach
 // description: allows alternative 'static' lightstyle syntax : "=value"
 // examples: "=0.5", "=2.0", "=2.75"
 // could be used to control switchable lights or making styled lights with brightness > 2
-// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact
+// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact 
 // that other engines (which do not support this extension) could connect to a game and misunderstand this kind of lightstyle syntax
 
 //DP_LITSPRITES
@@ -1359,14 +1359,14 @@ float(string sample) soundlength = #534; // returns length of sound sample in se
 //syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens:
 //   <start> <end> "string"
 //   start: subtitle start time in seconds
-//     end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started,
+//     end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started, 
 //          if below 0 - show until next subtitles minus this number of seconds
 //    text: subtitle text, color codes (Q3-style and ^xRGB) are allowed
 //example of subtitle file:
 //   3 0       "Vengeance! Vengeance for my eternity of suffering!"
 //   9 0       "Whelp! As if you knew what eternity was!"
 //   13        0       "Grovel before your true master."
-//   17        0       "Never!"
+//   17        0       "Never!" 
 //   18        7       "I'll hack you from crotch to gizzard and feed what's left of you to your brides..."
 
 //DP_SOLIDCORPSE
@@ -1733,11 +1733,11 @@ const float FORCETYPE_TORQUE = 3;
 .vector massofs;      // offsets a mass center out of object center, if not set a center of model bounds is used
 .float  friction;     // a friction of object, get multiplied by second objects's friction on contact
 .float  bouncefactor;
-.float  bouncestop;
+.float  bouncestop; 
 .float  jointtype;    // type of joint
 .float  forcetype;    // type of force
-.float  erp;          // error restitution parameter, makes ODE solver attempt to fix errors in contacts,
-                      // bringing together 2 joints or fixing object being stuch in other object,
+.float  erp;          // error restitution parameter, makes ODE solver attempt to fix errors in contacts, 
+                      // bringing together 2 joints or fixing object being stuch in other object, 
                                  // a value of 0.1 will fix slightly, a value of 1.0 attempts to fix whole error in one frame
                                  // use with care as high values makes system unstable and likely to explode
 //builtin definitions:
@@ -2536,7 +2536,11 @@ void(float pause) setpause = #531;
 //
 //Note: it is worth considering that network-related functions may be called during the pause (including customizeentityforclient for example), and it is also important to consider the continued use of the KRIMZON_SV_PARSECLIENTCOMMAND extension while paused (chatting players, etc), players may also join/leave during the pause.  In other words, the only things that are not called are think and other time-related functions.
 
-
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
 
 
 // EXPERIMENTAL (not finalized) EXTENSIONS:
@@ -2545,9 +2549,10 @@ void(float pause) setpause = #531;
 //idea: divVerent
 //darkplaces implementation: divVerent
 //field definitions: (SVQC)
-.string crypto_keyfp; // fingerprint of CA key the player used to authenticate, or string_null if not verified
-.string crypto_mykeyfp; // fingerprint of CA key the server used to authenticate to the player, or string_null if not verified
+.string crypto_keyfp; // fingerprint of CA key the player used to authenticate
+.string crypto_mykeyfp; // fingerprint of CA key the server used to authenticate to the player
 .string crypto_idfp; // fingerprint of ID used by the player entity, or string_null if not identified
+.float crypto_idfp_signed; // set if the player's ID has been signed
 .string crypto_encryptmethod; // the string "AES128" if encrypting, and string_null if plaintext
 .string crypto_signmethod; // the string "HMAC-SHA256" if signing, and string_null if plaintext
 // there is no field crypto_myidfp, as that info contains no additional information the QC may have a use for
index 83cb073a3e872e161e1ce4b3badd92e9a7fffe47..853fa25f21cbd2be4bdb80f9fe3af24618911b79 100644 (file)
@@ -297,7 +297,7 @@ float       drawstring(vector position, string text, vector scale, vector rgb, float a
 float  drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #467;
 
 vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #467;
-
 float  drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456;
 
 float  drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457;
@@ -347,6 +347,7 @@ float(string key) stringtokeynum = #341;
 //field definitions: (MENUQC)
 string(string serveraddress) crypto_getkeyfp = #633; // retrieves the cached host key's CA fingerprint of a server given by IP address
 string(string serveraddress) crypto_getidfp = #634; // retrieves the cached host key fingerprint of a server given by IP address
+float(string serveraddress) crypto_getidstatus = #643; // retrieves the cached host key's key status. See below for CRYPTO_IDSTATUS_ defines.
 string(string serveraddress) crypto_getencryptlevel = #635; // 0 if never encrypting, 1 supported, 2 requested, 3 required, appended by list of allowed methods in order of preference ("AES128"), preceded by a space each
 string(float i) crypto_getmykeyfp = #636; // retrieves the CA key fingerprint of a given CA slot, or "" if slot is unused but more to come, or string_null if end of list
 string(float i) crypto_getmyidfp = #637; // retrieves the ID fingerprint of a given CA slot, or "" if slot is unused but more to come, or string_null if end of list
@@ -524,6 +525,12 @@ float FIELD_FUNCTION = 6;
 //getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned.
 //putentityfieldstring puts the data returned by getentityfieldstring back into the entity.
 
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
+
 // assorted undocumented extensions
 string(string, float) netaddress_resolve = #625;
 string(string search, string replace, string subject) strreplace = #484;
index bff21707906c9919927ce8557a5934aacbaa4bff..3ef656744568ad3b0ebfd25768e5acf3267fbfe5 100644 (file)
@@ -150,22 +150,11 @@ void ModalController_draw(entity me)
                if(e.ModalController_state)
                {
                        if(front)
-                       {
                                me.switchState(me, front, 2, 0);
-                               if(front.ModalController_factor < 1)
-                                       animating = 1;
-                       }
                        front = e;
                }
        if(front)
-       {
                me.switchState(me, front, 1, 0);
-               if(front.ModalController_factor < 1)
-                       animating = 1;
-       }
-
-       if(front && front.Container_alpha == front.ModalController_initialAlpha)
-               goto update_done; // update isn't needed, everything stay as is
 
        df = frametime * 3; // animation speed
 
@@ -209,6 +198,7 @@ void ModalController_draw(entity me)
                                me.setAlphaOf(me, e, e.Container_alpha  * prevFactor);
                        else
                        {
+                               animating = 1;
                                targetFactor = df / (1 - f + df);
 
                                if(e.ModalController_state == 1)
@@ -234,7 +224,6 @@ void ModalController_draw(entity me)
                        e.Container_fontscale_y = fs.y * e.ModalController_initialFontScale.y;
                }
        }
-       :update_done
 
        if(animating || !me.focused)
                me.setFocus(me, NULL);
index 04c67e727b088b30a15cfbcc09f8d562ad3621e4..4e76cbc6d3a5095560d41dd71da3bbb969476678 100644 (file)
@@ -187,6 +187,7 @@ void XonoticServerCreateTab_gameTypeChangeNotify(entity me)
                case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, _("Point limit:"),    50,  500, 10, "");                         break;
                case MAPINFO_TYPE_CTS:        GameType_ConfigureSliders(e, l, _("Point limit:"),    50,  500, 10, "");                         break;
                case MAPINFO_TYPE_INVASION:   GameType_ConfigureSliders(e, l, _("Point limit:"),     5,    0,  5, "");                         break;
+       case MAPINFO_TYPE_TEAM_DEATHMATCH:GameType_ConfigureSliders(e, l, _("Point limit:"),     5,  100,  5, "g_tdm_point_limit");        break;
                default:                      GameType_ConfigureSliders(e, l, _("Frag limit:"),      5,  100,  5, "fraglimit_override");       break;
        }
 
index feb1d89b133d2b4e040db7bd42d2828c500fc89f..0d36c836340f7b463d2c0af41c9197990ec67619 100644 (file)
@@ -31,12 +31,11 @@ entity makeXonoticGametypeList(void)
 }
 void XonoticGametypeList_configureXonoticGametypeList(entity me)
 {
-       float i;
        me.configureXonoticListBox(me);
        me.nItems = GameType_GetCount();
 
        // we want the pics mipmapped
-       for(i = 0; i < GameType_GetCount(); ++i)
+       for(int i = 0; i < GameType_GetCount(); ++i)
                draw_PreloadPictureWithFlags(GameType_GetIcon(i), PRECACHE_PIC_MIPMAP);
 
        me.loadCvars(me);
@@ -67,12 +66,15 @@ void XonoticGametypeList_loadCvars(entity me)
 }
 void XonoticGametypeList_saveCvars(entity me)
 {
-       float t;
-       t = GameType_GetID(me.selectedItem);
-       if(t == MapInfo_CurrentGametype())
+       int t = GameType_GetID(me.selectedItem);
+       if (t == MapInfo_CurrentGametype()) {
                return;
+       }
        MapInfo_SwitchGameType(t);
-       me.parent.gameTypeChangeNotify(me.parent);
+       entity owner = me.parent;
+       if (owner) { // not set immediately
+               owner.gameTypeChangeNotify(owner);
+       }
 }
 void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {
index 0846526d0c66283fd46e94f0624414c0cec6d103..330b2bb726a0e89ccc19822ee8c8af0182b82e0e 100644 (file)
@@ -665,12 +665,11 @@ float updateCompression()
        //GAMETYPE(MAPINFO_TYPE_INVASION) \
        /* nothing */
 
-float GameType_GetID(float cnt)
+int GameType_GetID(int cnt)
 {
-       float i;
-       i = 0;
+       int i = 0;
 
-       #define GAMETYPE(id) { if(i++ == cnt) return id; }
+       #define GAMETYPE(id) { if (i++ == cnt) return id; }
        GAMETYPES
        #undef GAMETYPE
 
@@ -679,10 +678,9 @@ float GameType_GetID(float cnt)
        return 0;
 }
 
-float GameType_GetCount()
+int GameType_GetCount()
 {
-       float i;
-       i = 0;
+       int i = 0;
 
        #define GAMETYPE(id) ++i;
        GAMETYPES
@@ -691,9 +689,9 @@ float GameType_GetCount()
        return i;
 }
 
-string GameType_GetName(float cnt)
+string GameType_GetName(int cnt)
 {
-       float i = GameType_GetID(cnt);
+       int i = GameType_GetID(cnt);
 
        if(i)
                return MapInfo_Type_ToText(i);
@@ -701,9 +699,9 @@ string GameType_GetName(float cnt)
        return "";
 }
 
-string GameType_GetIcon(float cnt)
+string GameType_GetIcon(int cnt)
 {
-       float i = GameType_GetID(cnt);
+       int i = GameType_GetID(cnt);
 
        if(i)
                return strcat("gametype_", MapInfo_Type_ToString(i));
index 64072977f60b7baa7b7de06b7b39f848e62756a1..80803f8544df735f4363112b466441da3ad34f35 100644 (file)
@@ -34,11 +34,11 @@ void URI_Get_Callback(float id, float status, string data);
 
 // game type list box stuff (does not NEED to contain all game types, other
 // types stay available via console)
-float GameType_GetID(float cnt);
-string GameType_GetName(float cnt);
-string GameType_GetIcon(float cnt);
+int GameType_GetID(int cnt);
+string GameType_GetName(int cnt);
+string GameType_GetIcon(int cnt);
 //string GameType_GetTeams(float cnt);
-float GameType_GetCount();
+int GameType_GetCount();
 
 void dialog_hudpanel_common_notoggle(entity me, string panelname);
 #define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \
index 89647d5be241eae4bb2d68944adea631942a16fc..405d558504a7399ae9b8d598049918cdb8a89a20 100644 (file)
@@ -1000,7 +1000,7 @@ float PlayerInIDList(entity p, string idlist)
        float n, i;
        string s;
 
-       // NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
+       // NOTE: we do NOT check crypto_idfp_signed here, an unsigned ID is fine too for this
        if (!p.crypto_idfp)
                return 0;
 
index bd9880839d69f33ab220fd54a40eed7f87281460..9591ee8baa9d9b7620d5b5fbe32f430a8e0a22cb 100644 (file)
@@ -361,7 +361,7 @@ float Ban_GetClientIP(entity client)
        float i1, i2, i3, i4;
        string s;
 
-       if(client.crypto_keyfp)
+       if(client.crypto_idfp_signed)
                ban_idfp = client.crypto_idfp;
        else
                ban_idfp = string_null;
index b948b203eeb36ac4a06d00b6a91ab038b6dc1be3..d86af8a00ec786760c15a9440b525a7160d4a0ab 100644 (file)
@@ -175,6 +175,20 @@ float tgamma(float x)
        return exp(v.x) * v.y;
 }
 
+/**
+ * Pythonic mod:
+ * TODO: %% operator?
+ *
+ *  1 %  2 ==  1
+ * -1 %  2 ==  1
+ *  1 % -2 == -1
+ * -1 % -2 == -1
+ */
+float pymod(float x, float y)
+{
+       return x - y * floor(x / y);
+}
+
 float nearbyint(float x)
 {
        return rint(x);
index 7eebd032c43d75c4d85f736518265115c34ef276..a37ba63de6c63b87ed3dad63d12ea1ad4637fe52 100644 (file)
@@ -60,6 +60,17 @@ float erfc(float x);
 vector lgamma(float x); // value in _x, sign in _y
 float tgamma(float x);
 
+/**
+ * Pythonic mod:
+ * TODO: %% operator?
+ *
+ *  1 %  2 ==  1
+ * -1 %  2 ==  1
+ *  1 % -2 == -1
+ * -1 % -2 == -1
+ */
+float pymod(float x, float y);
+
 //float ceil(float x);
 //float floor(float x);
 float nearbyint(float x);
index 6808bae3ab29e1de24a11447bd2320a8ff6e3a1b..503c23979284e6f796268c6dfbed02b885eec214 100644 (file)
@@ -20,6 +20,7 @@ Jan "zykure" Behrens
 JH0nny
 Łukasz "kuniu the frogg" Polek
 Matthias "matthiaskrgr" Krüger
+Mattia "Melanosuchus" Basaglia
 MrBougo
 Nick "bitbomb" Lucca
 nilyt/nyov
@@ -124,7 +125,6 @@ Dale "graphitemaster" Weiler
 **Other Active Contributors
 Erik "Ablu" Schilling
 Jope "Sless" Withers
-Mattia "Melanosuchus" Basaglia
 Mircea "Taoki" Kitsune
 Robert "ai" Kuroto
 
@@ -144,6 +144,7 @@ set_killer
 
 *Czech
 shogun assassin/woky
+Tomáš "CZHeron" Volavka
 
 *Dutch
 Alexander "freefang" van Dam
@@ -192,6 +193,7 @@ XCostaX
 
 *Polish
 4m
+Alex "tiprogrammierer.alex" Progger
 Amadeusz "amade/proraide" Sławiński
 
 *Portuguese
@@ -201,6 +203,7 @@ xXxCHAOTICxXx
 *Romanian
 BusterDBK
 Mircea "Taoki" Kitsune
+Tudor "TropiKo" Ionel
 
 *Russian
 Alex "alextalker7" Talker