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.
This commit is contained in:
aurhat
2014-05-17 23:41:38 +02:00
committed by ac-stef
parent d4b3526a19
commit b728a33bb3
+1
View File
@@ -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);