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