]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/assault/sv_assault.qh
Use the weapon entity as a parameter to ATTACK_FINISHED instead of the slot number...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / assault / sv_assault.qh
1 #pragma once
2
3 #include <common/mutators/base.qh>
4 #include <common/scores.qh>
5
6 const int ASSAULT_VALUE_INACTIVE = 1000;
7
8 const int ST_ASSAULT_OBJECTIVES = 1;
9
10 REGISTER_MUTATOR(as, false)
11 {
12     MUTATOR_STATIC();
13         MUTATOR_ONADD
14         {
15         GameRules_teams(true);
16         int teams = BITS(2); // always red vs blue
17         GameRules_scoring(teams, SFL_SORT_PRIO_SECONDARY, SFL_SORT_PRIO_SECONDARY, {
18             field_team(ST_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
19             field(SP_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
20         });
21         }
22         return 0;
23 }
24
25 // sprites
26 .entity assault_decreaser;
27 .entity assault_sprite;
28
29 // legacy bot defs
30 const int HAVOCBOT_AST_ROLE_NONE = 0;
31 const int HAVOCBOT_AST_ROLE_DEFENSE = 2;
32 const int HAVOCBOT_AST_ROLE_OFFENSE = 4;
33
34 .float havocbot_attack_time;
35
36 void(entity this) havocbot_role_ast_defense;
37 void(entity this) havocbot_role_ast_offense;
38
39 void(entity bot) havocbot_ast_reset_role;
40
41 void(entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_items;
42 void(entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplayers;
43
44 // assault game mode: Which team is attacking in this round?
45 float assault_attacker_team;
46
47 // predefined spawnfuncs
48 void target_objective_decrease_activate(entity this);