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