if(!item.max_health)
item.max_health = g_pickup_healthsmall_max;
if(!GetResource(item, RES_HEALTH))
- SetResourceExplicit(item, RES_HEALTH, g_pickup_healthsmall);
+ SetResourceExplicit(item, RES_HEALTH, q3compat && item.count ? item.count : g_pickup_healthsmall);
}
#endif
#endif
this.netname = "health_small";
this.m_name = _("Small health");
- this.m_icon = "health";
+ this.m_icon = "health_small";
+#ifdef CSQC
+ if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
+ this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower
+#endif
#ifdef SVQC
this.m_itemid = IT_RESOURCE;
this.m_respawntime = GET(g_pickup_respawntime_short);
if(!item.max_health)
item.max_health = g_pickup_healthmedium_max;
if(!GetResource(item, RES_HEALTH))
- SetResourceExplicit(item, RES_HEALTH, g_pickup_healthmedium);
+ SetResourceExplicit(item, RES_HEALTH, q3compat && item.count ? item.count : g_pickup_healthmedium);
}
#endif
#endif
this.netname = "health_medium";
this.m_name = _("Medium health");
- this.m_icon = "health";
+ this.m_icon = "health_medium";
+#ifdef CSQC
+ if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
+ this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower
+#endif
#ifdef SVQC
this.m_itemid = IT_RESOURCE;
this.m_respawntime = GET(g_pickup_respawntime_short);
if(!item.max_health)
item.max_health = g_pickup_healthbig_max;
if(!GetResource(item, RES_HEALTH))
- SetResourceExplicit(item, RES_HEALTH, g_pickup_healthbig);
+ SetResourceExplicit(item, RES_HEALTH, q3compat && item.count ? item.count : g_pickup_healthbig);
}
#endif
#endif
this.netname = "health_big";
this.m_name = _("Big health");
- this.m_icon = "health";
+ this.m_icon = "health_big";
this.m_color = '1 0 0';
this.m_waypoint = _("Big health");
+#ifdef CSQC
+ if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
+ this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower
+#endif
#ifdef SVQC
this.m_itemid = IT_RESOURCE;
this.m_respawntime = GET(g_pickup_respawntime_medium);
if(!item.max_health)
item.max_health = g_pickup_healthmega_max;
if(!GetResource(item, RES_HEALTH))
- SetResourceExplicit(item, RES_HEALTH, g_pickup_healthmega);
+ SetResourceExplicit(item, RES_HEALTH, q3compat && item.count ? item.count : g_pickup_healthmega);
}
#endif
#endif
this.netname = "health_mega";
this.m_name = _("Mega health");
- this.m_icon = "item_mega_health";
+ this.m_icon = "health_mega";
+#ifdef CSQC
+ if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
+ this.m_icon = "item_mega_health"; // compatible with Xonotic v0.8.2 or lower
+#endif
this.m_color = '1 0 0';
this.m_waypoint = _("Mega health");
this.m_waypointblink = 2;