Forum

"UNCONNECTED"

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

"UNCONNECTED"

Postby Cobalt » Tue Jul 15, 2014 7:19 pm

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...
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: "UNCONNECTED"

Postby r00k » Tue Jul 15, 2014 7:58 pm

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;
            }
         }
      }
   }
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: "UNCONNECTED"

Postby Spike » Tue Jul 15, 2014 9:53 pm

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.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: "UNCONNECTED"

Postby Cobalt » Tue Jul 15, 2014 11:07 pm

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.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest