]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/sv_rules.qh
Merge branch 'master' into martin-t/rpc-acc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / sv_rules.qh
index 588d8da70ba1bfa28c4d64190e150cb1077b5e91..979477cbafab6c676c4fdc7cabfeedf43134725b 100644 (file)
@@ -1,8 +1,17 @@
 #pragma once
 
+// TODO: find a better location for these?
+float total_players;
+float redalive, bluealive, yellowalive, pinkalive;
+
 // todo: accept the number of teams as a parameter
 void GameRules_teams(bool value);
 
+/**
+ * Used to disable team spawns in team modes
+ */
+void GameRules_spawning_teams(bool value);
+
 /**
  * Disabling score disables the "score" column on the scoreboard
  */
@@ -18,8 +27,6 @@ void GameRules_limit_time_qualifying(int limit);
  */
 void GameRules_limit_fallbacks();
 
-// derive score_enabled from !frags_enabled
-
 /**
  * @param teams a bitmask of active teams
  * @param spprio player score priority (if frags aren't enabled)
@@ -38,3 +45,16 @@ void _GameRules_scoring_begin(int teams, float spprio, float stprio);
 void _GameRules_scoring_field(entity i, string label, int scoreflags);
 void _GameRules_scoring_field_team(float i, string label, int scoreflags);
 void _GameRules_scoring_end();
+
+/**
+ * Mark a player as being 'important' (flag carrier, ball carrier, etc)
+ * @param player the entity to mark
+ * @param value VIP status
+ */
+void GameRules_scoring_vip(entity player, bool value);
+bool GameRules_scoring_is_vip(entity player);
+
+#define GameRules_scoring_add(client, fld, value) _GameRules_scoring_add(client, SP_##fld, value)
+float _GameRules_scoring_add(entity client, entity sp, float value);
+#define GameRules_scoring_add_team(client, fld, value) _GameRules_scoring_add_team(client, SP_##fld, ST_##fld, value)
+float _GameRules_scoring_add_team(entity client, entity sp, int st, float value);