Skip to content

Commit 7570986

Browse files
committed
add con_timestamps 2 to disable timestamps in the notify lines only
1 parent 1e8a799 commit 7570986

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

code/client/cl_console.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ Draws the last few lines of output transparently over the game top
600600
void Con_DrawNotify (void)
601601
{
602602
int x, v;
603+
int lineLimit = con.linewidth;
603604
conChar_t *text;
604605
int i;
605606
int time;
@@ -631,8 +632,11 @@ void Con_DrawNotify (void)
631632
if (time > con_notifytime->value*1000)
632633
continue;
633634
text = con.text + (i % con.totallines)*con.rowwidth;
634-
if (!con_timestamps->integer)
635+
if (con_timestamps->integer == 0 || con_timestamps->integer == 2) {
636+
// don't show timestamps in the notify lines
635637
text += CON_TIMESTAMP_LEN;
638+
lineLimit -= CON_TIMESTAMP_LEN;
639+
}
636640

637641
// asian language needs to use the new font system to print glyphs...
638642
//
@@ -644,7 +648,7 @@ void Con_DrawNotify (void)
644648
//
645649
char sTemp[4096]; // ott
646650
sTemp[0] = '\0';
647-
for (x = 0 ; x < con.linewidth ; x++)
651+
for (x = 0 ; x < lineLimit ; x++)
648652
{
649653
if ( text[x].f.color != currentColor ) {
650654
currentColor = text[x].f.color;
@@ -662,7 +666,7 @@ void Con_DrawNotify (void)
662666
}
663667
else
664668
{
665-
for (x = 0 ; x < con.linewidth ; x++) {
669+
for (x = 0 ; x < lineLimit ; x++) {
666670
if ( text[x].f.character == ' ' ) {
667671
continue;
668672
}

codemp/client/cl_console.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ Draws the last few lines of output transparently over the game top
722722
void Con_DrawNotify (void)
723723
{
724724
int x, v;
725+
int lineLimit = con.linewidth;
725726
conChar_t *text;
726727
int i;
727728
int time;
@@ -755,8 +756,10 @@ void Con_DrawNotify (void)
755756
if (time > con_notifytime->value*1000)
756757
continue;
757758
text = con.text + (i % con.totallines)*con.rowwidth;
758-
if (!con_timestamps->integer)
759+
if (con_timestamps->integer == 0 || con_timestamps->integer == 2) {
759760
text += CON_TIMESTAMP_LEN;
761+
lineLimit -= CON_TIMESTAMP_LEN;
762+
}
760763

761764
if (cl.snap.ps.pm_type != PM_INTERMISSION && Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME) ) {
762765
continue;
@@ -778,7 +781,7 @@ void Con_DrawNotify (void)
778781
//
779782
char sTemp[4096]; // ott
780783
sTemp[0] = '\0';
781-
for (x = 0 ; x < con.linewidth ; x++)
784+
for (x = 0 ; x < lineLimit ; x++)
782785
{
783786
if ( text[x].f.color != currentColor ) {
784787
currentColor = text[x].f.color;
@@ -796,7 +799,7 @@ void Con_DrawNotify (void)
796799
}
797800
else
798801
{
799-
for (x = 0 ; x < con.linewidth ; x++) {
802+
for (x = 0 ; x < lineLimit ; x++) {
800803
if ( text[x].f.character == ' ' ) {
801804
continue;
802805
}

0 commit comments

Comments
 (0)