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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user