#include <common/scores.qh>
#include <common/stats.qh>
#include <common/teams.qh>
+#include <common/items/inventory.qh>
// Scoreboard (#24)
"items", hud_fontsize, '0.5 0.5 1', panel_fg_alpha, DRAWFLAG_NORMAL);
tmp.y += hud_fontsize.y * 1.25;
- FOREACH(Items, it.m_id == ITEM_ArmorMega.m_id || it.m_id == ITEM_HealthMega.m_id, {
- tmp = Scoreboard_Duel_DrawPickup(tmp, true, it.m_icon, icon_sz, 0, invert);
+ FOREACH(Items,
+ it.m_id == ITEM_ArmorMega.m_id ||
+ it.m_id == ITEM_HealthMega.m_id ||
+ it.m_id == ITEM_ArmorBig.m_id, {
+ tmp = Scoreboard_Duel_DrawPickup(tmp, true, it.m_icon, icon_sz, inventoryslots[pl.sv_entnum].inv_items[it.m_id], invert);
if(it.m_id == REGISTRY_MAX(Items))
break;
if (autocvar_hud_panel_scoreboard_team_size_position != 1) // team size not on left
{
// put team score to the left of scoreboard (and team size to the right)
- team_score_baseoffset = eY * hud_fontsize.y - eX * hud_fontsize.x * 0.5;
+ team_score_baseoffset = eY * hud_fontsize.y - eX * hud_fontsize.x * 1.5;
team_size_baseoffset = eY * hud_fontsize.y + eX * hud_fontsize.x * 0.5;
if(panel.current_panel_bg != "0")
{
else
{
// put team score to the right of scoreboard (and team size to the left)
- team_score_baseoffset = eY * hud_fontsize.y + eX * hud_fontsize.x * 0.5;
+ team_score_baseoffset = eY * hud_fontsize.y + eX * hud_fontsize.x * 1.5;
team_size_baseoffset = eY * hud_fontsize.y - eX * hud_fontsize.x * 0.5;
if(panel.current_panel_bg != "0")
{
#endif
#ifdef CSQC
-Inventory g_inventory;
+//Inventory g_inventory;
+Inventory inventoryslots[255];
NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
{
make_pure(this);
- g_inventory = this;
+ //g_inventory = this;
+
+ float entnum = ReadByte();
+ inventoryslots[entnum-1] = this;
+
const int majorBits = Readbits(Inventory_groups_major);
for (int i = 0; i < Inventory_groups_major; ++i) {
if (!(majorBits & BIT(i))) {
TC(Inventory, this);
WriteHeader(MSG_ENTITY, ENT_CLIENT_INVENTORY);
TC(PlayerState, this.owner);
- Inventory_Write(this);
+
+ // z411 send entity number
+ WriteByte(MSG_ENTITY, etof(this.owner.m_client));
+
+ Inventory_Write(this);
return true;
}
{
Inventory inv = NEW(Inventory), bak = NEW(Inventory);
inv.inventory = bak;
- setcefc(inv, Inventory_customize);
+ if(!g_duel)
+ 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); }