]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/mutator/gamemode_assault.qh
Fix compilation unit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_assault.qh
1 #pragma once
2
3 #include "../gamemode.qh"
4
5 const int ASSAULT_VALUE_INACTIVE = 1000;
6
7 const int ST_ASSAULT_OBJECTIVES = 1;
8
9 REGISTER_MUTATOR(as, false)
10 {
11     MUTATOR_STATIC();
12         MUTATOR_ONADD
13         {
14         GameRules_teams(true);
15         int teams = BITS(2); // always red vs blue
16         GameRules_scoring(teams, SFL_SORT_PRIO_SECONDARY, SFL_SORT_PRIO_SECONDARY, {
17             field_team(ST_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
18             field(SP_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
19         });
20         }
21         return 0;
22 }
23
24 // sprites
25 .entity assault_decreaser;
26 .entity assault_sprite;
27
28 // legacy bot defs
29 const int HAVOCBOT_AST_ROLE_NONE = 0;
30 const int HAVOCBOT_AST_ROLE_DEFENSE = 2;
31 const int HAVOCBOT_AST_ROLE_OFFENSE = 4;
32
33 .int havocbot_role_flags;
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 // predefined spawnfuncs
45 void target_objective_decrease_activate(entity this);