]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/duel/sv_duel.qc
Add an option (enabled by default) to configure whether the duel gamemode has a warmup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / duel / sv_duel.qc
1 #include "sv_duel.qh"
2
3 MUTATOR_HOOKFUNCTION(duel, ReadLevelCvars)
4 {
5         if(autocvar_g_duel_warmup)
6                 warmup_stage = 1; // otherwise allow it if it's enabled
7         //sv_ready_restart_after_countdown = 0;
8 }
9
10 MUTATOR_HOOKFUNCTION(duel, GetPlayerLimit)
11 {
12         M_ARGV(0, int) = 2; // duel is always 1v1!
13 }
14
15 MUTATOR_HOOKFUNCTION(duel, Scores_CountFragsRemaining)
16 {
17         // announce remaining frags?
18         return true;
19 }
20
21 MUTATOR_HOOKFUNCTION(duel, FilterItemDefinition)
22 {
23         entity definition = M_ARGV(0, entity);
24
25         if(definition.instanceOfPowerup)
26         {
27                 return !autocvar_g_duel_with_powerups;
28         }
29
30         return false;
31 }