Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@845 e016b1c5-ed68-44aa-a2f7-31cac88cffde
  • Loading branch information
lsalzman committed Jan 16, 2007
1 parent 0fdc703 commit db24b67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions source/src/clients2c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ void parsepositions(ucharbuf &p)
void parsemessages(int cn, playerent *d, ucharbuf &p)
{
static char text[MAXTRANS];
int type;
bool mapchanged = false, c2si = false, gib = false, joining = false, firstplayer = false;
int type, joining = 0;
bool mapchanged = false, c2si = false, gib = false;

while(p.remaining()) switch(type = getint(p))
{
Expand All @@ -116,10 +116,9 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
return;
};
clientnum = mycn; // we are now fully connected
firstplayer = !getint(p);
joining = getint(p);
if(getint(p) > 0) conoutf("INFO: this server is password protected");
if(firstplayer && getclientmap()[0]) changemap(getclientmap()); // we are the first client on this server, set map
joining = true;
if(joining<0 && getclientmap()[0]) changemap(getclientmap()); // we are the first client on this server, set map
break;
};

Expand All @@ -144,7 +143,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
case SV_MAPCHANGE:
getstring(text, p);
changemapserv(text, getint(p));
if(joining && m_arena && !firstplayer)
if(joining>1 && m_arena)
{
deathstate(player1);
showscores(true);
Expand Down Expand Up @@ -515,7 +514,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
case SV_FORCETEAM:
{
changeteam(getint(p));
if(!m_arena || firstplayer) spawnplayer(player1);
if(!m_arena || joining<=1) spawnplayer(player1);
break;
};

Expand Down
2 changes: 1 addition & 1 deletion source/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ void send_welcome(int n)
putint(p, PROTOCOL_VERSION);
if(!smapname[0] && configsets.length()) nextcfgset(false);
int numcl = numclients();
putint(p, numcl-1);
putint(p, smapname[0] ? numcl : -1);
putint(p, serverpassword[0] ? 1 : 0);
if(smapname[0])
{
Expand Down

0 comments on commit db24b67

Please sign in to comment.