From b728a33bb3a5c85f7a4bbef07725dee68295767d Mon Sep 17 00:00:00 2001 From: aurhat Date: Sat, 17 May 2014 23:40:35 +0200 Subject: [PATCH] Fix of wrong stats of pistol's ammo on HUD ...when player holds nade and akimbo disappears. To test the bug: take akimbo, take grenade, press "g" and wait for akimbo disappearing. Then stats on HUD shows, that player has pistol with 0 ammo, instead of full magazine. --- source/src/renderhud.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 278059bc..8ec9b9fb 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -1086,6 +1086,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat { glMatrixMode(GL_MODELVIEW); if (p->weaponsel->type!=GUN_GRENADE) p->weaponsel->renderstats(); + else if (p->prevweaponsel->type==GUN_AKIMBO || p->prevweaponsel->type==GUN_PISTOL) p->weapons[p->akimbo ? GUN_AKIMBO : GUN_PISTOL]->renderstats(); else p->prevweaponsel->renderstats(); if(p->mag[GUN_GRENADE]) p->weapons[GUN_GRENADE]->renderstats(); glMatrixMode(GL_PROJECTION);