More compiler optimisations, cleaned menu, ammo and armor only display if not NULL.

This commit is contained in:
eukos 2015-08-21 21:45:22 +02:00
parent 44fdec28c6
commit 28f7d24bb8
3 changed files with 16 additions and 427 deletions

View file

@ -37,7 +37,7 @@ BUILD_RELEASE_DIR=.release
CC=gcc -m32
BASE_CFLAGS=-Dstricmp=strcasecmp -Wunused -I./include/
RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -funroll-loops -ffast-math
RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -funroll-loops -ffast-math -fomit-frame-pointer -funsigned-char -fno-strength-reduce
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
LDFLAGS=-lm -ldl
XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga

View file

@ -85,17 +85,6 @@ void M_LanConfig_Key (int key);
void M_GameOptions_Key (int key);
void M_Search_Key (int key);
void M_ServerList_Key (int key);
void Preset_Q101(void);
void Preset_Q107(void);
void Preset_Q64(void);
void Preset_GLQ(void);
void Preset_D(void);
void Preset_U(void);
void Preset_Xtreem(void);
void Preset_Lei(void);
void Preset_Crap(void);
qboolean m_entersound; // play after drawing a frame, so caching
// won't disrupt the sound
qboolean m_recursiveDraw;
@ -319,17 +308,9 @@ extern cvar_t *vid_stretch_by_2;
#define MENU_FLAMEHACK 233
#define MENU_FLARES 234
#define MENU_SHADING 235
#define MENU_PRESET_OPTIONS 236
#define MENU_HUD_OPTIONS 237
#define MENU_PRESET_Q101 238
#define MENU_PRESET_Q107 239
#define MENU_PRESET_GLQ 240
#define MENU_PRESET_Q64 241
#define MENU_PRESET_D 242
#define MENU_PRESET_U 243
#define MENU_PRESET_XTREEM 244
#define MENU_PRESET_LEI 245
#define MENU_PRESET_CRAP 246
#define MENU_DEATHCAM 247
#define MENU_ASPECT 248
@ -365,7 +346,7 @@ menu_definition_t m_menu_options[] =
{MENU_BROKEN_OPTIONS, MENU_SELECTABLE},
#endif
{MENU_VIDEO_RESOLUTION, MENU_SELECTABLE},
{MENU_PRESET_OPTIONS, MENU_SELECTABLE},
//{MENU_HUD_OPTIONS, MENU_SELECTABLE}, // completely unfinished
{MENU_AUTOSAVER, MENU_SELECTABLE},
@ -502,15 +483,7 @@ menu_definition_t m_menu_quality_options[] =
menu_definition_t m_menu_preset_options[] =
{ // Video Options
{MENU_OPTIONS, MENU_OPTIONS}, // this is the ESC key function and title
{MENU_PRESET_Q101, MENU_SELECTABLE},
{MENU_PRESET_Q107, MENU_SELECTABLE},
{MENU_PRESET_GLQ, MENU_SELECTABLE},
{MENU_PRESET_Q64, MENU_SELECTABLE},
{MENU_PRESET_D, MENU_SELECTABLE},
{MENU_PRESET_U, MENU_SELECTABLE},
{MENU_PRESET_XTREEM, MENU_SELECTABLE},
{MENU_PRESET_LEI, MENU_SELECTABLE},
{MENU_PRESET_CRAP, MENU_SELECTABLE},
{0, 0}, // end of submenu
};
@ -1879,17 +1852,11 @@ void M_DrawCheckboxAspect (int x, int y, int on)
void M_DrawCheckboxVirtual (int x, int y, int on)
{
if (on == 1)
M_Print (x, y, "crap");
else if (on == 2)
M_Print (x, y, "low");
else if (on == 3)
M_Print (x, y, "320x400");
else if (on == 4)
M_Print (x, y, "360x480");
else if (on == 5)
M_Print (x, y, "640x400");
else if (on == 2)
M_Print (x, y, "medium");
else
M_Print (x, y, "normal");
M_Print (x, y, "high");
}
@ -1898,26 +1865,13 @@ void M_DrawCheckboxCLight (int x, int y, int on)
if (on == 1)
M_Print (x, y, "low");
else if (on == 2)
M_Print (x, y, "high");
M_Print (x, y, "medium");
else if (on == 3)
M_Print (x, y, "ultra(dither)");
M_Print (x, y, "high");
else
M_Print (x, y, "off");
}
void M_DrawCheckboxTexFilter (int x, int y, int on)
{
if (on == 1)
M_Print (x, y, "kernel");
else if (on == 2)
M_Print (x, y, "bilinear");
else if (on == 3)
M_Print (x, y, "error diffusion");
else
M_Print (x, y, "nearest");
}
void M_DrawCheckboxBobmodel (int x, int y, int on)
{
if (on == 1)
@ -1944,7 +1898,6 @@ void M_DrawCheckboxBobmodel (int x, int y, int on)
M_Print (x, y, "thrust");
}
void M_DrawCheckboxDetail (int x, int y, int on)
{
if (on == 1)
@ -1952,7 +1905,7 @@ void M_DrawCheckboxDetail (int x, int y, int on)
else if (on == 2)
M_Print (x, y, "low");
else if (on == 3)
M_Print (x, y, "crap");
M_Print (x, y, "lowest");
else
M_Print (x, y, "high");
}
@ -2011,44 +1964,6 @@ int M_DrawFunction (menu_definition_t *menu_definition, int y)
y += 8;
break;
case MENU_PRESET_Q101:
M_Print (16, y, " Feel: Quake 1.01");
y += 8;
break;
case MENU_PRESET_Q107:
M_Print (16, y, " Feel: Quake 1.07");
y += 8;
break;
case MENU_PRESET_GLQ:
M_Print (16, y, " Feel: GLQuake");
y += 8;
break;
case MENU_PRESET_Q64:
M_Print (16, y, " Feel: Quake64");
y += 8;
break;
case MENU_PRESET_D:
M_Print (16, y, " Feel: damn");
y += 8;
break;
case MENU_PRESET_U:
M_Print (16, y, " Feel: fake ");
y += 8;
break;
case MENU_PRESET_XTREEM:
M_Print (16, y, " Feel: XTREEM!!!!");
y += 8;
break;
case MENU_PRESET_LEI:
M_Print (16, y, " Feel: My choice");
y += 8;
break;
case MENU_PRESET_CRAP:
M_Print (16, y, " Feel: Crap");
y += 8;
break;
case MENU_VIDEO_RESOLUTION:
M_Print (16, y, " Video Resolution");
y += 8;
@ -2151,19 +2066,19 @@ int M_DrawFunction (menu_definition_t *menu_definition, int y)
break;
case MENU_EXTERNAL_ENT:
M_Print (16, y, " Entity data (.ENT)");
M_Print (16, y, " Entity data");
M_DrawCheckbox (220, y, external_ent->value);
y += 8;
break;
case MENU_EXTERNAL_VIS:
M_Print (16, y, "Visibility data (.VIS)");
M_Print (16, y, " Visibility data");
M_DrawCheckbox (220, y, external_vis->value);
y += 8;
break;
case MENU_EXTERNAL_LIT:
M_Print (16, y, " Colored Light (.LIT)");
M_Print (16, y, " Colored Light");
M_DrawCheckbox (220, y, external_lit->value);
y += 8;
break;
@ -2266,10 +2181,6 @@ int M_DrawFunction (menu_definition_t *menu_definition, int y)
M_Print (16, y, " Quality options");
y += 8;
break;
case MENU_PRESET_OPTIONS:
M_Print (16, y, " Presets");
y += 8;
break;
case MENU_HUD_OPTIONS:
M_Print (16, y, " HUD options");
y += 8;
@ -2825,25 +2736,6 @@ void M_ExecFunction (menu_definition_t *menu_definition, int key)
}
break;
case MENU_PRESET_Q101:
if (key == K_ENTER){Preset_Q101(); m_changesound = true;}break;
case MENU_PRESET_Q107:
if (key == K_ENTER){Preset_Q107(); m_changesound = true;}break;
case MENU_PRESET_GLQ:
if (key == K_ENTER){Preset_GLQ(); m_changesound = true;}break;
case MENU_PRESET_Q64:
if (key == K_ENTER){Preset_Q64(); m_changesound = true;}break;
case MENU_PRESET_D:
if (key == K_ENTER){Preset_D(); m_changesound = true;}break;
case MENU_PRESET_U:
if (key == K_ENTER){Preset_U(); m_changesound = true;}break;
case MENU_PRESET_XTREEM:
if (key == K_ENTER){Preset_Xtreem(); m_changesound = true;}break;
case MENU_PRESET_LEI:
if (key == K_ENTER){Preset_Lei(); m_changesound = true;}break;
case MENU_PRESET_CRAP:
if (key == K_ENTER){Preset_Crap(); m_changesound = true;}break;
case MENU_VIDEO_RESOLUTION:
if (key == K_ENTER || key == K_JOY1|| key == K_ESCAPE)
{
@ -3206,14 +3098,6 @@ void M_ExecFunction (menu_definition_t *menu_definition, int key)
}
break;
case MENU_PRESET_OPTIONS:
if (key == K_ENTER || key == K_JOY1 || key == K_ESCAPE)
{
current_menu = m_menu_preset_options;
current_cursor = &preset_options_cursor;
m_entersound = true;
}
break;
case MENU_HUD_OPTIONS:
if (key == K_ENTER || key == K_JOY1 || key == K_ESCAPE)
{
@ -5767,301 +5651,6 @@ extern cvar_t *cl_bobmodel_up;
extern cvar_t *cl_bobmodel_speed;
extern cvar_t *cl_bob;
void Preset_Q101 (void) // Quake 1.01
{
Cvar_Set(cl_bobmodel, "0"); // thrust
Cvar_Set(cl_bobmodel_side, "0.3");
Cvar_Set(cl_bobmodel_up, "0.15");
Cvar_Set(cl_bob, "0.02");
Cvar_Set(cl_bobmodel_speed, "7");
Cvar_Set(cl_leanmodel, "0");
Cvar_Set(cl_followmodel, "0");
Cvar_Set(cl_bobfall, "0");
Cvar_Set(cl_gundraw, "0");
Cvar_Set(r_shading, "1"); // uniform normal shading
Cvar_Set(r_menucolor, "1"); // brown menu
Cvar_Set(s_pitchin, "0"); // normal sound pitch
Cvar_Set(s_oldspatial, "1"); // long distance spatial
Cvar_Set(r_flares, "0"); // don't flares
Cvar_Set(r_particleset, "0"); // normal particles
Cvar_Set(r_particletrans, "0"); // don't have blend particles
Cvar_Set(r_particleblood, "0"); // don't use new blood
Cvar_Set(r_coloredlights, "0"); // don't have colored lightin
Cvar_Set(r_filter, "0"); // don't filter textures
Cvar_Set(r_muzzlehack, "0"); // don't hack the muzzleflash
Cvar_Set(r_lerpmodels, "0"); // don't interpolate
Cvar_Set(r_particlespray, "0"); // don't spray particles
Cvar_Set(r_shadowhack, "0"); // don't model shadows
Cvar_Set(r_shadedither, "0"); // don't dither
Cvar_Set(cl_sbar, "1"); // use old status bar
Cvar_Set(d_mipdetail, "0"); // normal detail
Cvar_Set(s_underwater, "0"); // don't sound pitch in water
Cvar_Set(r_wateralpha, "1"); // don't blend water
Cvar_Set(r_waterquality, "0"); // don't do water fx
Cvar_Set(r_depthoffield, "0"); // and the depth of field
Cvar_Set(r_lowworld, "0");
Cvar_Set(r_dynamic, "1");
Cvar_Set(r_shinygrays, "0"); // don't shine
Cvar_Set(cl_diecam, "0");
Cvar_Set(s_gibs, "0");
Cvar_Set(s_playerdeath, "0");
Cvar_Set(s_blood, "0");
fullbrights = 32; // use the standard colormap fullbrights
overbrights = 1; // normal overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_Q107 (void) // Quake 1.07
{
Preset_Q101(); // old preset, but...
Cvar_Set(r_menucolor, "15"); // dotty menu
Cvar_Set(s_oldspatial, "0"); // short distance spatial
}
void Preset_GLQ (void) // GLQuake
{
Preset_Q101(); // old preset, but...
Cvar_Set(r_filter, "1"); // filter textures
Cvar_Set(r_particleset, "1"); // glquake particleset (if available)
Cvar_Set(r_menucolor, "16"); // alpha blend black menu
Cvar_Set(r_dynamic, "0"); // we don't have flashblend yet :(
Cvar_Set(v_gamma, "1"); // glquake doesn't do gamma lol
// Cvar_Set(v_intensity, "0");
// Cvar_Set(contrast, "0");
fullbrights = 0; // no fullbrights
overbrights = 0; // no overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_Q64 (void)
{
Preset_Q101(); // old preset, but...
Cvar_Set(r_filter, "2"); // filter textures slantedly
Cvar_Set(r_particleset, "1"); // glquake particleset (if available)
Cvar_Set(r_menucolor, "16"); // alpha blend black menu
Cvar_Set(d_mipdetail, "64"); // low detail because n64 sucks
Cvar_Set(r_coloredlights, "1");
Cvar_Set(r_dynamic, "0"); // we don't have flashblend yet :(
Cvar_Set(r_shading, "0"); // simple shading
fullbrights = 0; // no fullbrights
overbrights = 0; // no overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_U (void) // U
{
Cvar_Set(cl_bobmodel, "3"); // fig 8
Cvar_Set(cl_leanmodel, "0");
Cvar_Set(cl_followmodel, "0");
Cvar_Set(cl_bobmodel_side, "0.3");
Cvar_Set(cl_bobmodel_up, "0.15");
Cvar_Set(cl_bobmodel_speed, "7");
Cvar_Set(r_lowworld, "0");
Cvar_Set(r_depthoffield, "0"); // and the depth of field
Cvar_Set(r_shading, "2"); // point shading
Cvar_Set(r_menucolor, "16");
Cvar_Set(s_pitchin, "1.4"); // normal sound pitch
Cvar_Set(s_oldspatial, "1"); // long distance spatial
Cvar_Set(r_flares, "2"); // don't flares
Cvar_Set(r_particleset, "2"); // normal particles
Cvar_Set(r_particletrans, "1"); // don't have blend particles
Cvar_Set(r_particleblood, "0"); // don't use new blood
Cvar_Set(r_coloredlights, "2"); // don't have colored lightin
Cvar_Set(r_filter, "1"); // don't filter textures
Cvar_Set(r_muzzlehack, "1"); // don't hack the muzzleflash
Cvar_Set(r_lerpmodels, "1"); // don't interpolate
Cvar_Set(r_particlespray, "0"); // don't spray particles
Cvar_Set(r_shadowhack, "0"); // don't model shadows
Cvar_Set(r_shadedither, "1"); // don't dither
Cvar_Set(cl_sbar, "0"); // use old status bar
Cvar_Set(d_mipdetail, "0"); // normal detail
Cvar_Set(s_underwater, "0"); // don't sound pitch in water
Cvar_Set(r_wateralpha, "0.6"); // don't blend water
Cvar_Set(r_waterquality, "0"); // don't do water fx
Cvar_Set(r_dynamic, "1");
Cvar_Set(cl_diecam, "3");
Cvar_Set(s_gibs, "0");
Cvar_Set(s_playerdeath, "1");
Cvar_Set(s_blood, "0");
fullbrights = 32; // use the standard colormap fullbrights
overbrights = 1; // normal overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_Lei (void)
{
Cvar_Set(cl_bobmodel, "3"); // fig 8
Cvar_Set(cl_leanmodel, "1");
Cvar_Set(cl_followmodel, "1");
Cvar_Set(cl_bobfall, "1");
Cvar_Set(cl_gundraw, "1");
Cvar_Set(cl_bobmodel_side, "0.3");
Cvar_Set(cl_bobmodel_up, "0.15");
Cvar_Set(cl_bobmodel_speed, "7");
Cvar_Set(r_depthoffield, "0"); // and the depth of field
Cvar_Set(r_shading, "2"); // point shading
Cvar_Set(r_menucolor, "0");
Cvar_Set(s_pitchin, "2"); // normal sound pitch
Cvar_Set(s_oldspatial, "1"); // long distance spatial
Cvar_Set(r_flares, "2"); // don't flares
Cvar_Set(r_particleset, "2"); // normal particles
Cvar_Set(r_particletrans, "1"); // don't have blend particles
Cvar_Set(r_particleblood, "9"); // don't use new blood
Cvar_Set(r_coloredlights, "2"); // don't have colored lightin
Cvar_Set(r_filter, "0"); // don't filter textures
Cvar_Set(r_muzzlehack, "1"); // don't hack the muzzleflash
Cvar_Set(r_lerpmodels, "1"); // interpolate
Cvar_Set(r_particlespray, "0"); // don't spray particles
Cvar_Set(r_shadowhack, "1"); // don't model shadows
Cvar_Set(r_shadedither, "1"); // don't dither
Cvar_Set(cl_sbar, "1"); // use old status bar
Cvar_Set(d_mipdetail, "0"); // normal detail
Cvar_Set(s_underwater, "1"); // don't sound pitch in water
Cvar_Set(r_wateralpha, "0.3"); // don't blend water
Cvar_Set(r_waterquality, "1"); // don't do water fx
Cvar_Set(r_lowworld, "0");
Cvar_Set(r_dynamic, "1");
Cvar_Set(cl_diecam, "3");
Cvar_Set(s_gibs, "1");
Cvar_Set(s_playerdeath, "1");
Cvar_Set(s_blood, "1");
Cvar_Set(r_shinygrays, "1"); // do shine
fullbrights = 32; // use the standard colormap fullbrights
overbrights = 1; // normal overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_D (void)
{
Cvar_Set(cl_bobmodel, "1"); // Arc
Cvar_Set(cl_bob, "0.07");
Cvar_Set(cl_leanmodel, "0");
Cvar_Set(cl_followmodel, "0");
Cvar_Set(cl_bobmodel_side, "0.6");
Cvar_Set(cl_bobmodel_up, "-0.5");
Cvar_Set(cl_bobmodel_speed, "2");
Cvar_Set(r_lowworld, "0");
Cvar_Set(r_shading, "0"); // uniform normal shading
Cvar_Set(r_menucolor, "17"); // brown menu
Cvar_Set(s_pitchin, "1"); // normal sound pitch
Cvar_Set(s_oldspatial, "1"); // long distance spatial
Cvar_Set(r_flares, "0"); // don't flares
Cvar_Set(r_particleset, "0"); // normal particles
Cvar_Set(r_particletrans, "0"); // don't have blend particles
Cvar_Set(r_particleblood, "0"); // don't use new blood
Cvar_Set(r_coloredlights, "0"); // don't have colored lightin
Cvar_Set(r_filter, "0"); // don't filter textures
Cvar_Set(r_muzzlehack, "0"); // don't hack the muzzleflash
Cvar_Set(r_lerpmodels, "0"); // don't interpolate
Cvar_Set(r_particlespray, "0"); // don't spray particles
Cvar_Set(r_shadowhack, "0"); // don't model shadows
Cvar_Set(r_shadedither, "0"); // don't dither
Cvar_Set(r_shinygrays, "0"); // don't shine
Cvar_Set(cl_sbar, "1"); // use old status bar
Cvar_Set(d_mipdetail, "0"); // normal detail
Cvar_Set(s_underwater, "0"); // don't sound pitch in water
Cvar_Set(r_wateralpha, "1"); // don't blend water
Cvar_Set(r_waterquality, "0"); // don't do water fx
Cvar_Set(r_depthoffield, "0"); // and the depth of field
Cvar_Set(r_dynamic, "1");
Cvar_Set(cl_diecam, "0");
Cvar_Set(s_gibs, "0");
Cvar_Set(s_playerdeath, "1");
Cvar_Set(s_blood, "0");
fullbrights = 32; // use the standard colormap fullbrights
overbrights = 0; // no overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_Xtreem (void) // Everything set high
{
Cvar_Set(cl_bobmodel, "3"); // thrust
Cvar_Set(cl_bobmodel_side, "0.3");
Cvar_Set(cl_bobmodel_up, "0.15");
Cvar_Set(cl_bob, "0.02");
Cvar_Set(cl_bobmodel_speed, "7");
Cvar_Set(cl_leanmodel, "1");
Cvar_Set(cl_followmodel, "1");
Cvar_Set(r_shading, "2"); // dithered shading
Cvar_Set(r_menucolor, "1"); // brown menu
Cvar_Set(s_pitchin, "2"); // normal sound pitch
Cvar_Set(s_oldspatial, "1"); // long distance spatial
Cvar_Set(r_flares, "2"); // don't flares
Cvar_Set(r_particleset, "2"); // normal particles
Cvar_Set(r_particletrans, "1"); // don't have blend particles
Cvar_Set(r_particleblood, "8"); // don't use new blood
Cvar_Set(r_coloredlights, "3"); // don't have colored lightin
Cvar_Set(r_filter, "1"); // don't filter textures
Cvar_Set(r_muzzlehack, "1"); // don't hack the muzzleflash
Cvar_Set(r_lerpmodels, "1"); // don't interpolate
Cvar_Set(r_particlespray, "0"); // don't spray particles
Cvar_Set(r_shadowhack, "1"); // don't model shadows
Cvar_Set(r_shadedither, "1"); // don't dither
Cvar_Set(cl_sbar, "1"); // use old status bar
Cvar_Set(d_mipdetail, "-1"); // normal detail
Cvar_Set(s_underwater, "1"); // don't sound pitch in water
Cvar_Set(r_wateralpha, "0.3"); // don't blend water
Cvar_Set(r_waterquality, "2"); // don't do water fx
Cvar_Set(r_depthoffield, "1"); // and the depth of field
Cvar_Set(r_lowworld, "0");
Cvar_Set(r_dynamic, "1");
Cvar_Set(s_gibs, "1");
Cvar_Set(s_blood, "1");
fullbrights = 32; // use the standard colormap fullbrights
overbrights = 1; // normal overbrights
GrabColorMap(); // regenerate colormap
}
void Preset_Crap (void) // Everything set low or possibly beyond low
{
Cvar_Set(cl_bobmodel, "0"); // thrust
Cvar_Set(cl_bobmodel_side, "0.3");
Cvar_Set(cl_bobmodel_up, "0.15");
Cvar_Set(cl_bob, "0.02");
Cvar_Set(cl_bobmodel_speed, "7");
Cvar_Set(cl_leanmodel, "0");
Cvar_Set(cl_followmodel, "0");
Cvar_Set(r_lowworld, "1");
Cvar_Set(r_shading, "0"); // dithered shading
Cvar_Set(r_menucolor, "15"); // brown menu
Cvar_Set(s_pitchin, "0"); // normal sound pitch
Cvar_Set(s_oldspatial, "0"); // long distance spatial
Cvar_Set(r_flares, "0"); // don't flares
Cvar_Set(r_particleset, "0"); // normal particles
Cvar_Set(r_particletrans, "0"); // don't have blend particles
Cvar_Set(r_particleblood, "0"); // don't use new blood
Cvar_Set(r_coloredlights, "0"); // don't have colored lightin
Cvar_Set(r_filter, "0"); // don't filter textures
Cvar_Set(r_muzzlehack, "0"); // don't hack the muzzleflash
Cvar_Set(r_lerpmodels, "0"); // don't interpolate
Cvar_Set(r_particlespray, "0"); // don't spray particles
Cvar_Set(r_shadowhack, "0"); // don't model shadows
Cvar_Set(r_shadedither, "0"); // don't dither
Cvar_Set(cl_sbar, "1"); // use old status bar
Cvar_Set(d_mipdetail, "9"); // normal detail
Cvar_Set(s_underwater, "0"); // don't sound pitch in water
Cvar_Set(r_wateralpha, "1"); // don't blend water
Cvar_Set(r_waterquality, "0"); // don't do water fx
Cvar_Set(r_depthoffield, "0"); // and the depth of field
Cvar_Set(r_dynamic, "0");
Cvar_Set(cl_diecam, "0");
Cvar_Set(s_gibs, "0");
Cvar_Set(s_blood, "0");
fullbrights = 32; // use the standard colormap fullbrights
overbrights = 1; // normal overbrights
GrabColorMap(); // regenerate colormap
}
//=============================================================================
/* Menu Subsystem */

View file

@ -842,7 +842,7 @@ void Sbar_DrawNormal (void)
Sbar_DrawPic (0, 0, sb_sbar, 0);
// armor
if(hud_armor->value)
if(hud_armor->value && cl.stats[STAT_ARMOR])
if (cl.items & IT_INVULNERABILITY)
{
Sbar_DrawNum (hud_armor_posx->value + 24, hud_armor_posy->value, 666, 3, 1, (int)hud_armor_align->value);
@ -874,7 +874,7 @@ void Sbar_DrawNormal (void)
}
// ammo icon
if(hud_ammo->value)
if(hud_ammo->value && cl.stats[STAT_AMMO])
{
if(hud_ammo_icon->value)
if (cl.items & IT_SHELLS)