"UNCONNECTED"

Discuss programming in the QuakeC language.
Post Reply
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

"UNCONNECTED"

Post by Cobalt »

Ok, messed up something in QC, cant find what it is for the moment. All players joining the game are named "UNCONNECTED", cant be renamed.

I suspect something I did with clientconnect() or setnewparms ()....or can a bad modelindex do this? I took a peek at the engine code, .main had something referencing this but cant make sense of it...
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: "UNCONNECTED"

Post by r00k »

If you have a backup maybe DIFF the latest with the backup?

I'm wondering if maybe you "removed" a client in ClientDisconnect or something?

Also try printing to console, at each function from ClientConnect to PutClientInServer... and see where it hangs.

brb seeing if i can reproduce this bug ... sounds familiar.

EDIT:
Oh I got side tracked and watched a video on your youtube channel and saw a comment about runes not working on the hud, this should work with the .items2 variable

Code: Select all

<defs.qc:>
.float  items2;
float   IT2_SIGIL1 = 32;
float	IT2_SIGIL2 = 64;
float   IT2_SIGIL3 = 128;
float   IT2_SIGIL4 = 256;

...
<items.qc>
	if ((other.player_flag & ITEM_RUNE1_FLAG))//Rune 1 - Earth Magic(resistance)
	{
		other.items2 = (other.items2 | IT2_SIGIL1);
		sprint (other,"you got the rune of Åáòôè Íáçéã!    \b[resistance]\n");
	}
	else
	{
		if ((other.player_flag & ITEM_RUNE2_FLAG))//Rune 2 - Black Magic(strength)
		{
			other.items2 = (other.items2 | IT2_SIGIL2);			
			sprint (other,"you got the rune of Âìáãë Íáçéã!    \b[strength]\n");			
		}
		else
		{
			if ((other.player_flag & ITEM_RUNE3_FLAG))
			{
				other.items2 = (other.items2 | IT2_SIGIL3);
				sprint (other,"you got the rune of Èåìì Íáçéã!    \b[haste]\n");//Rune 3 - Hell Magic(haste)				
			}
			else
			{
				if ((other.player_flag & ITEM_RUNE4_FLAG))//Rune 4 - Elder Magic(regeneration)
				{
					other.items2 = (other.items2 | IT2_SIGIL4);					
					sprint (other,"you got the rune of Åìäåò Íáçéã!    \b[regeneration]\n");					
					other.max_health = 150;
				}
			}
		}
	}
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: "UNCONNECTED"

Post by Spike »

check your krimzon_sv_parseclientcommand. all unrecognised commands MUST be thrown back to the engine (via the clientcommand builtin) so it can handle things like name changes properly.
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

Re: "UNCONNECTED"

Post by Cobalt »

Beautiful Spike. I forgot I just placed a (return) at the top of that function to stop the console from spamming while I was experimenting with it.

Had no clue it was that important, but I always wondered why at times you would see messages like "Unconnected joined the game" at times, then it would fix that and place the players name in there. Happens with the Darkplaces Botclient built in alot when a bot connects....but I suppose that could also be related to this same issue.

@Rook - Thanks for the reply. The video should say the runes show up properly in the hud, and also flash when used.
Spike wrote:check your krimzon_sv_parseclientcommand. all unrecognised commands MUST be thrown back to the engine (via the clientcommand builtin) so it can handle things like name changes properly.
Post Reply