]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qh
Domination: fix domination percentage on the HUD not reset for spectators when the...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / keepaway / sv_keepaway.qh
1 #pragma once
2
3 #include <common/mutators/base.qh>
4 #include <common/scores.qh>
5 void ka_Initialize();
6
7 IntrusiveList g_kaballs;
8 REGISTER_MUTATOR(ka, false)
9 {
10     MUTATOR_STATIC();
11         MUTATOR_ONADD
12         {
13             GameRules_scoring(0, SFL_SORT_PRIO_PRIMARY, 0, {
14             field(SP_KEEPAWAY_PICKUPS, "pickups", 0);
15             field(SP_KEEPAWAY_CARRIERKILLS, "bckills", 0);
16             field(SP_KEEPAWAY_BCTIME, "bctime", SFL_SORT_PRIO_SECONDARY);
17         });
18
19                 ka_Initialize();
20         }
21         return false;
22 }
23
24 const int KA_BALL_COUNT = 1;
25
26 entity ka_Handler;
27
28 void(entity this) havocbot_role_ka_carrier;
29 void(entity this) havocbot_role_ka_collector;
30
31 void ka_DamageEvent(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
32
33 void ka_TouchEvent(entity this, entity toucher);
34
35 void ka_DropEvent(entity plyr);