]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/assault/assault.qh
Merge branch 'master' into martin-t/defaults
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / assault / assault.qh
1 #pragma once
2
3 #ifdef SVQC
4 #include <common/mutators/base.qh>
5 #include <common/scores.qh>
6
7 const int ASSAULT_VALUE_INACTIVE = 1000;
8
9 const int ST_ASSAULT_OBJECTIVES = 1;
10
11 REGISTER_MUTATOR(as, false)
12 {
13     MUTATOR_STATIC();
14         MUTATOR_ONADD
15         {
16         GameRules_teams(true);
17         int teams = BITS(2); // always red vs blue
18         GameRules_scoring(teams, SFL_SORT_PRIO_SECONDARY, SFL_SORT_PRIO_SECONDARY, {
19             field_team(ST_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
20             field(SP_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
21         });
22         }
23         return 0;
24 }
25
26 // sprites
27 .entity assault_decreaser;
28 .entity assault_sprite;
29
30 // legacy bot defs
31 const int HAVOCBOT_AST_ROLE_NONE = 0;
32 const int HAVOCBOT_AST_ROLE_DEFENSE = 2;
33 const int HAVOCBOT_AST_ROLE_OFFENSE = 4;
34
35 .int havocbot_role_flags;
36 .float havocbot_attack_time;
37
38 void(entity this) havocbot_role_ast_defense;
39 void(entity this) havocbot_role_ast_offense;
40
41 void(entity bot) havocbot_ast_reset_role;
42
43 void(entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_items;
44 void(entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplayers;
45
46 // predefined spawnfuncs
47 void target_objective_decrease_activate(entity this);
48 #endif