]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/weaponarena_available
authorMario <mario@smbclan.net>
Sun, 11 Aug 2019 11:32:33 +0000 (21:32 +1000)
committerMario <mario@smbclan.net>
Sun, 11 Aug 2019 11:32:33 +0000 (21:32 +1000)
1  2 
qcsrc/server/miscfunctions.qc
xonotic-server.cfg

index aa5146419a0be981ff96246e70112d3dc47f83fc,167a75ae2c371ad5e833099cc962ada6889affac..cdf3371ae96bdaadd7885d64710f11e71844cbef
@@@ -499,7 -499,7 +499,7 @@@ float want_weapon(entity weaponinfo, fl
        allow_mutatorblocked = M_ARGV(3, bool);
  
        if(allguns)
-               d = boolean(weaponinfo.spawnflags & WEP_FLAG_NORMAL);
+               d = boolean((weaponinfo.spawnflags & WEP_FLAG_NORMAL) && !(weaponinfo.spawnflags & WEP_FLAG_HIDDEN));
        else if(!mutator_returnvalue)
                d = !(!weaponinfo.weaponstart);
  
        return t;
  }
  
 +void weaponarena_available_update(entity this)
 +{
 +      if(!weaponsInMap)
 +      {
 +              // if no weapons are available, just fall back to most weapons arena
 +              FOREACH(Weapons, it != WEP_Null, {
 +                      if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_FLAG_NORMAL) && !(it.spawnflags & WEP_FLAG_HIDDEN))
 +                              g_weaponarena_weapons |= (it.m_wepset);
 +              });
 +              start_weapons = g_weaponarena_weapons;
 +              return;
 +      }
 +      g_weaponarena_weapons |= weaponsInMap;
 +      start_weapons = g_weaponarena_weapons;
 +}
 +
  void readplayerstartcvars()
  {
        float i, t;
                                g_weaponarena_weapons |= (it.m_wepset);
                });
        }
 +      else if (s == "available")
 +      {
 +              g_weaponarena = 2;
 +              g_weaponarena_list = "Most Weapons";
 +              // include weapons the player would start with
 +              FOREACH(Weapons, it != WEP_Null, {
 +                      int w = want_weapon(it, false);
 +                      if(w & 1)
 +                              g_weaponarena_weapons |= (it.m_wepset);
 +              });
 +              InitializeEntity(NULL, weaponarena_available_update, INITPRIO_FINDTARGET);
 +      }
        else if (s == "none")
        {
                g_weaponarena = 1;
diff --combined xonotic-server.cfg
index 1908caab67bc3050d816f78fac8460bb29126e84,d261e262eab2a9351d4542b7969afa1fbd72f680..993d77e4de5d2af8b2e6d202583dac17172ef3ba
@@@ -2,7 -2,7 +2,7 @@@
  // note that it doesn't reset all server cvars,
  // some are shared with the client and so are left in xonotic-common.cfg
  
- set name_maxlength 64 "max player name length (not counting color codes) allowed by the server"
+ set sv_name_maxlength 64 "max player name length (not counting color codes) allowed by the server"
  
  // taunts and voices
  set sv_taunt 1 "allow taunts on the server"
@@@ -195,7 -195,7 +195,7 @@@ set g_pickup_items -1 "if set to 0 all 
  set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"
  set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening"
  set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly"
 -set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
 +set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\" or \"available\""
  set g_weaponarena_random "0"  "if set to a number, only that weapon count is given on every spawn (randomly)"
  set g_weaponarena_random_with_blaster "1"     "additionally, always provide the blaster in random weapon arena games"
  set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid"
@@@ -222,6 -222,7 +222,7 @@@ set g_grab_range 200 "distance at whic
  set g_cloaked 0 "display all players mostly invisible"
  set g_player_alpha 1 "default opacity of players"
  set g_player_brightness 0     "set to 2 for brighter players"
+ set g_player_damageforcescale 2 "push multiplier of attacks against players"
  set g_balance_cloaked_alpha 0.25 "opacity of cloaked players"
  
  set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"