]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
make the shooting star death available outside of debug
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index 45320f2db526f0303cb0f3e9d8aed3181e78c9e7..a79f9a473b0638911a9918f2ec78513eab9a0cca 100644 (file)
@@ -2,7 +2,7 @@
 void CreatureFrame (void)
 {
        local entity oldself;
-       local float dm;
+       local float dm, maxspeed;
        oldself = self;
        self = findfloat(world, iscreature, TRUE);
        while (self)
@@ -78,13 +78,12 @@ void CreatureFrame (void)
                                {
                                        Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');
                                }
-                               else if(vlen(self.velocity) > 100000 && cvar("developer"))
-                               {
-                                       dprint(strcat(self.netname, " became too fast, please investigate: ", vtos(self.spawnorigin), "\n"));
-                                       Damage (self, world, world, 50000, DEATH_SHOOTING_STAR, self.origin, '0 0 0');
-                               }
                        }
 
+                       maxspeed = cvar("g_maxspeed");
+                       if(maxspeed > 0 && vlen(self.velocity) > maxspeed)
+                               Damage (self, world, world, 100000, DEATH_SHOOTING_STAR, self.origin, '0 0 0');
+
                        // play stupid sounds
                        if (g_footsteps)
                        if (!gameover)