From: Martin Taibr Date: Thu, 24 Aug 2017 17:03:50 +0000 (+0200) Subject: make it easier to imagine X-Git-Tag: xonotic-v0.8.5~2497^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=29eae05bde2bd8bfd4c36e619ed8852e5f9a22c8;p=xonotic%2Fxonotic-data.pk3dir.git make it easier to imagine --- diff --git a/defaultServer.cfg b/defaultServer.cfg index 3f746db7e..52b3b0692 100644 --- a/defaultServer.cfg +++ b/defaultServer.cfg @@ -185,9 +185,9 @@ set g_weapon_throwable 1 "if set to 1, weapons can be dropped" set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default" set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition" set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn" -set g_pickup_respawntime_scaling_a 0 "Scale respawn time according to a*rt / (p+b) + c*rt where rt is normal respawn time and p number of players" -set g_pickup_respawntime_scaling_b 0 "Scale respawn time according to a*rt / (p+b) + c*rt where rt is normal respawn time and p number of players" -set g_pickup_respawntime_scaling_c 1 "Scale respawn time according to a*rt / (p+b) + c*rt where rt is normal respawn time and p number of players" +set g_pickup_respawntime_scaling_a 0 "Multiply respawn time by `a / (p+b) + c` where `p` is the current number of players, takes effect with 2 or more players present" +set g_pickup_respawntime_scaling_b 0 "Multiply respawn time by `a / (p+b) + c` where `p` is the current number of players, takes effect with 2 or more players present" +set g_pickup_respawntime_scaling_c 1 "Multiply respawn time by `a / (p+b) + c` where `p` is the current number of players, takes effect with 2 or more players present" set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\"" 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" diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index c19f303a6..3b264479a 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -631,9 +631,9 @@ void Item_ScheduleRespawnIn(entity e, float t) } } -AUTOCVAR(g_pickup_respawntime_scaling_a, float, 0.0, "Scale respawn time according to a*rt / (p+b) + c*rt where rt is normal respawn time and p number of players"); -AUTOCVAR(g_pickup_respawntime_scaling_b, float, 0.0, "Scale respawn time according to a*rt / (p+b) + c*rt where rt is normal respawn time and p number of players"); -AUTOCVAR(g_pickup_respawntime_scaling_c, float, 1.0, "Scale respawn time according to a*rt / (p+b) + c*rt where rt is normal respawn time and p number of players"); +AUTOCVAR(g_pickup_respawntime_scaling_a, float, 0.0, "Multiply respawn time by `a / (p+b) + c` where `p` is the current number of players, takes effect with 2 or more players present"); +AUTOCVAR(g_pickup_respawntime_scaling_b, float, 0.0, "Multiply respawn time by `a / (p+b) + c` where `p` is the current number of players, takes effect with 2 or more players present"); +AUTOCVAR(g_pickup_respawntime_scaling_c, float, 1.0, "Multiply respawn time by `a / (p+b) + c` where `p` is the current number of players, takes effect with 2 or more players present"); void Item_ScheduleRespawn(entity e) { if(e.respawntime > 0) @@ -652,7 +652,7 @@ void Item_ScheduleRespawn(entity e) float a = autocvar_g_pickup_respawntime_scaling_a; float b = autocvar_g_pickup_respawntime_scaling_b; float c = autocvar_g_pickup_respawntime_scaling_c; - adjusted_respawntime = a * e.respawntime / (players + b) + c * e.respawntime; + adjusted_respawntime = e.respawntime * (a / (players + b) + c); } else { adjusted_respawntime = e.respawntime; }