diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index 324e6fb58..74a4556e6 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -56,9 +56,12 @@ byte *vid_colormap; cvar_t *cl_name; cvar_t *cl_color; +cvar_t *writecfg; + cvar_t *cl_shownet; cvar_t *cl_nolerp; cvar_t *cl_sbar; +cvar_t *cl_sbar_separator; cvar_t *cl_hudswap; cvar_t *cl_cshift_bonus; @@ -162,12 +165,12 @@ CL_ClearState (void) if (!sv.active) Host_ClearMemory (); -// wipe the entire cl structure + // wipe the entire cl structure memset (&cl, 0, sizeof (cl)); SZ_Clear (&cls.message); -// clear other arrays + // clear other arrays memset (cl_efrags, 0, sizeof (cl_efrags)); memset (cl_entities, 0, sizeof (cl_entities)); memset (cl_dlights, 0, sizeof (cl_dlights)); @@ -175,9 +178,7 @@ CL_ClearState (void) memset (cl_temp_entities, 0, sizeof (cl_temp_entities)); memset (cl_beams, 0, sizeof (cl_beams)); -// -// allocate the efrags and chain together into a free list -// + // allocate the efrags and chain together into a free list cl.free_efrags = cl_efrags; for (i = 0; i < MAX_EFRAGS - 1; i++) cl.free_efrags[i].entnext = &cl.free_efrags[i + 1]; @@ -276,7 +277,7 @@ CL_EstablishConnection (char *host) cls.demonum = -1; // not in the demo loop now cls.state = ca_connected; cls.signon = 0; // need all the signon messages - // before playing + // before playing } @@ -293,32 +294,30 @@ CL_SignonReply (void) Con_DPrintf ("CL_SignonReply: %i\n", cls.signon); switch (cls.signon) { - case 1: + case 1: MSG_WriteByte (&cls.message, clc_stringcmd); MSG_WriteString (&cls.message, "prespawn"); break; - case 2: + case 2: MSG_WriteByte (&cls.message, clc_stringcmd); MSG_WriteString (&cls.message, va ("name \"%s\"\n", cl_name->string)); - MSG_WriteByte (&cls.message, clc_stringcmd); MSG_WriteString (&cls.message, va ("color %i %i\n", (cl_color->int_val) >> 4, (cl_color->int_val) & 15)); - MSG_WriteByte (&cls.message, clc_stringcmd); snprintf (str, sizeof (str), "spawn %s", cls.spawnparms); MSG_WriteString (&cls.message, str); break; - case 3: + case 3: MSG_WriteByte (&cls.message, clc_stringcmd); MSG_WriteString (&cls.message, "begin"); Cache_Report (); // print remaining memory break; - case 4: + case 4: // SCR_EndLoadingPlaque (); // allow normal screen updates break; } @@ -374,11 +373,9 @@ CL_PrintEntities_f (void) /* -=============== -SetPal + SetPal -Debugging tool, just flashes the screen -=============== + Debugging tool, just flashes the screen */ void SetPal (int i) @@ -413,13 +410,13 @@ SetPal (int i) } -dlight_t * +dlight_t * CL_AllocDlight (int key) { int i; dlight_t *dl; -// first look for an exact key match + // first look for an exact key match if (key) { dl = cl_dlights; for (i = 0; i < MAX_DLIGHTS; i++, dl++) { @@ -430,7 +427,7 @@ CL_AllocDlight (int key) } } } -// then look for anything else + // then look for anything else dl = cl_dlights; for (i = 0; i < MAX_DLIGHTS; i++, dl++) { if (dl->die < cl.time) { @@ -460,23 +457,23 @@ CL_NewDlight (int key, float x, float y, float z, float radius, float time, dl->radius = radius; dl->die = cl.time + time; switch (type) { - default: - case 0: + default: + case 0: dl->color[0] = 0.4; dl->color[1] = 0.2; dl->color[2] = 0.05; break; - case 1: // blue + case 1: // blue dl->color[0] = 0.05; dl->color[1] = 0.05; dl->color[2] = 0.5; break; - case 2: // red + case 2: // red dl->color[0] = 0.5; dl->color[1] = 0.05; dl->color[2] = 0.05; break; - case 3: // purple + case 3: // purple dl->color[0] = 0.5; dl->color[1] = 0.05; dl->color[2] = 0.5; @@ -507,12 +504,10 @@ CL_DecayLights (void) /* -=============== -CL_LerpPoint + CL_LerpPoint -Determines the fraction between the last two messages that the objects -should be put at. -=============== + Determines the fraction between the last two messages that the objects + should be put at. */ float CL_LerpPoint (void) @@ -531,19 +526,19 @@ CL_LerpPoint (void) f = 0.1; } frac = (cl.time - cl.mtime[1]) / f; -//Con_Printf ("frac: %f\n",frac); +// Con_Printf ("frac: %f\n",frac); if (frac < 0) { if (frac < -0.01) { SetPal (1); cl.time = cl.mtime[1]; -// Con_Printf ("low frac\n"); +// Con_Printf ("low frac\n"); } frac = 0; } else if (frac > 1) { if (frac > 1.01) { SetPal (2); cl.time = cl.mtime[0]; -// Con_Printf ("high frac\n"); +// Con_Printf ("high frac\n"); } frac = 1; } else @@ -564,14 +559,12 @@ CL_RelinkEntities (void) vec3_t oldorg; dlight_t *dl; -// determine partial update time + // determine partial update time frac = CL_LerpPoint (); cl_numvisedicts = 0; -// -// interpolate player info -// + // interpolate player info for (i = 0; i < 3; i++) cl.velocity[i] = cl.mvelocity[1][i] + frac * (cl.mvelocity[0][i] - cl.mvelocity[1][i]); @@ -590,14 +583,14 @@ CL_RelinkEntities (void) bobjrotate = anglemod (100 * cl.time); -// start on the entity after the world + // start on the entity after the world for (i = 1, ent = cl_entities + 1; i < cl.num_entities; i++, ent++) { if (!ent->model) { // empty slot if (ent->forcelink) R_RemoveEfrags (ent); // just became empty continue; } -// if the object wasn't included in the last packet, remove it + // if the object wasn't included in the last packet, remove it if (ent->msgtime != cl.mtime[0]) { ent->model = NULL; continue; @@ -605,19 +598,17 @@ CL_RelinkEntities (void) VectorCopy (ent->origin, oldorg); - if (ent->forcelink) { // the entity was not updated in the - // last message - // so move to the final spot + if (ent->forcelink) { // the entity was not updated in the + // last message so move to the final spot VectorCopy (ent->msg_origins[0], ent->origin); VectorCopy (ent->msg_angles[0], ent->angles); - } else { // if the delta is large, assume a - // teleport and don't lerp + } else { // if the delta is large, assume a + // teleport and don't lerp f = frac; for (j = 0; j < 3; j++) { delta[j] = ent->msg_origins[0][j] - ent->msg_origins[1][j]; if (delta[j] > 100 || delta[j] < -100) - f = 1; // assume a teleportation, not a - // motion + f = 1; // assume a teleportation, not a motion } // interpolate the origin and angles @@ -634,7 +625,7 @@ CL_RelinkEntities (void) } -// rotate binary objects locally + // rotate binary objects locally if (ent->model->flags & EF_ROTATE) ent->angles[1] = bobjrotate; @@ -690,7 +681,6 @@ CL_RelinkEntities (void) dl->die = cl.time + 0.001; } #endif - if (VectorDistance_fast(ent->msg_origins[1], ent->origin) > (256*256)) VectorCopy (ent ->origin, ent->msg_origins[1]); if (ent->model->flags & EF_ROCKET) { @@ -717,7 +707,6 @@ CL_RelinkEntities (void) if (i == cl.viewentity && !chase_active->int_val) continue; - #ifdef QUAKE2 if (ent->effects & EF_NODRAW) continue; @@ -727,16 +716,13 @@ CL_RelinkEntities (void) cl_numvisedicts++; } } - } /* -=============== -CL_ReadFromServer + CL_ReadFromServer -Read all incoming data from the server -=============== + Read all incoming data from the server */ int CL_ReadFromServer (void) @@ -763,17 +749,11 @@ CL_ReadFromServer (void) CL_RelinkEntities (); CL_UpdateTEnts (); -// -// bring the links up to date -// + // bring the links up to date return 0; } -/* -================= -CL_SendCmd -================= -*/ + void CL_SendCmd (void) { @@ -794,7 +774,7 @@ CL_SendCmd (void) SZ_Clear (&cls.message); return; } -// send the reliable message + // send the reliable message if (!cls.message.cursize) return; // no message at all @@ -809,11 +789,7 @@ CL_SendCmd (void) SZ_Clear (&cls.message); } -/* -================= -CL_Init -================= -*/ + void CL_Init (void) { diff --git a/nq/source/sbar.c b/nq/source/sbar.c index 7a7f937e1..19201eb48 100644 --- a/nq/source/sbar.c +++ b/nq/source/sbar.c @@ -44,29 +44,23 @@ #include "client.h" #include "server.h" -int sb_updates; // if >= vid.numpages, no update +int sb_updates; // if >= vid.numpages, no update needed - // needed - -#define STAT_MINUS 10 // num frame for '-' stats digit +#define STAT_MINUS 10 // num frame for '-' stats digit qpic_t *sb_nums[2][11]; qpic_t *sb_colon, *sb_slash; qpic_t *sb_ibar; qpic_t *sb_sbar; qpic_t *sb_scorebar; -qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are - - // flashes +qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are flashes qpic_t *sb_ammo[4]; qpic_t *sb_sigil[4]; qpic_t *sb_armor[3]; qpic_t *sb_items[32]; -qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are - - // alive - // 0 is static, 1 is temporary animation +qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are alive + // 0 is static, 1 is temporary animation qpic_t *sb_face_invis; qpic_t *sb_face_quad; qpic_t *sb_face_invuln; @@ -74,28 +68,24 @@ qpic_t *sb_face_invis_invuln; qboolean sb_showscores; -int sb_lines; // scan lines to draw +int sb_lines; // scan lines to draw // FIXME: MISSIONHUD (rsb_*, hsb_*) //qpic_t *rsb_invbar[2]; //qpic_t *rsb_weapons[5]; //qpic_t *rsb_items[2]; //qpic_t *rsb_ammo[3]; -//qpic_t *rsb_teambord; // PGM 01/19/97 - team color border +//qpic_t *rsb_teambord; // PGM 01/19/97 - team color border // MED 01/04/97 added two more weapons + 3 // alternates for grenade launcher -//qpic_t *hsb_weapons[7][5]; // 0 is active, 1 is owned, 2-5 are - - // flashes +//qpic_t *hsb_weapons[7][5]; // 0 is active, 1 is owned, 2-5 are flashes // MED 01/04/97 added array to simplify // weapon parsing //int hipweapons[4] = // { HIT_LASER_CANNON_BIT, HIT_MJOLNIR_BIT, 4, HIT_PROXIMITY_GUN_BIT }; -//qpic_t *hsb_items[2]; // MED 01/04/97 added hipnotic items - - // array +//qpic_t *hsb_items[2]; // MED 01/04/97 added hipnotic items array qboolean headsup; qboolean sbar_centered; @@ -103,11 +93,6 @@ qboolean sbar_centered; void Sbar_MiniDeathmatchOverlay (void); void Sbar_DeathmatchOverlay (void); -/* - * - * Status Bar Utility Functions - * - */ /* Sbar_ColorForMap @@ -123,7 +108,6 @@ Sbar_ColorForMap (int m) } - /* Sbar_ShowScores @@ -138,6 +122,7 @@ Sbar_ShowScores (void) sb_updates = 0; } + /* Sbar_DontShowScores @@ -152,6 +137,7 @@ Sbar_DontShowScores (void) sb_updates = 0; } + /* Sbar_Changed @@ -205,6 +191,7 @@ Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, height); } + /* Sbar_DrawTransPic @@ -313,10 +300,8 @@ Sbar_DrawNum (int x, int y, int num, int digits, int color) } } -//============================================================================= int fragsort[MAX_SCOREBOARD]; - char scoreboardtext[MAX_SCOREBOARD][20]; int scoreboardtop[MAX_SCOREBOARD]; int scoreboardbottom[MAX_SCOREBOARD]; @@ -417,9 +402,6 @@ Sbar_DrawScoreboard (void) } -//============================================================================= - - void Sbar_DrawInventory (void) { @@ -636,9 +618,6 @@ Sbar_DrawInventory (void) } -//============================================================================= - - void Sbar_DrawFrags (void) { @@ -695,9 +674,6 @@ Sbar_DrawFrags (void) } -//============================================================================= - - void Sbar_DrawFace (void) { @@ -918,9 +894,6 @@ Sbar_Draw (void) } -//============================================================================= - - void Sbar_IntermissionNumber (int x, int y, int num, int digits, int color) { @@ -1278,4 +1251,3 @@ Sbar_Init (void) // rsb_ammo[2] = Draw_PicFromWad ("r_ammoplasma"); // } } - diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 0e8e5d74c..b789c199f 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -118,7 +118,7 @@ cvar_t *cl_allow_cmd_pkt; cvar_t *cl_timeout; -cvar_t *cl_shownet; // can be 0, 1, or 2 +cvar_t *cl_shownet; cvar_t *cl_autoexec; cvar_t *cl_sbar; cvar_t *cl_sbar_separator; diff --git a/qw/source/sbar.c b/qw/source/sbar.c index 551d798ea..f220961a5 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -51,29 +51,23 @@ #include "client.h" #include "sbar.h" -int sb_updates; // if >= vid.numpages, no update +int sb_updates; // if >= vid.numpages, no update needed - // needed - -#define STAT_MINUS 10 // num frame for '-' stats digit +#define STAT_MINUS 10 // num frame for '-' stats digit qpic_t *sb_nums[2][11]; qpic_t *sb_colon, *sb_slash; qpic_t *sb_ibar; qpic_t *sb_sbar; qpic_t *sb_scorebar; -qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are - - // flashes +qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are flashes qpic_t *sb_ammo[4]; qpic_t *sb_sigil[4]; qpic_t *sb_armor[3]; qpic_t *sb_items[32]; -qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are - - // alive - // 0 is static, 1 is temporary animation +qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are alive + // 0 is static, 1 is temporary animation qpic_t *sb_face_invis; qpic_t *sb_face_quad; qpic_t *sb_face_invuln; @@ -82,7 +76,7 @@ qpic_t *sb_face_invis_invuln; qboolean sb_showscores; qboolean sb_showteamscores; -int sb_lines; // scan lines to draw +int sb_lines; // scan lines to draw void Sbar_DeathmatchOverlay (int start); void Sbar_TeamOverlay (void); @@ -235,11 +229,14 @@ Sbar_Init (void) sb_face_invis_invuln = Draw_PicFromWad ("face_inv2"); sb_face_quad = Draw_PicFromWad ("face_quad"); - Cmd_AddCommand ("+showscores", Sbar_ShowScores, "Display information on everyone playing"); - Cmd_AddCommand ("-showscores", Sbar_DontShowScores, "Stop displaying information on everyone playing"); - - Cmd_AddCommand ("+showteamscores", Sbar_ShowTeamScores, "Display information for your team"); - Cmd_AddCommand ("-showteamscores", Sbar_DontShowTeamScores, "Stop displaying information for your team"); + Cmd_AddCommand ("+showscores", Sbar_ShowScores, + "Display information on everyone playing"); + Cmd_AddCommand ("-showscores", Sbar_DontShowScores, + "Stop displaying information on everyone playing"); + Cmd_AddCommand ("+showteamscores", Sbar_ShowTeamScores, + "Display information for your team"); + Cmd_AddCommand ("-showteamscores", Sbar_DontShowTeamScores, + "Stop displaying information for your team"); sb_sbar = Draw_PicFromWad ("sbar"); sb_ibar = Draw_PicFromWad ("ibar"); @@ -247,16 +244,11 @@ Sbar_Init (void) } -//============================================================================= - - // drawing routines are reletive to the status bar location - void Sbar_DrawPic (int x, int y, qpic_t *pic) { - Draw_Pic (x /* + ((vid.width - 320)>>1) */ , y + (vid.height - SBAR_HEIGHT), - pic); + Draw_Pic (x, y + (vid.height - SBAR_HEIGHT), pic); } @@ -277,7 +269,7 @@ Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, void Sbar_DrawTransPic (int x, int y, qpic_t *pic) { - Draw_Pic (x /* + ((vid.width - 320)>>1) */ , y + (vid.height - SBAR_HEIGHT), + Draw_Pic (x, y + (vid.height - SBAR_HEIGHT), pic); } @@ -290,16 +282,14 @@ Sbar_DrawTransPic (int x, int y, qpic_t *pic) void Sbar_DrawCharacter (int x, int y, int num) { - Draw_Character8 (x /* + ((vid.width - 320)>>1) */ + 4, - y + vid.height - SBAR_HEIGHT, num); + Draw_Character8 (x + 4, y + vid.height - SBAR_HEIGHT, num); } void Sbar_DrawString (int x, int y, char *str) { - Draw_String8 (x /* + ((vid.width - 320)>>1) */ , - y + vid.height - SBAR_HEIGHT, str); + Draw_String8 (x, y + vid.height - SBAR_HEIGHT, str); } @@ -359,8 +349,6 @@ Sbar_DrawNum (int x, int y, int num, int digits, int color) } -//============================================================================= - //ZOID: this should be MAX_CLIENTS, not MAX_SCOREBOARD!! //int fragsort[MAX_SCOREBOARD]; int fragsort[MAX_CLIENTS]; @@ -381,7 +369,7 @@ Sbar_SortFrags (qboolean includespec) { int i, j, k; -// sort by frags + // sort by frags scoreboardlines = 0; for (i = 0; i < MAX_CLIENTS; i++) { if (cl.players[i].name[0] && (!cl.players[i].spectator || includespec)) { @@ -411,14 +399,14 @@ Sbar_SortTeams (void) int teamplay; char t[16 + 1]; -// request new ping times every two second + // request new ping times every two second scoreboardteams = 0; teamplay = atoi (Info_ValueForKey (cl.serverinfo, "teamplay")); if (!teamplay) return; -// sort the teams + // sort the teams memset (teams, 0, sizeof (teams)); for (i = 0; i < MAX_CLIENTS; i++) teams[i].plow = 999; @@ -495,9 +483,6 @@ Sbar_SoloScoreboard (void) } -//============================================================================= - - void Sbar_DrawInventory (void) { @@ -513,7 +498,7 @@ Sbar_DrawInventory (void) if (!headsup) Sbar_DrawPic (0, -24, sb_ibar); -// weapons + // weapons for (i = 0; i < 7; i++) { if (cl.stats[STAT_ITEMS] & (IT_SHOTGUN << i)) { time = cl.item_gettime[i]; @@ -536,18 +521,18 @@ Sbar_DrawInventory (void) } else Sbar_DrawPic (i * 24, -16, sb_weapons[flashon][i]); -// Sbar_DrawSubPic (0,0,20,20,i*24, -16, sb_weapons[flashon][i]); +// Sbar_DrawSubPic (0, 0, 20, 20, i*24, -16, sb_weapons[flashon][i]); if (flashon > 1) sb_updates = 0; // force update to remove flash } } -// ammo counts + // ammo counts for (i = 0; i < 4; i++) { snprintf (num, sizeof (num), "%3i", cl.stats[STAT_SHELLS + i]); if (headsup) { -// Sbar_DrawSubPic(3, -24, sb_ibar, 3, 0, 42,11); +// Sbar_DrawSubPic(3, -24, sb_ibar, 3, 0, 42, 11); Sbar_DrawSubPic ((hudswap) ? 0 : (vid.width - 42), -24 - (4 - i) * 11, sb_ibar, 3 + (i * 48), 0, 42, 11); @@ -574,7 +559,7 @@ Sbar_DrawInventory (void) } flashon = 0; -// items + // items for (i = 0; i < 6; i++) if (cl.stats[STAT_ITEMS] & (1 << (17 + i))) { time = cl.item_gettime[17 + i]; @@ -585,7 +570,7 @@ Sbar_DrawInventory (void) if (time && time > cl.time - 2) sb_updates = 0; } -// sigils + // sigils for (i = 0; i < 4; i++) if (cl.stats[STAT_ITEMS] & (1 << (28 + i))) { time = cl.item_gettime[28 + i]; @@ -599,9 +584,6 @@ Sbar_DrawInventory (void) } -//============================================================================= - - void Sbar_DrawFrags (void) { @@ -613,11 +595,11 @@ Sbar_DrawFrags (void) Sbar_SortFrags (false); -// draw the text + // draw the text l = scoreboardlines <= 4 ? scoreboardlines : 4; x = 23; -// xofs = (vid.width - 320)>>1; +// xofs = (vid.width - 320)>>1; y = vid.height - SBAR_HEIGHT - 23; for (i = 0; i < l; i++) { @@ -637,8 +619,8 @@ Sbar_DrawFrags (void) top = Sbar_ColorForMap (top); bottom = Sbar_ColorForMap (bottom); -// Draw_Fill (xofs + x*8 + 10, y, 28, 4, top); -// Draw_Fill (xofs + x*8 + 10, y+4, 28, 3, bottom); +// Draw_Fill (xofs + x*8 + 10, y, 28, 4, top); +// Draw_Fill (xofs + x*8 + 10, y+4, 28, 3, bottom); Draw_Fill (x * 8 + 10, y, 28, 4, top); Draw_Fill (x * 8 + 10, y + 4, 28, 3, bottom); @@ -659,9 +641,6 @@ Sbar_DrawFrags (void) } -//============================================================================= - - void Sbar_DrawFace (void) { @@ -705,7 +684,7 @@ Sbar_DrawNormal (void) if (cl_sbar->int_val || scr_viewsize->int_val < 100) Sbar_DrawPic (0, 0, sb_sbar); -// armor + // armor if (cl.stats[STAT_ITEMS] & IT_INVULNERABILITY) { Sbar_DrawNum (24, 0, 666, 3, 1); Sbar_DrawPic (0, 0, draw_disc); @@ -720,14 +699,14 @@ Sbar_DrawNormal (void) Sbar_DrawPic (0, 0, sb_armor[0]); } -// face + // face Sbar_DrawFace (); -// health + // health Sbar_DrawNum (136, 0, cl.stats[STAT_HEALTH], 3, cl.stats[STAT_HEALTH] <= 25); -// ammo icon + // ammo icon if (cl.stats[STAT_ITEMS] & IT_SHELLS) Sbar_DrawPic (224, 0, sb_ammo[0]); else if (cl.stats[STAT_ITEMS] & IT_NAILS) @@ -755,18 +734,18 @@ Sbar_Draw (void) return; // console is full screen scr_copyeverything = 1; -// scr_fullupdate = 0; +// scr_fullupdate = 0; sb_updates++; -// top line + // top line if (sb_lines > 24) { if (!cl.spectator || autocam == CAM_TRACK) Sbar_DrawInventory (); if (!headsup || vid.width < 512) Sbar_DrawFrags (); } -// main area + // main area if (sb_lines > 0) { if (cl.spectator) { if (autocam != CAM_TRACK) { @@ -780,7 +759,7 @@ Sbar_Draw (void) else Sbar_DrawNormal (); -// Sbar_DrawString (160-14*8+4,4, "SPECTATOR MODE - TRACK CAMERA"); +// Sbar_DrawString (160-14*8+4,4, "SPECTATOR MODE - TRACK CAMERA"); snprintf (st, sizeof (st), "Tracking %-.13s, [JUMP] for next", cl.players[spec_track].name); Sbar_DrawString (0, -8, st); @@ -790,7 +769,7 @@ Sbar_Draw (void) else Sbar_DrawNormal (); } -// main screen deathmatch rankings + // main screen deathmatch rankings // if we're dead show team scores in team games if (cl.stats[STAT_HEALTH] <= 0 && !cl.spectator) if (atoi (Info_ValueForKey (cl.serverinfo, "teamplay")) > 0 && @@ -812,9 +791,6 @@ Sbar_Draw (void) } -//============================================================================= - - void Sbar_IntermissionNumber (int x, int y, int num, int digits, int color) { @@ -860,7 +836,7 @@ Sbar_TeamOverlay (void) team_t *tm; int plow, phigh, pavg; -// request new ping times every two second + // request new ping times every two second teamplay = atoi (Info_ValueForKey (cl.serverinfo, "teamplay")); if (!teamplay) { @@ -878,15 +854,16 @@ Sbar_TeamOverlay (void) x = 36; Draw_String8 (x, y, "low/avg/high team total players"); y += 8; -// Draw_String8 (x, y, "------------ ---- ----- -------"); - Draw_String8 (x, y, - "\x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1f"); +// Draw_String8 (x, y, "------------ ---- ----- -------"); + Draw_String8 (x, y, "\x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f " + "\x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f " + "\x1d\x1e\x1e\x1e\x1e\x1e\x1f"); y += 8; -// sort the teams + // sort the teams Sbar_SortTeams (); -// draw the text + // draw the text l = scoreboardlines; for (i = 0; i < scoreboardteams && y <= vid.height - 10; i++) { @@ -960,7 +937,7 @@ Sbar_DeathmatchOverlay (int start) if (largegame) skip = 8; -// request new ping times every two second + // request new ping times every two second if (realtime - cl.last_ping_request > 2) { cl.last_ping_request = realtime; MSG_WriteByte (&cls.netchan.message, clc_stringcmd); @@ -976,10 +953,10 @@ Sbar_DeathmatchOverlay (int start) pic = Draw_CachePic ("gfx/ranking.lmp", true); Draw_Pic (160 - pic->width / 2, 0, pic); } -// scores + // scores Sbar_SortFrags (true); -// draw the text + // draw the text l = scoreboardlines; if (start) @@ -988,21 +965,23 @@ Sbar_DeathmatchOverlay (int start) y = 24; if (teamplay) { x = 4; -// 0 40 64 104 152 192 +// 0 40 64 104 152 192 Draw_String8 (x, y, "ping pl time frags team name"); y += 8; // Draw_String8 ( x , y, "---- -- ---- ----- ---- ----------------"); - Draw_String8 (x, y, - "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f"); + Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f " + "\x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e" + "\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f"); y += 8; } else { x = 16; -// 0 40 64 104 152 +// 0 40 64 104 152 Draw_String8 (x, y, "ping pl time frags name"); y += 8; -// Draw_String8 ( x , y, "---- -- ---- ----- ----------------"); - Draw_String8 (x, y, - "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f"); +// Draw_String8 ( x , y, "---- -- ---- ----- ----------------"); + Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f " + "\x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e" + "\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f"); y += 8; } @@ -1086,8 +1065,7 @@ Sbar_DeathmatchOverlay (int start) y += skip; } - if (y >= vid.height - 10) // we ran over the screen size, - // squish + if (y >= vid.height - 10) // we ran over the screen size, squish largegame = true; } @@ -1121,7 +1099,7 @@ Sbar_MiniDeathmatchOverlay (void) scr_copyeverything = 1; scr_fullupdate = 0; -// scores + // scores Sbar_SortFrags (false); if (vid.width >= 640) Sbar_SortTeams (); @@ -1129,7 +1107,7 @@ Sbar_MiniDeathmatchOverlay (void) if (!scoreboardlines) return; // no one there? -// draw the text + // draw the text y = vid.height - sb_lines - 1; numlines = sb_lines / 8; if (numlines < 3)