Possibly useful for admins: extended console history

Post anything else

Moderator: Nod_Nod_Nod

Post Reply
Message
Author
User avatar
Spl@
Server supporter
Server supporter
Posts: 313
Joined: Tue Apr 12, 2011 12:30 am
Location: Camping at base somewhere in England

Possibly useful for admins: extended console history

#1 Post by Spl@ » Thu Nov 24, 2011 7:26 pm

With this, you get a much larger console history. (And a possible divide-by-0 crash is fixed.)

Code: Select all

Index: src/client/cl_console.c
===================================================================
--- src/client/cl_console.c	(revision 2260)
+++ src/client/cl_console.c	(working copy)
@@ -30,7 +30,7 @@
 
 #define	NUM_CON_TIMES 4
 
-#define		CON_TEXTSIZE	163840
+#define		CON_TEXTSIZE	655360
 typedef struct {
 	qboolean	initialized;
 
@@ -370,7 +370,7 @@
 			con.x = 0;
 			break;
 		default:	// display character and advance
-			y = con.current % con.totallines;
+			y = con.totallines ? con.current % con.totallines : 0;
 			con.text&#91;y*con.linewidth+con.x&#93; = &#40;color << 8&#41; | c;
 			con.x++;
 			if&#40;con.x >= con.linewidth&#41;
Oh look. Killed again. Back to the tent…

User avatar
Redman
Marauder
Marauder
Posts: 403
Joined: Fri Apr 03, 2009 6:00 pm
Location: Walbrzych, Poland

#2 Post by Redman » Thu Nov 24, 2011 8:43 pm

Enabling logging looks much simpler (logfile 1).
Also known as the invisible man.

Post Reply