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