]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/gamemode_deathmatch.qc
Mapinfo: decentralise mapinfo parsing
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_deathmatch.qc
1 #include "gamemode.qh"
2
3 MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining)
4 {
5         // announce remaining frags
6         return true;
7 }
8
9 REGISTER_MUTATOR(dm, IS_GAMETYPE(DEATHMATCH))
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 }