Skip to content

Commit 8fceb59

Browse files
authored
Merge pull request #1216 from JACoders/con-notify-no-timestamp
[Shared] add con_timestamps 2 to disable timestamps in the notify lines only
2 parents a8c28ae + 961f0ff commit 8fceb59

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-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: 7 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,11 @@ 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) {
760+
// don't show timestamps in the notify lines
759761
text += CON_TIMESTAMP_LEN;
762+
lineLimit -= CON_TIMESTAMP_LEN;
763+
}
760764

761765
if (cl.snap.ps.pm_type != PM_INTERMISSION && Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME) ) {
762766
continue;
@@ -778,7 +782,7 @@ void Con_DrawNotify (void)
778782
//
779783
char sTemp[4096]; // ott
780784
sTemp[0] = '\0';
781-
for (x = 0 ; x < con.linewidth ; x++)
785+
for (x = 0 ; x < lineLimit ; x++)
782786
{
783787
if ( text[x].f.color != currentColor ) {
784788
currentColor = text[x].f.color;
@@ -796,7 +800,7 @@ void Con_DrawNotify (void)
796800
}
797801
else
798802
{
799-
for (x = 0 ; x < con.linewidth ; x++) {
803+
for (x = 0 ; x < lineLimit ; x++) {
800804
if ( text[x].f.character == ' ' ) {
801805
continue;
802806
}

0 commit comments

Comments
 (0)