]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/scoreboard_item_stats
authorMario <mario.mario@y7mail.com>
Sun, 18 Oct 2020 23:55:38 +0000 (09:55 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 18 Oct 2020 23:55:38 +0000 (09:55 +1000)
1  2 
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/common/items/inventory.qh

index 51c7a14c350c86f118d78cd3dd14438d61f40a9d,7f3c8e5c28a3596d424a39d074d93eff89a96333..c474ad33b8c0b2cb4f8dc574e479bab745bac3e1
@@@ -1894,9 -1815,9 +1917,10 @@@ void Scoreboard_Draw(
  
        if (Scoreboard_AccuracyStats_WouldDraw(pos.y))
                pos = Scoreboard_AccuracyStats_Draw(pos, panel_bg_color, bg_size);
 +      pos = Scoreboard_ItemStats_Draw(pos, panel_bg_color, bg_size);
  
-       if(ISGAMETYPE(CTS) || ISGAMETYPE(RACE) || (autocvar_hud_panel_scoreboard_ctf_leaderboard && ISGAMETYPE(CTF) && STAT(CTF_SHOWLEADERBOARD))) {
+       if(MUTATOR_CALLHOOK(ShowRankings)) {
+               string ranktitle = M_ARGV(0, string);
                if(race_speedaward) {
                        drawcolorcodedstring(pos, sprintf(_("Speed award: %d%s ^7(%s^7)"), race_speedaward, race_speedaward_unit, ColorTranslateRGB(race_speedaward_holder)), hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                        pos.y += 1.25 * hud_fontsize.y;
index ed6c7355d2232b5c561b47be4efd08ed7fe442b3,c47be669978bb90b00afa5724297fc7d21c48544..cc17571ecc91bee3d94f401d7fec2a12457a29aa
@@@ -5,9 -5,7 +5,7 @@@
  #ifdef GAMEQC
  CLASS(Inventory, Object)
      /** Stores counts of items, the id being the index */
 -    ATTRIBARRAY(Inventory, inv_items, int, REGISTRY_MAX(Items));
 +    ATTRIBARRAY(Inventory, inv_items, int, Items_MAX);
-     /** Previous state */
-     ATTRIB(Inventory, inventory, Inventory);
  ENDCLASS(Inventory)
  
  /** Player inventory */
@@@ -119,6 -133,9 +119,9 @@@ void Inventory_new(PlayerState this
      setcefc(inv, Inventory_customize);
      Net_LinkEntity((inv.owner = this).inventory = inv, false, 0, Inventory_Send);
  }
--void Inventory_delete(entity e) { delete(e.inventory.inventory); delete(e.inventory); }
++void Inventory_delete(entity e) { delete(e.inventory); }
  void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
+ void InventoryStorage_attach(entity e) { e.inventory_store = NEW(Inventory); e.inventory_store.drawonlytoclient = e; }
+ void InventoryStorage_detach(entity e) { delete(e.inventory_store); }
  #endif