]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
keepaway: Make ball wait configurable
authorz411 <z411@omaera.org>
Sun, 28 Nov 2021 02:57:27 +0000 (23:57 -0300)
committerz411 <z411@omaera.org>
Sun, 28 Nov 2021 02:57:27 +0000 (23:57 -0300)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc

index 17b90c624fde8f8af9a50534ad5e69fae6e27ead..9257cd57d80f7dcb62b0596a3ff35f69902f7de6 100644 (file)
@@ -410,6 +410,7 @@ set g_keepawayball_effects 0 "Add together the numbers you want: EF_ADDITIVE (32
 set g_keepawayball_trail_color 254     "particle trail color from player/ball"
 set g_keepawayball_damageforcescale    3 "Scale of force which is applied to the ball by weapons/explosions/etc"
 set g_keepawayball_respawntime 10      "if no one picks up the ball, how long to wait until the ball respawns"
+set g_keepawayball_wait 1   "time until the ball can be picked up again after getting dropped"
 
 
 // ==========
index 5b40ed02ccba5ebad778c6ca86d5c102f40feb68..f7f8e104316c5bcf4d0464cf5552988410f0436c 100644 (file)
@@ -27,6 +27,7 @@ float autocvar_g_keepaway_score_timeinterval;
 float autocvar_g_keepawayball_damageforcescale;
 int autocvar_g_keepawayball_effects;
 float autocvar_g_keepawayball_respawntime;
+float autocvar_g_keepawayball_wait;
 int autocvar_g_keepawayball_trail_color;
 
 bool ka_ballcarrier_waypointsprite_visible_for_player(entity this, entity player, entity view) // runs on waypoints which are attached to ballcarriers, updates once per frame
@@ -179,7 +180,7 @@ void ka_DropEvent(entity player) // runs any time that a player is supposed to l
        // reset the ball
        setattachment(ball, NULL, "");
        set_movetype(ball, MOVETYPE_BOUNCE);
-       ball.wait = time + 1;
+       ball.wait = time + autocvar_g_keepawayball_wait;
        settouch(ball, ka_TouchEvent);
        setthink(ball, ka_RespawnBall);
        ball.nextthink = time + autocvar_g_keepawayball_respawntime;