jk2mv icon indicating copy to clipboard operation
jk2mv copied to clipboard

cl_shownet fix

Open TomArrow opened this issue 1 year ago • 0 comments

	// shownet 2/3 will interleave with other printed info, -1 will
	// just print the delta records`
	if (cl_shownet->integer >= 2 || cl_shownet->integer == -1) {
		print = 1;
		Com_Printf("%3i: #%-3i ", msg->readcount, to->number);
	} else {
		print = 0;
	}

to->number in the print must be simply number. aka:

	// shownet 2/3 will interleave with other printed info, -1 will
	// just print the delta records`
	if (cl_shownet->integer >= 2 || cl_shownet->integer == -1) {
		print = 1;
		Com_Printf("%3i: #%-3i ", msg->readcount, number);
	} else {
		print = 0;
	}

Else it just takes a random number from parseEntitites, as to->number = number; happens only after this print. OpenJK has this fixed:

https://github.com/JACoders/OpenJK/blob/cb52f9fb2f4a80fd59bae799d3bb0f8ace730ad7/codemp/qcommon/msg.cpp#L1214

TomArrow avatar Oct 06 '24 22:10 TomArrow