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