]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_assault.qh
Merge branch 'master' into Lyberta/RandomItems2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_assault.qh
index 0e279b8dc6254fa9d3b0122b0997db9d9a96471c..15d3a65ad18c2482c007a09612cd1b0dc7c307b0 100644 (file)
@@ -2,7 +2,9 @@
 
 #include "../gamemode.qh"
 
-void assault_ScoreRules();
+const int ASSAULT_VALUE_INACTIVE = 1000;
+
+const int ST_ASSAULT_OBJECTIVES = 1;
 
 REGISTER_MUTATOR(as, false)
 {
@@ -10,7 +12,11 @@ REGISTER_MUTATOR(as, false)
        MUTATOR_ONADD
        {
         GameRules_teams(true);
-               assault_ScoreRules();
+        int teams = BITS(2); // always red vs blue
+        GameRules_scoring(teams, SFL_SORT_PRIO_SECONDARY, SFL_SORT_PRIO_SECONDARY, {
+            field_team(ST_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
+            field(SP_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
+        });
        }
        return 0;
 }
@@ -27,9 +33,6 @@ const int HAVOCBOT_AST_ROLE_OFFENSE = 4;
 .int havocbot_role_flags;
 .float havocbot_attack_time;
 
-.void(entity this) havocbot_role;
-.void(entity this) havocbot_previous_role;
-
 void(entity this) havocbot_role_ast_defense;
 void(entity this) havocbot_role_ast_offense;
 
@@ -38,8 +41,5 @@ void(entity bot) havocbot_ast_reset_role;
 void(entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_items;
 void(entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplayers;
 
-// scoreboard stuff
-const float ST_ASSAULT_OBJECTIVES = 1;
-
 // predefined spawnfuncs
 void target_objective_decrease_activate(entity this);