diff --git a/src/client/defs.h b/src/client/defs.h index 4341186..ff28953 100644 --- a/src/client/defs.h +++ b/src/client/defs.h @@ -50,6 +50,7 @@ struct float m_flPickupAlpha; int m_iHUDWeaponSelected; float m_flHUDWeaponSelectTime; + int m_iItemsOld; } g_seatslocal[4], *pSeatLocal; void HUD_DrawAmmo1(void); diff --git a/src/client/hud_itemnotify.qc b/src/client/hud_itemnotify.qc index d1fb11e..8454b8a 100644 --- a/src/client/hud_itemnotify.qc +++ b/src/client/hud_itemnotify.qc @@ -78,9 +78,9 @@ HUD_ItemNotify_Insert(int type, int count) void HUD_ItemNotify_Check(player pl) { - int healthdiff = bound(0, pl.health - pl.health_net, 100); - int armordiff = bound(0, pl.armor - pl.armor_net, 100); - int longjumpdiff = ((pl.g_items & ITEM_LONGJUMP) > (pl.g_items_net & ITEM_LONGJUMP)) == TRUE; + int healthdiff = bound(0, pl.health - pSeatLocal->m_iHealthOld, 100); + int armordiff = bound(0, pl.armor - pSeatLocal->m_iArmorOld, 100); + int longjumpdiff = ((pl.g_items & ITEM_LONGJUMP) > (pSeatLocal->m_iItemsOld & ITEM_LONGJUMP)) == TRUE; if (healthdiff > 1) HUD_ItemNotify_Insert(1, 1); @@ -88,4 +88,6 @@ HUD_ItemNotify_Check(player pl) HUD_ItemNotify_Insert(0, 1); if (longjumpdiff) HUD_ItemNotify_Insert(2, 1); + + pSeatLocal->m_iItemsOld = pl.g_items; } \ No newline at end of file