]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/gamemode_deathmatch.qc
Merge branch 'terencehill/menu_weaponarena_selection_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_deathmatch.qc
1 MUTATOR_HOOKFUNCTION(dm_CountFrags)
2 {
3         // announce remaining frags
4         return true;
5 }
6
7 MUTATOR_DEFINITION(gamemode_deathmatch)
8 {
9         MUTATOR_HOOK(Scores_CountFragsRemaining, dm_CountFrags, CBC_ORDER_ANY);
10
11         MUTATOR_ONADD
12         {
13                 if(time > 1) // game loads at time 1
14                         error("This is a game type and it cannot be added at runtime.");
15         }
16
17         MUTATOR_ONROLLBACK_OR_REMOVE
18         {
19                 // we actually cannot roll back dm_Initialize here
20                 // BUT: we don't need to! If this gets called, adding always
21                 // succeeds.
22         }
23
24         MUTATOR_ONREMOVE
25         {
26                 print("This is a game type and it cannot be removed at runtime.");
27                 return -1;
28         }
29
30         return 0;
31 }