]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qh
Add a gametype flag to indicate that a gametype shouldn't display standard score...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qh
index c5b9906c132ed6b154096e7ba031719847661a40..2d6681ec6ad531db85544a51b7186fe331dcec95 100644 (file)
@@ -20,6 +20,7 @@ const int GAMETYPE_FLAG_TEAMPLAY        = BIT(0); // teamplay based
 const int GAMETYPE_FLAG_USEPOINTS       = BIT(1); // gametype has point-based scoring
 const int GAMETYPE_FLAG_PREFERRED       = BIT(2); // preferred (when available) in random selections
 const int GAMETYPE_FLAG_PRIORITY        = BIT(3); // priority selection when preferred gametype isn't available in random selections
 const int GAMETYPE_FLAG_USEPOINTS       = BIT(1); // gametype has point-based scoring
 const int GAMETYPE_FLAG_PREFERRED       = BIT(2); // preferred (when available) in random selections
 const int GAMETYPE_FLAG_PRIORITY        = BIT(3); // priority selection when preferred gametype isn't available in random selections
+const int GAMETYPE_FLAG_HIDELIMITS      = BIT(4); // don't display a score limit needed for winning the match in the scoreboard
 
 int MAPINFO_TYPE_ALL;
 .int m_flags;
 
 int MAPINFO_TYPE_ALL;
 .int m_flags;
@@ -38,6 +39,8 @@ CLASS(Gametype, Object)
     ATTRIB(Gametype, team, bool, false);
     /** does this gametype use a point limit? */
     ATTRIB(Gametype, frags, bool, true);
     ATTRIB(Gametype, team, bool, false);
     /** does this gametype use a point limit? */
     ATTRIB(Gametype, frags, bool, true);
+    /** should this gametype display a score limit in the scoreboard? */
+    ATTRIB(Gametype, m_hidelimits, bool, false);
     /** game type defaults */
     ATTRIB(Gametype, model2, string);
     /** game type description */
     /** game type defaults */
     ATTRIB(Gametype, model2, string);
     /** game type description */
@@ -103,6 +106,7 @@ CLASS(Gametype, Object)
         this.gametype_description = gdescription;
         this.frags = (gflags & GAMETYPE_FLAG_USEPOINTS);
         this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
         this.gametype_description = gdescription;
         this.frags = (gflags & GAMETYPE_FLAG_USEPOINTS);
         this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
+        this.m_hidelimits = (gflags & GAMETYPE_FLAG_HIDELIMITS);
 
         // same as `1 << m_id`
         MAPINFO_TYPE_ALL |= this.items = this.m_flags = (MAPINFO_TYPE_ALL + 1);
 
         // same as `1 << m_id`
         MAPINFO_TYPE_ALL |= this.items = this.m_flags = (MAPINFO_TYPE_ALL + 1);