"SPECTATOR"


(h0nd) #1

Hmm, I’m having troubles with the SPECTATOR thing on the scoreboard, when someone is connecting, it’s more practical if it says “CONNECTING”, like in ET Pro, my only problem is… Whatever I try (Don’t mind my noobness :frowning: ) I just can’t figure out how to do it. Can someone help me with it?


(Fusen) #2

sorry that this doesn’t answer your Q. but I reckon all the mods should incorparate this as when someone has to download something off the server and it shows them as spec you tend to think they purposly aren’t replying to ya lol


TOYOTA W TRANSMISSION SPECIFICATIONS


(Rain) #3

When qagame thinks a client is CON_CONNECTING, it sends the ping as -1 in the scoreboard update. This is what etpro uses to decide whether someone is still connecting or if they’re loaded and spectating.
There’s a bug in the engine, however, that causes ClientBegin() to be called for clients who aren’t fully connected yet. This causes qagame to move to CON_CONNECTED (and send the ping as 999) and draw mystical levitating players in the spawn for people who haven’t finished loading/downloading yet.
:bash:


(*Shadow* Commando) #4

Actually it is kind of easy.
You just have to use the score->ping function in cg_scoreboard.c
As example.

Replace:

		s = CG_TranslateString( "^3SPECTATOR" );
		w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH;

With this:

		if ( score->ping >= 999 || score->ping <= -1 ){
			s = CG_TranslateString( "^3CONNECTING" );
			w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH;
		} else {
			s = CG_TranslateString( "^3SPECTATOR" );
			w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH;
		}

People who now are still connecting are showed as connecting, only problem is that sometimes players aren’t connecting anymore but have connection interrupted or things like that.
But you can use it if you like. It isn’t hard to make, and it does work.


(Jaquboss) #5

interesting , and also nice idea , thanks shadow


(*Shadow* Commando) #6

No problem, do you want me to post rest of the code for players who are having a ping 999, or are you able to make it yourself?