]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qh
Transifex autosync
[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
6 void ka_Handler_CheckBall(entity this);
7
8 IntrusiveList g_kaballs;
9 REGISTER_MUTATOR(ka, false)
10 {
11         MUTATOR_STATIC();
12         MUTATOR_ONADD
13         {
14                 GameRules_scoring(0, SFL_SORT_PRIO_PRIMARY, 0, {
15                         field(SP_KEEPAWAY_PICKUPS, "pickups", 0);
16                         field(SP_KEEPAWAY_CARRIERKILLS, "bckills", 0);
17                         field(SP_KEEPAWAY_BCTIME, "bctime", SFL_SORT_PRIO_SECONDARY);
18                 });
19
20                 g_kaballs = IL_NEW();
21                 entity ka_Handler = new_pure(ka_Handler);
22                 setthink(ka_Handler, ka_Handler_CheckBall);
23                 InitializeEntity(ka_Handler, ka_Handler_CheckBall, INITPRIO_SETLOCATION);
24         }
25         return false;
26 }
27
28 const int KA_BALL_COUNT = 1;
29
30 void(entity this) havocbot_role_ka_carrier;
31 void(entity this) havocbot_role_ka_collector;
32
33 void ka_DamageEvent(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
34
35 void ka_TouchEvent(entity this, entity toucher);
36
37 void ka_DropEvent(entity plyr);