added GAME_SOM (and its hud), and shuffled some hud code around to make things a...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Dec 2003 01:57:38 +0000 (01:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Dec 2003 01:57:38 +0000 (01:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3763 d7cf8633-e32d-0410-b094-e92efae38249

common.c
common.h
sbar.c

index 557f83e..a82d3c4 100644 (file)
--- a/common.c
+++ b/common.c
@@ -768,6 +768,8 @@ void COM_InitGameType (void)
                gamemode = GAME_FNIGGIUM;
        else if (strstr(name, "setheral"))
                gamemode = GAME_SETHERAL;
+       else if (strstr(name, "som"))
+               gamemode = GAME_SOM;
        else
                gamemode = GAME_NORMAL;
 
@@ -795,6 +797,8 @@ void COM_InitGameType (void)
                gamemode = GAME_FNIGGIUM;
        else if (COM_CheckParm ("-setheral"))
                gamemode = GAME_SETHERAL;
+       else if (COM_CheckParm ("-som"))
+               gamemode = GAME_SOM;
 
        switch(gamemode)
        {
@@ -846,6 +850,10 @@ void COM_InitGameType (void)
                gamename = "Setheral";
                gamedirname = "data";
                break;
+       case GAME_SOM:
+               gamename = "Son of Man";
+               gamedirname = "data";
+               break;
        default:
                Sys_Error("COM_InitGameType: unknown gamemode %i\n", gamemode);
                break;
index 818c54b..a05c863 100644 (file)
--- a/common.h
+++ b/common.h
@@ -173,6 +173,7 @@ extern      struct cvar_s   registered;
 #define GAME_ZYMOTIC 9
 #define GAME_FNIGGIUM 10
 #define GAME_SETHERAL 11
+#define GAME_SOM 12
 
 extern int gamemode;
 extern char *gamename;
diff --git a/sbar.c b/sbar.c
index d2e37eb..5e3629d 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -83,10 +83,15 @@ int hipweapons[4] = {HIT_LASER_CANNON_BIT,HIT_MJOLNIR_BIT,4,HIT_PROXIMITY_GUN_BI
 //MED 01/04/97 added hipnotic items array
 sbarpic_t *hsb_items[2];
 
+//GAME_SOM stuff:
+sbarpic_t *somsb_health;
+sbarpic_t *somsb_ammo[4];
+sbarpic_t *somsb_armor[3];
+
 cvar_t showfps = {CVAR_SAVE, "showfps", "0"};
 cvar_t sbar_alpha = {CVAR_SAVE, "sbar_alpha", "1"};
 
-void Sbar_MiniDeathmatchOverlay (void);
+void Sbar_MiniDeathmatchOverlay (int x, int y);
 void Sbar_DeathmatchOverlay (void);
 void Sbar_IntermissionOverlay (void);
 void Sbar_FinaleOverlay (void);
@@ -138,8 +143,18 @@ void sbar_start(void)
        sb_colon = Sbar_NewPic ("gfx/num_colon");
        sb_slash = Sbar_NewPic ("gfx/num_slash");
 
-       //AK NX uses its own hud
-       if(gamemode == GAME_NEXUIZ)
+       if (gamemode == GAME_SOM)
+       {
+               somsb_health = Sbar_NewPic("gfx/hud_health");
+               somsb_ammo[0] = Sbar_NewPic("gfx/sb_shells");
+               somsb_ammo[1] = Sbar_NewPic("gfx/sb_nails");
+               somsb_ammo[2] = Sbar_NewPic("gfx/sb_rocket");
+               somsb_ammo[3] = Sbar_NewPic("gfx/sb_cells");
+               somsb_armor[0] = Sbar_NewPic("gfx/sb_armor1");
+               somsb_armor[1] = Sbar_NewPic("gfx/sb_armor2");
+               somsb_armor[2] = Sbar_NewPic("gfx/sb_armor3");
+       }
+       else if (gamemode == GAME_NEXUIZ)
        {
                sb_ammo[0] = Sbar_NewPic ("gfx/sb_shells");
                sb_ammo[1] = Sbar_NewPic ("gfx/sb_bullets");
@@ -156,126 +171,126 @@ void sbar_start(void)
 
                for(i = 0; i < 9;i++)
                        sb_weapons[0][i] = Sbar_NewPic(va("gfx/inv_weapon%i",i));
-
-               return;
-       }
-
-       sb_weapons[0][0] = Sbar_NewPic ("gfx/inv_shotgun");
-       sb_weapons[0][1] = Sbar_NewPic ("gfx/inv_sshotgun");
-       sb_weapons[0][2] = Sbar_NewPic ("gfx/inv_nailgun");
-       sb_weapons[0][3] = Sbar_NewPic ("gfx/inv_snailgun");
-       sb_weapons[0][4] = Sbar_NewPic ("gfx/inv_rlaunch");
-       sb_weapons[0][5] = Sbar_NewPic ("gfx/inv_srlaunch");
-       sb_weapons[0][6] = Sbar_NewPic ("gfx/inv_lightng");
-
-       sb_weapons[1][0] = Sbar_NewPic ("gfx/inv2_shotgun");
-       sb_weapons[1][1] = Sbar_NewPic ("gfx/inv2_sshotgun");
-       sb_weapons[1][2] = Sbar_NewPic ("gfx/inv2_nailgun");
-       sb_weapons[1][3] = Sbar_NewPic ("gfx/inv2_snailgun");
-       sb_weapons[1][4] = Sbar_NewPic ("gfx/inv2_rlaunch");
-       sb_weapons[1][5] = Sbar_NewPic ("gfx/inv2_srlaunch");
-       sb_weapons[1][6] = Sbar_NewPic ("gfx/inv2_lightng");
-
-       for (i = 0;i < 5;i++)
-       {
-               sb_weapons[2+i][0] = Sbar_NewPic (va("gfx/inva%i_shotgun",i+1));
-               sb_weapons[2+i][1] = Sbar_NewPic (va("gfx/inva%i_sshotgun",i+1));
-               sb_weapons[2+i][2] = Sbar_NewPic (va("gfx/inva%i_nailgun",i+1));
-               sb_weapons[2+i][3] = Sbar_NewPic (va("gfx/inva%i_snailgun",i+1));
-               sb_weapons[2+i][4] = Sbar_NewPic (va("gfx/inva%i_rlaunch",i+1));
-               sb_weapons[2+i][5] = Sbar_NewPic (va("gfx/inva%i_srlaunch",i+1));
-               sb_weapons[2+i][6] = Sbar_NewPic (va("gfx/inva%i_lightng",i+1));
        }
-
-       sb_ammo[0] = Sbar_NewPic ("gfx/sb_shells");
-       sb_ammo[1] = Sbar_NewPic ("gfx/sb_nails");
-       sb_ammo[2] = Sbar_NewPic ("gfx/sb_rocket");
-       sb_ammo[3] = Sbar_NewPic ("gfx/sb_cells");
-
-       sb_armor[0] = Sbar_NewPic ("gfx/sb_armor1");
-       sb_armor[1] = Sbar_NewPic ("gfx/sb_armor2");
-       sb_armor[2] = Sbar_NewPic ("gfx/sb_armor3");
-
-       sb_items[0] = Sbar_NewPic ("gfx/sb_key1");
-       sb_items[1] = Sbar_NewPic ("gfx/sb_key2");
-       sb_items[2] = Sbar_NewPic ("gfx/sb_invis");
-       sb_items[3] = Sbar_NewPic ("gfx/sb_invuln");
-       sb_items[4] = Sbar_NewPic ("gfx/sb_suit");
-       sb_items[5] = Sbar_NewPic ("gfx/sb_quad");
-
-       sb_sigil[0] = Sbar_NewPic ("gfx/sb_sigil1");
-       sb_sigil[1] = Sbar_NewPic ("gfx/sb_sigil2");
-       sb_sigil[2] = Sbar_NewPic ("gfx/sb_sigil3");
-       sb_sigil[3] = Sbar_NewPic ("gfx/sb_sigil4");
-
-       sb_faces[4][0] = Sbar_NewPic ("gfx/face1");
-       sb_faces[4][1] = Sbar_NewPic ("gfx/face_p1");
-       sb_faces[3][0] = Sbar_NewPic ("gfx/face2");
-       sb_faces[3][1] = Sbar_NewPic ("gfx/face_p2");
-       sb_faces[2][0] = Sbar_NewPic ("gfx/face3");
-       sb_faces[2][1] = Sbar_NewPic ("gfx/face_p3");
-       sb_faces[1][0] = Sbar_NewPic ("gfx/face4");
-       sb_faces[1][1] = Sbar_NewPic ("gfx/face_p4");
-       sb_faces[0][0] = Sbar_NewPic ("gfx/face5");
-       sb_faces[0][1] = Sbar_NewPic ("gfx/face_p5");
-
-       sb_face_invis = Sbar_NewPic ("gfx/face_invis");
-       sb_face_invuln = Sbar_NewPic ("gfx/face_invul2");
-       sb_face_invis_invuln = Sbar_NewPic ("gfx/face_inv2");
-       sb_face_quad = Sbar_NewPic ("gfx/face_quad");
-
-       sb_sbar = Sbar_NewPic ("gfx/sbar");
-       sb_ibar = Sbar_NewPic ("gfx/ibar");
-       sb_scorebar = Sbar_NewPic ("gfx/scorebar");
-
-//MED 01/04/97 added new hipnotic weapons
-       if (gamemode == GAME_HIPNOTIC)
+       else
        {
-               hsb_weapons[0][0] = Sbar_NewPic ("gfx/inv_laser");
-               hsb_weapons[0][1] = Sbar_NewPic ("gfx/inv_mjolnir");
-               hsb_weapons[0][2] = Sbar_NewPic ("gfx/inv_gren_prox");
-               hsb_weapons[0][3] = Sbar_NewPic ("gfx/inv_prox_gren");
-               hsb_weapons[0][4] = Sbar_NewPic ("gfx/inv_prox");
-
-               hsb_weapons[1][0] = Sbar_NewPic ("gfx/inv2_laser");
-               hsb_weapons[1][1] = Sbar_NewPic ("gfx/inv2_mjolnir");
-               hsb_weapons[1][2] = Sbar_NewPic ("gfx/inv2_gren_prox");
-               hsb_weapons[1][3] = Sbar_NewPic ("gfx/inv2_prox_gren");
-               hsb_weapons[1][4] = Sbar_NewPic ("gfx/inv2_prox");
-
+               sb_weapons[0][0] = Sbar_NewPic ("gfx/inv_shotgun");
+               sb_weapons[0][1] = Sbar_NewPic ("gfx/inv_sshotgun");
+               sb_weapons[0][2] = Sbar_NewPic ("gfx/inv_nailgun");
+               sb_weapons[0][3] = Sbar_NewPic ("gfx/inv_snailgun");
+               sb_weapons[0][4] = Sbar_NewPic ("gfx/inv_rlaunch");
+               sb_weapons[0][5] = Sbar_NewPic ("gfx/inv_srlaunch");
+               sb_weapons[0][6] = Sbar_NewPic ("gfx/inv_lightng");
+       
+               sb_weapons[1][0] = Sbar_NewPic ("gfx/inv2_shotgun");
+               sb_weapons[1][1] = Sbar_NewPic ("gfx/inv2_sshotgun");
+               sb_weapons[1][2] = Sbar_NewPic ("gfx/inv2_nailgun");
+               sb_weapons[1][3] = Sbar_NewPic ("gfx/inv2_snailgun");
+               sb_weapons[1][4] = Sbar_NewPic ("gfx/inv2_rlaunch");
+               sb_weapons[1][5] = Sbar_NewPic ("gfx/inv2_srlaunch");
+               sb_weapons[1][6] = Sbar_NewPic ("gfx/inv2_lightng");
+       
                for (i = 0;i < 5;i++)
                {
-                       hsb_weapons[2+i][0] = Sbar_NewPic (va("gfx/inva%i_laser",i+1));
-                       hsb_weapons[2+i][1] = Sbar_NewPic (va("gfx/inva%i_mjolnir",i+1));
-                       hsb_weapons[2+i][2] = Sbar_NewPic (va("gfx/inva%i_gren_prox",i+1));
-                       hsb_weapons[2+i][3] = Sbar_NewPic (va("gfx/inva%i_prox_gren",i+1));
-                       hsb_weapons[2+i][4] = Sbar_NewPic (va("gfx/inva%i_prox",i+1));
+                       sb_weapons[2+i][0] = Sbar_NewPic (va("gfx/inva%i_shotgun",i+1));
+                       sb_weapons[2+i][1] = Sbar_NewPic (va("gfx/inva%i_sshotgun",i+1));
+                       sb_weapons[2+i][2] = Sbar_NewPic (va("gfx/inva%i_nailgun",i+1));
+                       sb_weapons[2+i][3] = Sbar_NewPic (va("gfx/inva%i_snailgun",i+1));
+                       sb_weapons[2+i][4] = Sbar_NewPic (va("gfx/inva%i_rlaunch",i+1));
+                       sb_weapons[2+i][5] = Sbar_NewPic (va("gfx/inva%i_srlaunch",i+1));
+                       sb_weapons[2+i][6] = Sbar_NewPic (va("gfx/inva%i_lightng",i+1));
+               }
+       
+               sb_ammo[0] = Sbar_NewPic ("gfx/sb_shells");
+               sb_ammo[1] = Sbar_NewPic ("gfx/sb_nails");
+               sb_ammo[2] = Sbar_NewPic ("gfx/sb_rocket");
+               sb_ammo[3] = Sbar_NewPic ("gfx/sb_cells");
+       
+               sb_armor[0] = Sbar_NewPic ("gfx/sb_armor1");
+               sb_armor[1] = Sbar_NewPic ("gfx/sb_armor2");
+               sb_armor[2] = Sbar_NewPic ("gfx/sb_armor3");
+       
+               sb_items[0] = Sbar_NewPic ("gfx/sb_key1");
+               sb_items[1] = Sbar_NewPic ("gfx/sb_key2");
+               sb_items[2] = Sbar_NewPic ("gfx/sb_invis");
+               sb_items[3] = Sbar_NewPic ("gfx/sb_invuln");
+               sb_items[4] = Sbar_NewPic ("gfx/sb_suit");
+               sb_items[5] = Sbar_NewPic ("gfx/sb_quad");
+       
+               sb_sigil[0] = Sbar_NewPic ("gfx/sb_sigil1");
+               sb_sigil[1] = Sbar_NewPic ("gfx/sb_sigil2");
+               sb_sigil[2] = Sbar_NewPic ("gfx/sb_sigil3");
+               sb_sigil[3] = Sbar_NewPic ("gfx/sb_sigil4");
+       
+               sb_faces[4][0] = Sbar_NewPic ("gfx/face1");
+               sb_faces[4][1] = Sbar_NewPic ("gfx/face_p1");
+               sb_faces[3][0] = Sbar_NewPic ("gfx/face2");
+               sb_faces[3][1] = Sbar_NewPic ("gfx/face_p2");
+               sb_faces[2][0] = Sbar_NewPic ("gfx/face3");
+               sb_faces[2][1] = Sbar_NewPic ("gfx/face_p3");
+               sb_faces[1][0] = Sbar_NewPic ("gfx/face4");
+               sb_faces[1][1] = Sbar_NewPic ("gfx/face_p4");
+               sb_faces[0][0] = Sbar_NewPic ("gfx/face5");
+               sb_faces[0][1] = Sbar_NewPic ("gfx/face_p5");
+       
+               sb_face_invis = Sbar_NewPic ("gfx/face_invis");
+               sb_face_invuln = Sbar_NewPic ("gfx/face_invul2");
+               sb_face_invis_invuln = Sbar_NewPic ("gfx/face_inv2");
+               sb_face_quad = Sbar_NewPic ("gfx/face_quad");
+       
+               sb_sbar = Sbar_NewPic ("gfx/sbar");
+               sb_ibar = Sbar_NewPic ("gfx/ibar");
+               sb_scorebar = Sbar_NewPic ("gfx/scorebar");
+       
+       //MED 01/04/97 added new hipnotic weapons
+               if (gamemode == GAME_HIPNOTIC)
+               {
+                       hsb_weapons[0][0] = Sbar_NewPic ("gfx/inv_laser");
+                       hsb_weapons[0][1] = Sbar_NewPic ("gfx/inv_mjolnir");
+                       hsb_weapons[0][2] = Sbar_NewPic ("gfx/inv_gren_prox");
+                       hsb_weapons[0][3] = Sbar_NewPic ("gfx/inv_prox_gren");
+                       hsb_weapons[0][4] = Sbar_NewPic ("gfx/inv_prox");
+       
+                       hsb_weapons[1][0] = Sbar_NewPic ("gfx/inv2_laser");
+                       hsb_weapons[1][1] = Sbar_NewPic ("gfx/inv2_mjolnir");
+                       hsb_weapons[1][2] = Sbar_NewPic ("gfx/inv2_gren_prox");
+                       hsb_weapons[1][3] = Sbar_NewPic ("gfx/inv2_prox_gren");
+                       hsb_weapons[1][4] = Sbar_NewPic ("gfx/inv2_prox");
+       
+                       for (i = 0;i < 5;i++)
+                       {
+                               hsb_weapons[2+i][0] = Sbar_NewPic (va("gfx/inva%i_laser",i+1));
+                               hsb_weapons[2+i][1] = Sbar_NewPic (va("gfx/inva%i_mjolnir",i+1));
+                               hsb_weapons[2+i][2] = Sbar_NewPic (va("gfx/inva%i_gren_prox",i+1));
+                               hsb_weapons[2+i][3] = Sbar_NewPic (va("gfx/inva%i_prox_gren",i+1));
+                               hsb_weapons[2+i][4] = Sbar_NewPic (va("gfx/inva%i_prox",i+1));
+                       }
+       
+                       hsb_items[0] = Sbar_NewPic ("gfx/sb_wsuit");
+                       hsb_items[1] = Sbar_NewPic ("gfx/sb_eshld");
+               }
+               else if (gamemode == GAME_ROGUE)
+               {
+                       rsb_invbar[0] = Sbar_NewPic ("gfx/r_invbar1");
+                       rsb_invbar[1] = Sbar_NewPic ("gfx/r_invbar2");
+       
+                       rsb_weapons[0] = Sbar_NewPic ("gfx/r_lava");
+                       rsb_weapons[1] = Sbar_NewPic ("gfx/r_superlava");
+                       rsb_weapons[2] = Sbar_NewPic ("gfx/r_gren");
+                       rsb_weapons[3] = Sbar_NewPic ("gfx/r_multirock");
+                       rsb_weapons[4] = Sbar_NewPic ("gfx/r_plasma");
+       
+                       rsb_items[0] = Sbar_NewPic ("gfx/r_shield1");
+                       rsb_items[1] = Sbar_NewPic ("gfx/r_agrav1");
+       
+       // PGM 01/19/97 - team color border
+                       rsb_teambord = Sbar_NewPic ("gfx/r_teambord");
+       // PGM 01/19/97 - team color border
+       
+                       rsb_ammo[0] = Sbar_NewPic ("gfx/r_ammolava");
+                       rsb_ammo[1] = Sbar_NewPic ("gfx/r_ammomulti");
+                       rsb_ammo[2] = Sbar_NewPic ("gfx/r_ammoplasma");
                }
-
-               hsb_items[0] = Sbar_NewPic ("gfx/sb_wsuit");
-               hsb_items[1] = Sbar_NewPic ("gfx/sb_eshld");
-       }
-       else if (gamemode == GAME_ROGUE)
-       {
-               rsb_invbar[0] = Sbar_NewPic ("gfx/r_invbar1");
-               rsb_invbar[1] = Sbar_NewPic ("gfx/r_invbar2");
-
-               rsb_weapons[0] = Sbar_NewPic ("gfx/r_lava");
-               rsb_weapons[1] = Sbar_NewPic ("gfx/r_superlava");
-               rsb_weapons[2] = Sbar_NewPic ("gfx/r_gren");
-               rsb_weapons[3] = Sbar_NewPic ("gfx/r_multirock");
-               rsb_weapons[4] = Sbar_NewPic ("gfx/r_plasma");
-
-               rsb_items[0] = Sbar_NewPic ("gfx/r_shield1");
-               rsb_items[1] = Sbar_NewPic ("gfx/r_agrav1");
-
-// PGM 01/19/97 - team color border
-               rsb_teambord = Sbar_NewPic ("gfx/r_teambord");
-// PGM 01/19/97 - team color border
-
-               rsb_ammo[0] = Sbar_NewPic ("gfx/r_ammolava");
-               rsb_ammo[1] = Sbar_NewPic ("gfx/r_ammomulti");
-               rsb_ammo[2] = Sbar_NewPic ("gfx/r_ammoplasma");
        }
 }
 
@@ -508,30 +523,6 @@ void Sbar_DrawInventory (void)
        char num[6];
        float time;
        int flashon;
-       // AK 2003
-       float fade;
-
-       if(gamemode == GAME_NEXUIZ)
-       {
-               num[0] = cl.stats[STAT_ACTIVEWEAPON];
-               // we have a max time 2s (min time = 0)
-               if ((time = cl.time - cl.weapontime) > 2)
-                       return;
-
-               fade = (1.0 - 0.5 * time);
-               fade *= fade;
-               for (i = 0; i < 8;i++)
-               {
-                       if (!(cl.items & (1 << i)))
-                               continue;
-                       Sbar_DrawWeapon(i + 1, fade, (i == num[0]));
-               }
-
-               if(!(cl.items & (1<<12)))
-                       return;
-               Sbar_DrawWeapon(0, fade, (num[0] == 12));
-               return;
-       }
 
        if (gamemode == GAME_ROGUE)
        {
@@ -868,14 +859,71 @@ void Sbar_Draw (void)
                return;
        }
 
-       if (gamemode == GAME_NEXUIZ)
+       if (gamemode == GAME_SOM)
+       {
+               if (sb_showscores || cl.stats[STAT_HEALTH] <= 0)
+                       Sbar_DrawScoreboard ();
+               else if (sb_lines)
+               {
+                       // this is the top left of the sbar area
+                       sbar_x = 0;
+                       sbar_y = vid.conheight - 24*3;
+
+                       // armor
+                       if (cl.stats[STAT_ARMOR])
+                       {
+                               if (cl.items & IT_ARMOR3)
+                                       Sbar_DrawPic(0, 0, somsb_armor[2]);
+                               else if (cl.items & IT_ARMOR2)
+                                       Sbar_DrawPic(0, 0, somsb_armor[1]);
+                               else if (cl.items & IT_ARMOR1)
+                                       Sbar_DrawPic(0, 0, somsb_armor[0]);
+                               Sbar_DrawNum(24, 0, cl.stats[STAT_ARMOR], 3, cl.stats[STAT_ARMOR] <= 25);
+                       }
+
+                       // health
+                       Sbar_DrawPic(0, 24, somsb_health);
+                       Sbar_DrawNum(24, 24, cl.stats[STAT_HEALTH], 3, cl.stats[STAT_HEALTH] <= 25);
+
+                       // ammo icon
+                       if (cl.items & IT_SHELLS)
+                               Sbar_DrawPic(0, 48, somsb_ammo[0]);
+                       else if (cl.items & IT_NAILS)
+                               Sbar_DrawPic(0, 48, somsb_ammo[1]);
+                       else if (cl.items & IT_ROCKETS)
+                               Sbar_DrawPic(0, 48, somsb_ammo[2]);
+                       else if (cl.items & IT_CELLS)
+                               Sbar_DrawPic(0, 48, somsb_ammo[3]);
+                       Sbar_DrawNum(24, 48, cl.stats[STAT_AMMO], 3, false);
+                       if (cl.stats[STAT_SHELLS])
+                               Sbar_DrawNum(24 + 3*24, 48, cl.stats[STAT_SHELLS], 1, true);
+               }
+       }
+       else if (gamemode == GAME_NEXUIZ)
        {
                sbar_y = vid.conheight - 47;
                sbar_x = (vid.conwidth - 640)/2;
 
                if (sb_lines)
                {
-                       Sbar_DrawInventory();
+                       int i;
+                       double time;
+                       float fade;
+                       // we have a max time 2s (min time = 0)
+                       if ((time = cl.time - cl.weapontime) < 2)
+                       {
+                               fade = (1.0 - 0.5 * time);
+                               fade *= fade;
+                               for (i = 0; i < 8;i++)
+                               {
+                                       if (!(cl.items & (1 << i)))
+                                               continue;
+                                       Sbar_DrawWeapon(i + 1, fade, (i == cl.stats[STAT_ACTIVEWEAPON]));
+                               }
+                       
+                               if((cl.items & (1<<12)))
+                                       Sbar_DrawWeapon(0, fade, (cl.stats[STAT_ACTIVEWEAPON] == 12));
+                       }
                        if (!cl.islocalgame)
                                Sbar_DrawFrags ();
                }
@@ -928,8 +976,11 @@ void Sbar_Draw (void)
 
                        DrawQ_Pic(sbar_x,sbar_y,sb_sbar_overlay->name,0,0,1,1,1,1,DRAWFLAG_MODULATE);
                }
+
+               if (vid.conwidth > 320 && cl.gametype == GAME_DEATHMATCH)
+                       Sbar_MiniDeathmatchOverlay (0, 0);
        }
-       else
+       else // Quake and others
        {
                sbar_y = vid.conheight - SBAR_HEIGHT;
                if (cl.gametype == GAME_DEATHMATCH)
@@ -1036,10 +1087,10 @@ void Sbar_Draw (void)
                        Sbar_DrawNum (248, 0, cl.stats[STAT_AMMO], 3, cl.stats[STAT_AMMO] <= 10);
 
                }
-       }
 
-       if (vid.conwidth > 320 && cl.gametype == GAME_DEATHMATCH)
-               Sbar_MiniDeathmatchOverlay ();
+               if (vid.conwidth > 320 && cl.gametype == GAME_DEATHMATCH)
+                       Sbar_MiniDeathmatchOverlay (324, vid.conheight - sb_lines);
+       }
 
        Sbar_ShowFPS();
 
@@ -1095,22 +1146,11 @@ Sbar_DeathmatchOverlay
 
 ==================
 */
-void Sbar_MiniDeathmatchOverlay (void)
+void Sbar_MiniDeathmatchOverlay (int x, int y)
 {
-       int i, x, y, numlines;
+       int i, numlines;
 
        // decide where to print
-       // AK Nex wants its scores on the upper left
-       if(gamemode == GAME_NEXUIZ)
-       {
-               x = 0;
-               y = 0;
-       }
-       else
-       {
-               x = 324;
-               y = vid.conheight - sb_lines;
-       }
 
        numlines = (vid.conheight - y) / 8;
        // give up if there isn't room