From: Rudolf Polzer Date: Tue, 13 Jun 2023 13:25:21 +0000 (-0400) Subject: Add a cap to it, so your respawntime can never go below 20% default, and never above... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=27c93032ba1817e2a07bac43062d6a9103bfd708;p=xonotic%2Fxonotic-data.pk3dir.git Add a cap to it, so your respawntime can never go below 20% default, and never above 5x default. Should make the game bearable for everyone. --- diff --git a/qcsrc/common/mutators/mutator/killers_spawn_faster/sv_respawntime.qc b/qcsrc/common/mutators/mutator/killers_spawn_faster/sv_respawntime.qc index 0e158d250..10ec7e428 100644 --- a/qcsrc/common/mutators/mutator/killers_spawn_faster/sv_respawntime.qc +++ b/qcsrc/common/mutators/mutator/killers_spawn_faster/sv_respawntime.qc @@ -3,13 +3,15 @@ AUTOCVAR(g_killers_spawn_faster, bool, false, "Killers spawn faster: a mutator that penalizes dying, and rewards killing, by adjusting time to respawn"); AUTOCVAR(g_killers_spawn_faster_frag_modifier, float, -0.25, "Killers spawn faster: respawntime factor change when fragging someone"); AUTOCVAR(g_killers_spawn_faster_death_modifier, float, 0.5, "Killers spawn faster: respawntime factor change when dying"); +AUTOCVAR(g_killers_spawn_faster_min, float, 0.2, "Minimum factor the respawn time can be multiplied with"); +AUTOCVAR(g_killers_spawn_faster_max, float, 5.0, "Maximum factor the respawn time can be multiplied with"); REGISTER_MUTATOR(mutator_killers_spawn_faster, autocvar_g_killers_spawn_faster); float killers_spawn_faster_adjust(float base, float adj) { if (adj < 0) { adj *= base; } - return base + adj; + return bound(autocvar_g_killers_spawn_faster_min, base + adj, autocvar_g_killers_spawn_faster_max); } MUTATOR_HOOKFUNCTION(mutator_killers_spawn_faster, BuildMutatorsString) {